How to match OpenCL devices with a specific GPU given PCI vendor, device and bus IDs in a multi-GPU system? -
I would like to be able to match with GPU with OPCL devices in the system on multi-GPU systems identified by PCI ID . / P>
For example, if I have a system with many GPUs, possibly from different vendors, I can list the devices by enumerating the PCI bus, it gives me PCI vendor, device and bus ID I use any of these (GPU) PCI tools for OpenCL computation based on certain selection criteria, so how can I match it to OpenCL device?
I have ClGetDeviceIDs () in OPCL but there is no clear way to match OpenCL devices for PCI devices. The OpenCL function provides access to clGetDeviceInfo () PCI vendor ID and device name but does not have a PCI device or simply ID. I can try to match the PCI device name with the name of OpenCL device, but it is possible that you have the same type of device and the names are not always the same. Why is this necessary? Say I know that something else is going on program X CUDA or GPU. I also want to avoid using GPU for OpenCL operation so that I can select GPU B. Then I would have to find out that OpenCL device is GPU A and GPU B PCI ID seems to be the only consistent and cross-platform way to identify GPU devices. Btw, CUDA APIs give you PCI, Bus and Slot ID (CU_DEVICE_ATTRIBUTE_PCI_BUS_ID, CU_DEVICE_ATTRIBUTE_PCI_DEVICE_ID), but CUDA only works with NVidia device Ideally I need a solution using C or C ++. The way to do this is to use two vendor-specific extensions for AMD, you CL_DEVICE_TOPOLOGY_AMD which works on Windows and Linux and will return the PCIE bus ID, which is unique to a GPU, on NVIDIA, query the device for CL_DEVICE_PCI_BUS_ID_NV Also see: < / Div>
Comments
Post a Comment