I really dont know what you mean by CAL
Let us say You enumerate through CAL and OpenCL and have 2 sets.
Take an intersection of them and remove it from CALSET --- then you have pure CAL device set.
So, the question now boils down to finding a common property.
I think "devce name" in OpenCL has a "unique Id" associated with it....
May be, if that unique ID can be obtained in both CAL and OpenCL enumeration -- you can solve this.
Just my few cents. Feel free to Ignore..
One another proprty that you can look at is "PCI Enumeration" -- Bus / Slot/ Function
This can identify only 1 device.
If we can get this information through OpenCL an CAL -- we can do this very easily.
I am not sure, if I can get these details through OpenCL though...It would be good to have though.
Did you get to solve your problem?
I just noticed this in the "clinfo" output. It is able to specify PCIe topology.
Not sure where it gets this info from. This can come handy used to segregate your devices
Platform Name: AMD Accelerated Parallel Proces
Number of devices: 2
Device Type: CL_DEVICE_TYPE_GPU
Device ID: 4098
Board name: AMD Radeon HD 7900 Series
Device Topology: PCI[ B#1, D#0, F#0 ]
Looks like "'CL_DEVICE_TOPOLOGY_AMD'" is the property that you need to query for in clGetDeviceInfo() API to get the PCI topology.
This is currently supported only under Linux.
You can find more information in the AMD APP OpenCL Programming Guide - Appendix A
I think the problem is on the CAL side. As I know, from CAL you can't get any info that you can use for the identification of an OCL device neither an ADL (Amd Display Lib) device.
(ADL and OCL devices could be 'matched' though, because ADL can report pci topology stuff too.)
One another forum user (6bolt) is also going through a similar problem....
He is going to try a new experiment.... I thought it is probably worth sharing it here...
He is going to populate some memory area through DirectX (which allows PCIe enumeration) and find out OpenCL device which is able to see the memory changes (or something on those lines).
I have asked 6bolt to report any success with his experiments... May be, it might be useful to Raistmer.