Results 1 to 3 of 3

Thread: cl_khr_fp64 becoming an "optional core feature"

Hybrid View

  1. #1
    Newbie
    Join Date
    Jul 2013
    Posts
    5

    Question cl_khr_fp64 becoming an "optional core feature"

    Hi,

    I was just reading the OpenCL 1.2 specification and I noticed that between 1.1 and 1.2 the cl_khr_fp64 went from being an extension to an "optional core feature". From appendix F.2
    Double-precision is now an optional core feature instead of an extension.
    Out of curiosity what is the difference? Extensions to OpenCL are optional but an "optional core feature" is also optional so I don't really see what the difference is.

    Thanks.

  2. #2
    Newbie
    Join Date
    Jul 2013
    Posts
    10
    The difference is that you don't need to enable the extension via the compiler directive.

    Accordying to the spec, Section 9.1, if a developer wants to use an optional extension in his program, he has to provide a directive to the compiler to enable this extension:
    "#pragma OPENCL EXTENSION extension_name : behavior"
    So any kernel in OpenCL 1.1 which used Double-prescision, the developer had to include one of the following directives in the OpenCL program, otherwise the compiler should have failed to compile the code: "#pragma OPENCL EXTENSION cl_khr_fp64: enable" or #pragma OPENCL EXTENSION all : enable"

    In OpenCL 1.2, since it is optional, the directive is no longer needed. Yet, the developer needs to query CL_DEVICE_DOUBLE_FP_CONFIG and see that it's not NULL (if NULL, doubles are not supported)

    Hope it helps,
    Ofer.

  3. #3
    Newbie
    Join Date
    Jul 2013
    Posts
    5
    Thanks for the clarification.

Posting Permissions

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