OpenCL* for CPU
Ask questions and share information on Intel® SDK for OpenCL™ Applications and OpenCL™ implementations for Intel® CPU.
Announcements
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.
1722 Discussions

OpenCL SDK did not find CPU platform

Kolesnikov__Maksim
4,760 Views

Hello!

I have a problem with detection of CPU platform with Intel OpenCL SDK 2013 R3.

cl_device_id devices[10];
clGetDeviceIDs(platform_id, CL_DEVICE_TYPE_ALL, 10, devices, &num_devices);

returns only NVIDIA device and using CL_DEVICE_TYPE_CPU returns zero device. For my opinion this is wrong behavior because my CPU and GPU platforms are both declared as supported.

Here is details about my system:

CPU: Intel Core i7 4930k  (4th generation of i7 with SSE 4.2 and AVX, and marked as supported)
GPU: nVidia GTX 770
OS: Windows 8.1 Professional x64 (licensed, activated, clean install)
 

I have installed these SDKs:

1. Latest nVidia CUDA SDK (v5.5)
2. Intel OpenCL CPU-only runtime 2013 R3 x64
3. Intel OpenCL SDK 2013 R3 x64

I've balmed that in my VC++ project target patform is x86 and added manually intelopencl32.dll to Khronos/OpenCL/Vendors  registry - no effect.

Please, help with enabling OpenCL for CPU platform.

 

0 Kudos
1 Solution
Yuri_K_Intel
Employee
4,760 Views
Hi Maksim, Since you installed two OpenCL SDKs (NVidia and Intel) there are two platforms should be available. And most probably (since GPU device is found) you're passing NVidia platform_id to clGetDeviceIDs call. To get the CPU device you should correctly choose the Intel platform first. Use clGetPlatformInfo function with either CL_PLATFORM_NAME or CL_PLATFORM_VENDOR query. Thanks, Yuri

View solution in original post

0 Kudos
4 Replies
Raghupathi_M_Intel
4,760 Views

Maksim P. wrote:

I've balmed that in my VC++ project target patform is x86 and added manually intelopencl32.dll to Khronos/OpenCL/Vendors  registry - no effect.

Please, help with enabling OpenCL for CPU platform.

You are building a 32-bit application. The correct registry key should be Wow6432Node/Khronos/OpenCL/Vendors. But you shouldn't have to change that manually. Are you sure the installation was successful?

0 Kudos
Kolesnikov__Maksim
4,760 Views

I've checked  Wow6432Node/Khronos/OpenCL/Vendors and there is required key there. Just forgot that for 32-bit version keas are in Wow6432Node. Content of regustry seems good: 64 bit Intel DLL and nvidia in Khronos... and 32 bit intel and nvidia in Wow6332Node/Khronos... So I've removed unnecessary key that I created manually before. Installation was successful both for runtime and SDK.  Also I've checked these DLLs and they are present on disk.

To be sure I've removed Runtime and SDK, redownloaded them and reinstalled. All of these operations were successful, but still no effect and my CPU is not listed :(

0 Kudos
Yuri_K_Intel
Employee
4,761 Views
Hi Maksim, Since you installed two OpenCL SDKs (NVidia and Intel) there are two platforms should be available. And most probably (since GPU device is found) you're passing NVidia platform_id to clGetDeviceIDs call. To get the CPU device you should correctly choose the Intel platform first. Use clGetPlatformInfo function with either CL_PLATFORM_NAME or CL_PLATFORM_VENDOR query. Thanks, Yuri
0 Kudos
Kolesnikov__Maksim
4,760 Views

Hi, Yuri,

You are right, I've accidentally used only nVidia platform for searching devices. Strange, but on AMD platform with i7 920 I was able to find both CPU and Radeon devices.

Now I've fixed this and all is working fine.

CL_PLATFORM_NAME = NVIDIA CUDA
CL_PLATFORM_VERSION = OpenCL 1.1 CUDA 6.0.1
1 devices found
Device #0 name = GeForce GTX 770
        Driver version = 331.65
        Global Memory (MB):     2048
        Global Memory Cache (MB):       0
        Local Memory (KB):      48
        Max clock (MHz) :       1202
        Max Work Group Size:    1024
        Number of parallel compute cores:       8
        CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS:     3
CL_PLATFORM_NAME = Intel(R) OpenCL
CL_PLATFORM_VERSION = OpenCL 1.2
1 devices found
Device #0 name =        Intel(R) Core(TM) i7-4930K CPU @ 3.40GHz
        Driver version = 3.0.1.15216
        Global Memory (MB):     2047
        Global Memory Cache (MB):       0
        Local Memory (KB):      32
        Max clock (MHz) :       3400
        Max Work Group Size:    1024
        Number of parallel compute cores:       12
        CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS:     3

Thanx for good responsive support!

0 Kudos
Reply