cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

ckolivas
Journeyman III

Can opencl devices be correlated via the ADL?

I have basically 3 questions about iterating devices in both opencl and via the ADL.

I maintain software that uses opencl for sha calculations (cgminer https://github.com/ckolivas/cgminer ). It also uses the ATI Display Library to keep track of temperatures, fan speeds etc. I am unable to find a way of correlating devices returned by the opencl code and those returned by the display library. I iterate over them and correlate them entirely by the order they appear in the respective code. This mostly works, but with the opencl code I get two devices if two monitors are connected to one GPU, whereas the ADL returns only one. I also cannot discriminate dual GPU cards (like the 6990) from two separate GPUs.

First question:

1. Using clGetDeviceIDs is there a way to only return discrete physical devices?

clGetDeviceIDs(platform, CL_DEVICE_TYPE_GPU, 0, NULL, &numDevices);

This returns 2 devices if a GPU is connected to two monitors and clGetDeviceInfo gives no distinguishing info to tell us they're virtual devices belonging to the same physical device as far as I can tell.

2. Is there a way to correlate devices returned by by the opencl code and those returned by the ADL?

ADL_Adapter_AdapterInfo_Get (lpInfo, sizeof (AdapterInfo) * iNumberAdapters)

None of the values in the AdapterInfo struct appear to correlate with those returned by the cl code.

3. Is there a way to detect that two unique devices returned by the ADL are actually one physical dual GPU device?

ADL_Adapter_AdapterInfo_Get returns values for the two GPUs that for all intents could be separate devices

ADL_Overdrive5_ThermalDevices_Enum returns 0 for iDomainIndex for the ADLThermalControllerInfo struct.

Thanks in advance.

0 Likes
2 Replies
ckolivas
Journeyman III

I'm going to assume no one has an answer to this given the stunned silence.

I could find a soft solution for number 3 above  - if you have two devices that read identical name strings that are precisely one bus adapter id apart, where one has fanspeed detection/control and the other does not, they are likely to be twins. Parsing for 5900 or 6990 in the name string increases the probability even further. Note all this is circumstantial evidence and I wish there was a unified identifier between the two.

The other questions I have yet to find a solution to. The lack of anything correlating opencl devices and ADL adapters seems unworkable.

0 Likes

This question still stands, and even with ADL v4 SDK and OpenCL 1.2 I still do not see a way to reliably correlate the OpenCL devices with the ADL reported devices.

0 Likes