Functions to automatically select Device with most flops/memory#41
Open
ProjectPhysX wants to merge 1 commit intoKhronosGroup:mainfrom
Open
Functions to automatically select Device with most flops/memory#41ProjectPhysX wants to merge 1 commit intoKhronosGroup:mainfrom
ProjectPhysX wants to merge 1 commit intoKhronosGroup:mainfrom
Conversation
Added utility functions to automatically select the fastest Device or the Device with largest memory capacity from all available Devices. For selecting the fastest Device, the TFLOPs/s performance of the Device is estimated. For Nvidia and AMD GPUs, the estimate is challenging due to the different number of cores per CU depending on the microarchitecture and even GPU model: - AMD GCN, CDNA: 64 cores/CU - AMD RDNA, RDNA2: 128 cores/CU (dual CUs are reported as CUs in OpenCL) - Nvidia Kepler: 192 cores/CU - Nvidia Maxwell, Pascal, Ampere: 128 cores/CU - Nvidia P100, Volta, Turing, A100, A30: 64 cores/CU The vast majority of GPUs are captured with the correct estimate, but for some rare/old GPUs, the estimate could be wrong by a factor of 2. For CPUs without SMT/HT as well as for very old CPUs with IPC<32 or very new CPUs with IPC=64 (AVX-512), the estimate is wrong. Overall however, the estimated values are good enough to identify the fastest device in systems with one CPU and one or multiple GPUs.
66f643c to
fc64822
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added utility functions to automatically select the fastest Device or the Device with largest memory capacity from all available Devices.
For selecting the fastest Device, the TFLOPs/s performance of the Device is estimated. For Nvidia and AMD GPUs, the estimate is challenging due to the different number of cores per CU depending on the microarchitecture and even GPU model:
The vast majority of GPUs are captured with the correct estimate, but for some rare/old GPUs, the estimate could be wrong by a factor of 2.
For CPUs without SMT/HT as well as for very old CPUs with IPC<32 or very new CPUs with IPC=64 (AVX-512), the estimate is wrong.
Overall however, the estimated values are good enough to identify the fastest device in systems with one CPU and one or multiple GPUs.