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

OpenCL support for Skylake

Jan_T_
Beginner
247 Views

Hello All,

I ​downloaded opencl_runtime_16.1.1_x64_sles_6.4.0.25 and linked my application directly with libintelocl.so. Running on SkyLake nodes detect the following devices:

Platform 0:
    Device 0:
      CL_DEVICE_NAME: Intel(R) Xeon(R) Gold 6148 CPU @ 2.40GHz
      CL_DEVICE_VENDOR: Intel(R) Corporation
      CL_DEVICE_PROFILE: FULL_PROFILE
      CL_DEVICE_VERSION: OpenCL 2.0 (Build 475)
      CL_DRIVER_VERSION: 1.2.0.475
      CL_DEVICE_OPENCL_C_VERSION: OpenCL C 2.0
      CL_DEVICE_EXTENSIONS: cl_khr_icd cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_byte_addressable_store cl_khr_depth_images cl_khr_3d_image_writes cl_intel_exec_by_local_thread cl_khr_spir cl_khr_fp64 cl_khr_image2d_from_buffer

When I try to select the CPU device with the following commands

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

        std::vector<cl::Device> device_list;
        err = platforms[0].getDevices(CL_DEVICE_TYPE_CPU, &device_list);

        device_ = device_list[0];
        devices_.push_back(device_); // NOTE: just one device is used here
        err = device_.getInfo(CL_DEVICE_TYPE, &device_type_);

        cl_context_properties cps[] = { CL_CONTEXT_PLATFORM, (cl_context_properties)(platforms[0])(), 0 };

        context_ = cl::Context(devices_, cps, nullptr, nullptr, &err);
        error_handler(err, "cl::Context()");

the following error is reported

OpenCL error: cl::Context() returned Device Not Available

Is there a mistake or did  I forget something to set? The same code works fine on BroadWell nodes.

thank you for your help,

Jan

 

0 Kudos
0 Replies
Reply