OpenCL support for double precision for 8800 GTS (G80)

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.

The 8800 GTS does not support double precision, which was introduced with the Tesla architecture (the Geforce 200 series).

Thanks, that was also my best guess. Still I don’t understand why the compiler does not complain about the missing cl_khr_fp64 extension if it isn’t available for my hardware. Compilation crashes with a simple CL_INVALID_BINARY error and it took me some time to figure that the problem was related to double precision. Even the #ifdef cl_khr_fp64 check is passed. Is it the intended behavior or a small compiler bug?