How do NVAPI device identifiers relate to CUDA device identifiers?

I am working to ensure that the CUDA application also controls the GPU core tempo. This information is available through NVAPI.

The problem is that I want to make sure that I track the same GPU when I run my code.

However, it seems that there is information that the device identifiers that I get from NvAPI_EnumPhysicalGPUs do not match those used with SetDeviceId .

Can anyone clarify?

+7
c cuda
source share
2 answers

I saw an interesting discussion about this here .

As far as I can tell, these numbers have no direct correlation.

+1
source share

I am testing it on my computer with two NVIDIA GTX 550 ti GPUs.
As a result, all data is the same except for the bus identifier.
So, in nvapi use NvAPI_GPU_GetBusId, it will get an integer, for example 1, 2, ... then in the cuda API, use cudaDeviceGetPCIBusId, it will get a string, for example 0000: 01: 00.0.
compare the integer busID with the second part of the BusID String,
you can get their relationship.

0
source share

All Articles