Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about "CUDA compute capability" #22

Open
folker85 opened this issue Apr 29, 2020 · 5 comments
Open

Question about "CUDA compute capability" #22

folker85 opened this issue Apr 29, 2020 · 5 comments

Comments

@folker85
Copy link

Hi!
Is there any way I can get information about "CUDA compute capability" information from gpu ?

Thanks.

@falahati
Copy link
Owner

For this you need to use CUDA Toolkit, specifically these functions:

https://docs.nvidia.com/cuda/cuda-driver-api/group__CUDA__DEVICE.html

As far as I know, NVAPI does not provide any useful information about CUDA devices; at least not via the public endpoints. The only thing remotely related is a boolean value indicating if the GPU is in TCC mode which is not very useful since in majority of setups GPUs are not in TCC mode.

If you use CUDA toolkit, then you should be able to find the relative GPU's handle from NVAPI (since they are different) by matching the PCI and BUS information if needed.

@falahati falahati self-assigned this Apr 29, 2020
@folker85
Copy link
Author

Sorry, I asked the question a little wrong.
I meant not a CUDA compute capability, but a GPU compute capability (this version number identifies the features supported by the GPU hardware and is used by applications at runtime to determine which hardware features and/or instructions are available on the present GPU.).
This topic reveals that I am looking for "SM version"
https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#compute-capability

I've found a property NvAPIWrapper.GPU.GPUArchitectInformation.TotalNumberOfSMs (throws exception with a Message = "NVAPI_NOT_SUPPORTED"). Maybe this is it?

@falahati falahati reopened this Apr 30, 2020
@falahati
Copy link
Owner

No, that one returns the number of shader pipelines/shader processing units.

Maybe this is the method you need:
https://docs.nvidia.com/gameworks/content/gameworkslibrary/coresdk/nvapi/group__dx.html#ga677d37443aa36ae012a939668a154316

To query these:
https://docs.nvidia.com/gameworks/content/gameworkslibrary/coresdk/nvapi/nvShaderExtnEnums_8h.html

If that's the case, no, not yet. None of DirectX methods are supported yet by this library since I didn't expect anyone using those. You can, however, add support for them easily if that's the case.

If this was in fact the method you needed, I will keep this issue open as a reminder.

@falahati
Copy link
Owner

Well, it seems that this method is, in fact, the ones most close to what you want (based on the link you provided). However, you then need to check the capabilities and find the right shader version correlated to it. So it should be a lot of work. I still suggest using the CUDA toolkit for this type of information since NVAPI does not concern itself with compute capabilities and barely provides limited information/functions for rendering. It is more or less concerned only about the driver settings and display settings.

@folker85
Copy link
Author

Thanks for the quick response!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants