Bug 90308 - cl_khr_fp64 assumed by default in OpenCL 1.2
Summary: cl_khr_fp64 assumed by default in OpenCL 1.2
Status: RESOLVED NOTABUG
Alias: None
Product: Beignet
Classification: Unclassified
Component: Beignet (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Zhigang Gong
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-05 03:28 UTC by ilia
Modified: 2015-05-16 20:49 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description ilia 2015-05-05 03:28:07 UTC
While clinfo shows
  Platform Name                                   Intel Gen OCL Driver
  Platform Vendor                                 Intel
  Platform Version                                OpenCL 1.2 beignet 1.1 (git-83f8739)
  Platform Profile                                FULL_PROFILE
  Platform Extensions                             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_spir cl_khr_icd
  Platform Extensions function suffix             Intel

It won't to compile an kernel with naive double usage.
/tmp/mw7NyE.cl:12:69: error: use of type 'double' requires cl_khr_fp64 extension to be enabled

Same time khronos.org doesn't shows cl_khr_fp64 extension available for OpenCL 1.2 platform - seems like it assumes to be enabled by default.
https://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/EXTENSION.html
https://www.khronos.org/registry/cl/sdk/1.2/docs/man/xhtml/EXTENSION.html

It's not a problem for me to enable it, by I have to use pyopencl that generates kernels on fly with this define
#if __OPENCL_C_VERSION__ < 120                        
#pragma OPENCL EXTENSION cl_khr_fp64: enable
#endif
Comment 1 Rebecca Palmer 2015-05-16 20:49:28 UTC
This is not a bug; OpenCL 1.2 made double precision an *optional* core feature, which beignet doesn't support because until Broadwell the hardware didn't: http://lists.freedesktop.org/archives/beignet/2015-March/005311.html

(Optional core features are automatically enabled when available, while extensions require an explicit #pragma, hence that pyopencl #ifdef.)


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.