Search code examples
openclgpgpu

OpenCL Device Vendor Ids


The OpenCL clGetDeviceInfo function returns a device vendor identifier when called with CL_DEVICE_VENDOR_ID. For CL_DEVICE_VENDOR_ID, the OpenCL spec states: "A unique device vendor identifier. An example of a unique device identifier could be the PCIe ID".

On this system, the Intel and AMD GPUs are both returning their PCIe ID (0x8086 and 0x1002 respectively. So, the question is: do all OpenCL devices return their PCIe IDs as their "unique device vendor identifier"? If so, are the PCIe vendor IDs listed in a header file somewhere?


Solution

  • do all OpenCL devices return their PCIe IDs

    The answer is no. It's very easy on x86 where you're almost guaranteed to have a PCI bus, and only 3 possible vendors; but in the ARM world, many (most?) don't have a PCI bus at all, and there is no official way to get any sort of vendor ID (at least AFAIK).