cancel
Showing results for 
Search instead for 
Did you mean: 

OpenCL

aj_guillon
Adept I

Unique ID of Device - CL_DEVICE_VENDOR_ID wrong on HD5970?

I'm currently looking at how to uniquely identify devices, in case the underlying implementation scrambles the order of the returned cl_device_ids from clGetDeviceIDs().  According to the spec, CL_DEVICE_VENDOR_ID should be a unique ID, so I would expect to be able to use this.  However, on the 5970 I get the value 4098 two times.  If the 5970 is to be recognized as two separate devices, then I would expect CL_DEVICE_VENDOR_ID to be different for each.

 

A bug?

0 Likes
Reply
6 Replies
aj_guillon
Adept I

Unique ID of Device - CL_DEVICE_VENDOR_ID wrong on HD5970?

Actually, the second device found was my CPU... and it shares the vendor ID which is even worse

0 Likes
Reply
rick_weber
Adept II

Unique ID of Device - CL_DEVICE_VENDOR_ID wrong on HD5970?

The vendor ID is a unique ID for the vendor, not the device and will be unique to each vendor, not necessarily each device. If you have a Radeon and an Opteron for example, they're both made by AMD. However, in my experience, once all your OpenCL SDKs are installed, platforms always appear in the same order and then devices always appear in the same order for a given machine. In either case, CL_DEVICE_NAME will give you the actual name of the device in a parseable string.However, this may not even be what you want since I believe it returns the family name (Evergreen for 5xxx series) and not the part number.

I assume you want to distinguish different types of devices. If you had two Radeon 5870s, you probably don't care which of them you number device 0 and 1, so long as they are labeled in a unique way.

0 Likes
Reply
nou
Exemplar

Unique ID of Device - CL_DEVICE_VENDOR_ID wrong on HD5970?

i can say that for example order of platform on linux depend on the filename of ICD registration in /etc/OpenCL/vendors. platform which ICD registration file is alphabetically first.

0 Likes
Reply
aj_guillon
Adept I

Unique ID of Device - CL_DEVICE_VENDOR_ID wrong on HD5970?

Right, what I require is a unique method of identifying devices that is independent of the process, and is deterministic.  I suppose I parsed the spec differently, since the example gave a PCIe ID, so I interpreted this as meaning that this is the device unique to the vendor (i.e. "this is the ID of the device unique to the vendor").  Instead, I guess this has been interpreted to say "this is the ID of the vendor of the device" which seems to be useful only to determine the vendor, which is covered by CL_DEVICE_VENDOR anyways.

I'll post to Khronos to seek clarification on the spec itself.  Further comments on how to get a unique ID that is compliant with the specification?

0 Likes
Reply
himanshu_gautam
Grandmaster

Unique ID of Device - CL_DEVICE_VENDOR_ID wrong on HD5970?

I think CL_DEVICE_VENDOR_ID is recommended while selecting a platform.

Once a platform is selected different devices of that platform can be grouped according to the CL_DEVICE_TYPE as CPU or GPU.

For GPU I get the NAme as Juniper( I don't think distinguishing two same GPUs is required) and CPU name returns AMD Athlon II x4. Is it not the case with you?

0 Likes
Reply
aj_guillon
Adept I

Unique ID of Device - CL_DEVICE_VENDOR_ID wrong on HD5970?

CL_DEVICE_VENDOR_ID gives something like 4098.  The issue has to do with uniquely identifying a particular device, so that independent processes can understand which device is which.

For instance, I might want to write a scheduler as a service, that knows which devices are occupied (to balance load).  Such a scheduler is going to run as a different process, and should be able to tell a worker process which device to use.  However, I do not see that there is any way to uniquely identify the device.  Furthermore, there is no way to guarantee the worker and balancer see devices in the same order or anything like that.

I have posted to Khronos here: http://www.khronos.org/message_boards/viewtopic.php?f=28&t=3449

0 Likes
Reply