OpenCL* for CPU
Ask questions and share information on Intel® SDK for OpenCL™ Applications and OpenCL™ implementations for Intel® CPU
This forum covers OpenCL* for CPU only. OpenCL* for GPU questions can be asked in the GPU Compute Software forum. Intel® FPGA SDK for OpenCL™ questions can be ask in the FPGA Intel® High Level Design forum.
1664 Discussions

Intel ocl SDK Beta 2014 with Nvidia GPU



Im using the Intel OpenCL SDK (integrated in Visual Studio 13) and Im experiencing problems when calling:

clGetDeviceIDs(m_platform_id, CL_DEVICE_TYPE_GPU, 0, NULL, &num_devices );

I get an error saying that num_devices is null. Is it so that my graphics card (NVIDIA GT 330m) lacks OpenCL 1.2 support? I checked this and it says that the OpenCL version installed is NVIDIAs 1.0 - is there a way to replace the device OpenCL from 1.0 to Intels 1.2? Or do I need to have an Intel GPU? 

The fact that I have to do vector-element acess like : velocity.s[0] = 0.1f; truly annoys me, to get the latest version with all the nice macros would be great - any ideas how to do this?


0 Kudos
3 Replies

Not sure I understand. Are you developing on a system with Nvidia that supports OpenCL 1.1 but targeting a system with 1.2 support? Or are you trying to run a 1.2 application on a 1.1 system?



@Raghu Muthyalampalli (Intel):

The latter, and yes I know how it sounds but I am pretty new to GPU programming. My graphics card vendor is Nvidia, when queried it tells me it has "opencl 1.0" installed... "but I have installed and am running Intel OpenCL 1.2? How can that be?" Well turned out that I was querying CL_DEVICE_TYPE_DEFAULT which in my case seems to be the CPU when running Intel's OpenCL and GPU once I switch to Nvidia platform. 

Now, I can call CL_DEVICE_TYPE_GPU using Nvidia as platform but it crashes using Intels, I suspect it has to do with the mismatch where the CPU has opencl 1.2 and device has 1.0.

So, my question is baisically - is there a workaround? is there some way that I can run Intels latest OpenCl on both device and GPU? See to me the GPU is like any other hardware on my machine, and as such - is it not possible to just install opencl 1.2 on it? 
I mean, there should be a bruteforce way to do it (my GPU is: NVIDIA GeForce 330m). 

Im asking this because up until now I thought I was running ocl 1.2 and just recently found out that in fact I did but on the CPU, and as 1.2 seems a lot neater in a lot of ways, well... I want it to work. Has Nvidia blocket me from doing this or have I missed some setup step? 

I could post some code if that would help?  


You must understand that the runtime comes from the vendor. In your case, the OpenCL cpu runtime comes from Intel, but the gpu runtime comes from Nvidia. If your gpu supports only 1.1 there is no way you can run apps built using 1.2 features. The best way to go about this is to query device capabilities (clGetDeviceInfo()) and take the appropriate path based on this information. Hope that helps.