Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OpenCL: get PCIe Bus for Intel GPU

Tags:

intel

opencl

Question: Is there any (Vendor-Specific) way to get the PCIe Bus of a Intel Graphic-Card ( or to get any other unique-id for Intel GPU (uniqueness per vendor)).

I know i can't get such information without using Vendor-Specific-Extensions. I know for AMD that with cl_amd_device_topology, i can get this information. And for NVIDIA, i can get it with cl_nv_device_attribute_query and CL_DEVICE_PCI_BUS_ID_NV.

like image 792
user1235183 Avatar asked Nov 10 '22 13:11

user1235183


1 Answers

I am not sure if this is the answer you are looking for, but if working specifically with Intel GPUs on Linux using Beigenet platform, then for most (not all, I believe Cherryview is an exception), the CL_DEVICE_VENDOR_ID returned using clGetDeviceInfo maps to PCIID of the GPU. See here for the implementation and here for the mapping.

Using the standard Intel drivers on other platforms would require you to match the CL_DEVICE_NAME with output from either sysfs or pciutils on Linux, and Win32_DisplayControllerConfiguration.Caption and Win32_Bus.DeviceID on Windows.

like image 68
Appleman1234 Avatar answered Dec 05 '22 20:12

Appleman1234