2

I am trying to associate the OpenCL GPU devices with NVAPI devices which I get using NvAPI_EnumPhysicalGPUs in the Multi-GPU system.

The thing is, I can use clGetDeviceInfo with CL_DEVICE_VENDOR_ID which is always unique and it is the best way, and I can retrieve the vendor from the NvAPI_SYS_GetChipSetInfo. But it is not associated with the NvPhysicalGpuHandle which I get from NvAPI_EnumPhysicalGPUs. Is there any way to associate this?

Of course, I can just use name, but this is not good.

Etheryte
  • 24,589
  • 11
  • 71
  • 116
Vanya
  • 411
  • 1
  • 5
  • 21
  • How about `NvAPI_GPU_GetBusId` and friends? – user703016 Nov 25 '14 at 15:30
  • @ParkYoung-Bae i can use this on NVAPI side sure, but how do i get the Bus id in OpenCL? `clGetDeviceInfo` doesn't seem to have any definition to return the bus id in the documentation page. – Vanya Nov 25 '14 at 16:08

1 Answers1

0

There is a way to do it. In OpenCL there is a poor documented feature for some reason. You need to call clGetDeviceInfo with constant 0x4008 and it will give you the bus id for the following device handle.

cl_uint busID;
clGetDeviceInfo(device,0x4008,sizeof(cl_uint), &busID,NULL);
printf("%d",busID);

On NvApi side use NvAPI_GPU_GetBusId. Then you can associate the handles by comapring the buses.

Vanya
  • 411
  • 1
  • 5
  • 21