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

CPU device unavailable creating context with debugger enabled


Hi everyone,

I am new to OpenCL and trying to setup the environment for CPU debugging. I followed the steps in the Intel OpenCL documents. After the CPU kernel debugger was enabled, I found that CPU device became unavailable for creating context.

CPU is: i7-6770HQ,

Device Driver is:

OpenCL version is: OpenCL C 2.0

Device version is: OpenCL 2.1 (Build 10)

Visual Studio: 15.9.1


The code related to create context is:

vector<Platform> platforms;
    cl_int err;
    err = Platform::get(&platforms); 

    if (err != CL_SUCCESS) {
        cerr << "Unable to get platforms." << endl;
        return -1;

    vector<Device> devices;
    err = platform[0].getDevices(CL_DEVICE_TYPE_CPU, &devices);
    if (err != CL_SUCCESS)
        std::cerr << "Unable to get devices. Error Code: " << err << std::endl;
        return -1;

    cl_context_properties properties[3] = { CL_CONTEXT_PLATFORM, (cl_context_properties)(platforms[0]()), 0 };
    Context context(devices, properties, NULL, NULL, &err);

    if (err != CL_SUCCESS)
        std::cerr << "Error Creating Context. Error Code: " << err << std::endl;
        int i;
        cin >> i;
        return -1;


Thank you very much

0 Kudos
0 Replies