Hi, I have a 8800 GTS (G80) and I’m writing a kernel making use of double data type. I’m using 331.83 driver, and querying the OpenCL platform and device properties I get:
[InitCL] Found 1 platform(s):
[0] Name: NVIDIA CUDA
Version: OpenCL 1.1 CUDA 6.0.1
[InitCL] Found 1 device(s) on platform 0:
[0] Name: GeForce 8800 GTS
Type: 4
Extensions: cl_khr_byte_addressable_store cl_khr_icd cl_khr_gl_sharing cl_nv_compiler_options cl_nv_device_attribute_query cl_nv_pragma_unroll
Units: 12
When compiling my code containing doubles I get:
:16:3: error: must specify ‘#pragma OPENCL EXTENSION cl_khr_fp64: enable’ before using ‘double’
double tanAlpha;
^
I then enable the extension by means of:
#ifdef cl_khr_fp64
#pragma OPENCL EXTENSION cl_khr_fp64: enable
#endif
At this point I’d expect the compiler complaining about the missing extension (as it effectively does if I try to enable e.g. cl_amd_fp64), but instead the compilation ends with a CL_INVALID_BINARY error from cl::Program::build. So I’m a bit confused: if my hardware doesn’t support cl_khr_fp64 why I don’t get any error or warning when I try to enable it? Conversely, if it supports double data types then why I get the CL_INVALID_BINARY error?
Thanks.