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?
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.