Differentiating between multiple devices in the same machine
I'm writing code to work across multiple devices. For informational purposes I would like to write something along the lines of "Launching kernel to Tesla C1060 (1)" and "Launching kernel to Tesla C1060 (2)" where the numbers can be used to tell the difference between devices. However, from the OpenCL API I don't see a way to query a device for any unique identifier specific to it in a given machine.
The only thing I can think of is assigning the number based upon it's location when returned by clGetDeviceIDs. Though it would be preferable (for abstraction purposes) if there was something I query with clGetDeviceInfo.
Re: Differentiating between multiple devices in the same machine
I've used the position in the returned array in the past. There is a vendor ID value in there, but in my experience it's the same for two same-type cards.