开发者

How does NVAPI device IDs relate to CUDA device IDs?

开发者 https://www.devze.com 2022-12-19 00:21 出处:网络
I\'m working on getting a CU开发者_JS百科DA application to also monitor the GPU\'s core temp. That information is accessible via NVAPI.

I'm working on getting a CU开发者_JS百科DA application to also monitor the GPU's core temp. That information is accessible via NVAPI.

A problem is that I want to make sure I'm monitoring the same GPU as I'm running my code on.

However, there seems to be information suggesting that the device IDs I get from NvAPI_EnumPhysicalGPUs does not correspond to the ones used with SetDeviceId.

Could anyone clarify?


I saw an interesting discussion about it here.

As far as I can tell, these numbers don't have a direct correlation.


I test it in my computer with two NVIDIA GPUs GTX 550 ti.
The result is, there all information is the same, except for Bus ID.
So, in nvapi, use NvAPI_GPU_GetBusId, this will get an integer, like 1, 2,...
then, in cuda API, use cudaDeviceGetPCIBusId, this will get a string, like 0000:01:00.0.
compare the busID integer with the BusID String's second part,
you can get their relationship.

0

精彩评论

暂无评论...
验证码 换一张
取 消