cancel
Showing results for 
Search instead for 
Did you mean: 

OpenCL

sp314
Adept II

The values returned by clGetDeviceInfo() and clGetPlatformInfo() seem to be just a little off. Why?

I've got Ubuntu Linux 16.04 with ROCm and AMDGPU-PRO drivers, and an R290x card, which is the only GPU I have on this computer. When I query the device name with clGetDeviceInfo(...CL_DEVICE_NAME...), for some reason, it returns Hawaii, but when I query the number of compute units, it returns 44. Shouldn't Hawaii be Tahiti in this case?

FWIW, clGetPlatformInfo(...CL_PLATFORM_NAME...) returns AMD Accelerated Parallel Processing, and clGetPlatformInfo(...CL_PLATFORM_VERSION...) returns OpenCL 2.0 AMD-APP (2482.3).

Also, when I run clinfo, it reports the board name as a very nice and descriptive AMD Radeon R9 200 Series string, and if I plug this card into a Windows 10 PC and run GPU-Z, it will report R290 as well. Why not 290x, and how can I get the board name with OpenCL anyway?

So, I'm a bit confused. My big question is, how do I get the exact name/model of the card using OpenCL? I suppose I could go through all the cards and build a table that maps the device name combined with the number of compute units to the card name, but perhaps there's a nicer way, or maybe this table already exists somewhere?

Needless to say, and given the nature of this forum, this only needs to work on AMD hardware in my case.

0 Likes
2 Replies
dipak
Big Boss

You can query the board name through AMD specific parameter  "CL_DEVICE_BOARD_NAME_AMD" (cl_ext.h).

Actually, what you are looking for is commercial or marketing names. You won't get this information directly via clGetDeviceInfo.  However, many cases you can deduce it from combination of multiple parameters such as device name, broad name and no. of compute units (CUs). For example, R9 290 and R9 290X both are Hawaii based but having different no. of CUs. So, looking at those parameters, you can identify it as Hawaii Pro(R9 290) or Hawaii XT (R9 290X).

List of AMD graphics processing units - Wikipedia contains all these information that you are looking for.

Note: The device configuration indicates no. of cores/shaders instead of no. of CUs. To get the no. of CUs, just divide the number by 64.

Regards,

Awesome, thanks, dipak!

0 Likes