<html dir="ltr"><head></head><body style="text-align:left; direction:ltr;"><div>On Wed, 2021-06-02 at 22:11 -0700, Ahmad Khalifa wrote:</div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><div dir="auto">How to send a job to a particular gpu card using its ID (0,1,2...etc)?</div>
</blockquote><div><br></div><div><br></div><div>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.</div><div>Starting from OpenCL 3.0.7 it is also possible to select the GPU by serial number or UUID.</div><div><br></div><div>Here I repeat my last message to this list:</div><div><br></div><div><span style="font-family: monospace; white-space: normal;">It is now possible for programs to do a precise and reliable selection</span></div><div><span style="font-family: monospace; white-space: normal;">of the GPU by first issuing a query to OpenCL with the</span><br style="font-family: monospace; white-space: normal;"><span style="font-family: monospace; white-space: normal;">clGetDeviceInfo() function with the param_name parameter set to</span><br style="font-family: monospace; white-space: normal;"><span style="font-family: monospace; white-space: normal;">cl_khr_pci_bus_info. This extension is available starting from OpenCL</span><br style="font-family: monospace; white-space: normal;"><span style="font-family: monospace; white-space: normal;">3.0.7</span><br style="font-family: monospace; white-space: normal;"><br style="font-family: monospace; white-space: normal;"><span style="font-family: monospace; white-space: normal;">References:</span><br style="font-family: monospace; white-space: normal;"><br style="font-family: monospace; white-space: normal;"><span style="font-family: monospace; white-space: normal;">- </span><br style="font-family: monospace; white-space: normal;"><a href="https://github.com/KhronosGroup/OpenCL-Registry/blob/master/specs/3.0-unified/pdf/OpenCL_Ext.pdf" class="evo-awrap" style="white-space: normal; font-family: monospace;">https://github.com/KhronosGroup/OpenCL-Registry/blob/master/specs/3.0-unified/pdf/OpenCL_Ext.pdf</a><br style="font-family: monospace; white-space: normal;"><span style="font-family: monospace; white-space: normal;">Chapter 39. PCI Bus Information Query</span><br style="font-family: monospace; white-space: normal;"><br style="font-family: monospace; white-space: normal;"><span style="font-family: monospace; white-space: normal;">- </span><br style="font-family: monospace; white-space: normal;"><a href="https://www.khronos.org/registry/OpenCL/sdk/1.0/docs/man/xhtml/clGetDeviceInfo.html" class="evo-awrap" style="white-space: normal; font-family: monospace;">https://www.khronos.org/registry/OpenCL/sdk/1.0/docs/man/xhtml/clGetDeviceInfo.html</a><br style="font-family: monospace; white-space: normal;"><br style="font-family: monospace; white-space: normal;"><span style="font-family: monospace; white-space: normal;">- </span><br style="font-family: monospace; white-space: normal;"><a href="https://www.khronos.org/registry/OpenCL/sdk/1.0/docs/man/xhtml/clGetDeviceIDs.html" class="evo-awrap" style="white-space: normal; font-family: monospace;">https://www.khronos.org/registry/OpenCL/sdk/1.0/docs/man/xhtml/clGetDeviceIDs.html</a><br style="font-family: monospace; white-space: normal;"><br style="font-family: monospace; white-space: normal;"><span style="font-family: monospace; white-space: normal;">- </span><br style="font-family: monospace; white-space: normal;"><a href="https://www.khronos.org/registry/OpenCL/sdk/1.0/docs/man/xhtml/clGetPlatformIDs.html" class="evo-awrap" style="white-space: normal; font-family: monospace;">https://www.khronos.org/registry/OpenCL/sdk/1.0/docs/man/xhtml/clGetPlatformIDs.html</a><br style="font-family: monospace; white-space: normal;"><br style="font-family: monospace; white-space: normal;"></div></body></html>