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.
1719 Discussions

Subdevice Support on Intel i5-3427U Ivy Bridge?

Felix_M_
Beginner
323 Views

Hi all,

I am trying to divide my CPU into subdevices to solve a task parallel problem. Unfortunately I keep getting those CL_DEVICE_PARTITION_FAILED errors.

Here is what I tried:

    cl_platform_id platform_id = NULL;
    cl_device_id device_id = NULL;
    cl_device_id subdevice_id[4];
    cl_int ret;
    cl_uint ret_num_platforms;
    cl_uint ret_num_devices;
    
    // Get Platform and Device
    ret = clGetPlatformIDs(1, &platform_id, &ret_num_platforms);
    ret = clGetDeviceIDs(platform_id, CL_DEVICE_TYPE_CPU, 1, &device_id, &ret_num_devices);

    // Equally divide into two Subdevices with one execution unit each.
    cl_device_partition_property props[3] = {CL_DEVICE_PARTITION_EQUALLY, 1, 0};
    ret = clCreateSubDevices(device_id,
                             props,
                             2,
                             subdevice_id,
                             &ret_num_devices);
    
    // Did it work?
    if (ret == CL_DEVICE_PARTITION_FAILED) printf("CL_DEVICE_PARTITION_FAILED");

When I use clGetDeviceInfo to query for the OpenCL C Version of the CPU device I get "Open CL C 1.2". So as far as I understand the OpenCL 1.2 specification, subdevices should be supported. Nevertheless when I query for CL_DEVICE_PARTITION_MAX_SUB_DEVICES I get a 0. I am using an Intel i5-3427U CPU (shows 4 Execution Units). The CPU is the one that is build in the 13" Macbook Airs from 2012. As I am on Mac OS X 10.9.2 and XCode 5.1. I don't use the Intel SDK. I thought of asking here anyways, as it is an Intel CPU.

Am I missing something, or are subdevices just not supported on my CPU yet?

Any help appreciated, thank you.

0 Kudos
1 Reply
Dmitry_K_Intel
Employee
323 Views

So you are talking about Apple OpenCL platform. I propose you to ask your question on Apple forum https://developer.apple.com/opencl/

0 Kudos
Reply