Results 1 to 2 of 2

Thread: Check OpenCL device version compatibility?

  1. #1
    Newbie
    Join Date
    Mar 2014
    Posts
    4

    Question Check OpenCL device version compatibility?

    My application is OpenCL 1.1 compatible and I want to check whether each of the device is compatible for that version. There are 2 ways for this:

    1. clGetDeviceInfo() ->CL_DEVICE_VERSION
    2. clGetPlatformInfo() ->CL_PLATFORM_VERSION


    I have following doubts:
    • I do not understand why method 1 is provided as method 2 seems the correct way to me?
    • Is it possible that the version given by the platform will not match with the version given by a device from the same platform?
    • What is clGetDeviceInfo::CL_DRIVER_VERSION for?
    • From all these options which one should I use to check if a device can run my OpenCL 1.1 code?

  2. #2
    Senior Member
    Join Date
    Oct 2012
    Posts
    105
    You should read the section "3.1.1 Platform Mixed Version Support" in the OpenCL Specification.

    1. There are three kinds of version:

    - Platform version: this gives the version of the OpenCL API available for all functions related to the host runtime. This covers nearly all the functions of the API except clGetDeviceInfo.

    - Device version: this defines the information that clGetDeviceInfo can query and the mimimum values the device must support. All this is described by the documentation of clGetDeviceInfo in the OpenCL Specification of the same device version.

    - OpenCL C version: this defines the highest version of the OpenCL C language that is supported by the device (in particular the built-in functions that are available).

    2. The driver version is only for information. Its value is vendor-dependent.

    3. For the device to run your code, you need to check the OpenCL C version to ensure that your kernel code can be compiled successfully for this device.
    You generally have to check with clGetDeviceInfo that the kernel can accept the parameters and the ranges you will pass.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •