cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

bulkness
Journeyman III

Windows c# detecting OpenCL presence

I want to detect if a windows system supports opencl or not. I'm not sure of the best way to go about this. I'm also no looking for any extra libraries to use because my c# code doesn't need to actually USE opencl but just know if the system CAN use opencl or if the support is there atleast. Thanks.

Also I've use ManagementObjectSearcher and looked in Win32_VideoController but theres no mentioning of it that I see via that method. I figure you're the most likely to know how one would go about detecting opencl support even if you may not know how to do it in c# itself. Thanks again guys.

0 Likes
2 Replies
himanshu_gautam
Grandmaster

Can you give details about your system setup: What GPU, SDK , Driver version?

IMHO, you want to check if there are any OpenCL compliant devices available in your system. You should use clGetPlaformIds API for that.

Also please explain what you want to do by just detecting OpenCL. From C# perpective I guess there is a project that provided bindings for it.

0 Likes
himanshu_gautam
Grandmaster

You can possibly look at ICD mechanism. There are some registry entries set for the every platform installed on the system. Just probing the registry values would help.

HKEY_LOCAL_MACHINE\SOFTWARE\Khronos\OpenCL\Vendors  might be of help.

Check http://www.khronos.org/registry/cl/extensions/khr/cl_khr_icd.txt

OR Check the ICD Extension section in OpenCL extensions PDF.

0 Likes