0
votes

nVIDIA's CUDA has the concept of Compute Capability, under which it bunches together a host of important feature flags and numeric parameters. On the OpenCL side, I know about clGetDeviceInfo, but the set difference between what CUDA CC definitions cover and what clGetDeviceInfo provides seems to be quite significant. Also, I don't really tables published by Intel or AMD with the clGetDeviceInfo values for their successive discrete or integrated GPUs.

Is there some other mechanism OpenCL devices publish information about themselves (perhaps not standardized)? And where can I find the equivalent of the Compute Capability table for non-nVIDIA GPUs?

1
Compute capability is NVIDIA's proprietary way of classifying their hardware. You can check device name and maintain your own table mapping this to devices' features.void_ptr
@void_ptr: How can I do that, exactly, unless I have a copy of each GPU on the market over the last 8 years or so? And cases, boards, etc. to match? Don't other vendors publish comparable data somehow?einpoklum
Yes, pretty much. It's all vendor-specific and you'd have to search for this information. That's what you get for working with a vendor-agnostic API.void_ptr
What is the problem? clGetDeviceInfo provides different information compared to CUDA, but provides all the needed information regarding OpenCL. Is there something special you want to query at runtime that you can't in OpenCL?DarkZeros

1 Answers

3
votes

NVIDIA provides the cl_nv_device_attribute extension that lets you query the compute capability. PyOpenCL has a nice list of device properties, including AMD and NVIDIA extensions, here.