On Wed, 2021-06-02 at 22:11 -0700, Ahmad Khalifa wrote: > How to send a job to a particular gpu card using its ID > (0,1,2...etc)?
If your GPUs are CUDA I can't help but, if you have OpenCL GPUs then your program can select a GPU with a call to getDeviceIDs() and select the GPU by number. Starting from OpenCL 3.0.7 it is also possible to select the GPU by serial number or UUID. Here I repeat my last message to this list: It is now possible for programs to do a precise and reliable selection of the GPU by first issuing a query to OpenCL with the clGetDeviceInfo() function with the param_name parameter set to cl_khr_pci_bus_info. This extension is available starting from OpenCL 3.0.7 References: - https://github.com/KhronosGroup/OpenCL-Registry/blob/master/specs/3.0-unified/pdf/OpenCL_Ext.pdf Chapter 39. PCI Bus Information Query - https://www.khronos.org/registry/OpenCL/sdk/1.0/docs/man/xhtml/clGetDeviceInfo.html - https://www.khronos.org/registry/OpenCL/sdk/1.0/docs/man/xhtml/clGetDeviceIDs.html - https://www.khronos.org/registry/OpenCL/sdk/1.0/docs/man/xhtml/clGetPlatformIDs.html