I have multiple GPUs, and they have the same name, such as "HD 7970". My program has multiple tasks, each task relate to a cl_device_id(for example, 3 GPUs and 6 tasks), at this time, the 6 cl_device_id are different pointer but they may be on the same physical GPU, however, I want to know for a certern task, which GPU I'm using now, Is there any way?
I thought that I could call clGetDeviceInfo to get the physical id for the gpu, or which pcie slot the gpu plugged in, but I didn't found these properties.
clGetDeviceIDs() always return cl_device_id for different GPU so you can index to them from 0 to N. on Linux you can use device topology extension for AMD which return PCI ids. you pass CL_DEVICE_TOPOLOGY_AMD to clGetDeviceInfo() and you get array of three in. but it work only on Linux.
Are you working on Windows or Linux? Linux support is already there, and Windows support can be prioritized in case many users need the feature.
Does the cl_device_id return from clGetDeviceIDs() is always the same? I mean that if I have 3 GPUs, the first time I call clGetDeviceIDs, then I index the 3 cl_device_ids, however, then I call the clGetDeviceIDs again, the 3 cl_device_ids are the same order with last time?
i have added your reference in the request for developing this feature. So far 3 different people have asked for it on forums