Double precision on Quadro 6000

Hello everyone,

I am using a Quadro 6000 card to perform some general purpose computations and have two implementations of my code, one in OpenCL and the other using Cuda API. Some of my algorithms require sine and cosine trig functions and ideally, I would like all my input and output values to be double precision. I listed my questions below and was hoping someone could provide info -

  • Is double precision support for trig functions natively available for Quadro 6000 when using OpenCL and Cuda? Where can I find this info?

  • I know Quadro 6000 is a Fermi card, so I assumed double precision support for OpenCL is available natively. Was it a wrong assumption?

  • Is double precision support natively available when using Cuda for Quadro 6000 ?

  • If double precision support for trig functions is available for Cuda, is it safe to assume that OpenCL also supports it?

  • My previous OpenCL implementation had a ‘-cl-fast-relaxed-math’ build option turned on and I was able to get output even though I used double precision input to sine and cosine functions. When I changed the build option to ‘-cl-opt-disable’, I got a ‘CL_BUILD_FAILURE’ error at run time. Does ‘-cl-fast-relaxed-math’ option convert double precision to single precision at runtime?

Thanks in advance.
Vijay.

If cl_khr_fp64 is listed as an OpenCL extension for your GPU (check with GPU Caps Viewer), and you’ve enabled the extension as mentioned here, then yes.

The Quadro 6000 has a Compute Capability of 2.0, so double-precision floating-point operations are available, as well as OpenCL 1.1. But the OpenCL version plays no role regarding double precision support, because it’s available since OpenCL 1.0 as an extension, see above.

Yes, see above.

Yes, see above.

No, I don’t think so. But “-cl-fast-relaxed-math” implies “-cl-unsafe-math-optimizations”, which in turn implies “-cl-mad-enable”. The latter option are probably required for double precision to work due to missing non-MAD double precision instructions. But this is just a guess.