ctk's picture

ATI Stream SDK 2.0 OpenCL and Double Precision

Has anyone else tried using the ATI Stream SDK 2.0 OpenCL with the experimental double-precision extension? I'm trying it on my CPU and using double precision is 650 times slower than using single precision (floats). That is REALLY not good. Is the double precision support in Nvidia's SDK better? Fast double precision support is absolutely critical for scientific computations.


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
nythrix's picture

What is the extension name for double support? I don't see any "cl_khr_fp64" on nVidia.
Nontheless, if you have a test at hand I can give it a try.

ctk's picture

Include: #pragma OPENCL EXTENSION cl_khr_fp64 : enable
in your OpenCL code to enable double precision support, if your drivers support it. Then you can use double, double2, double4, etc.... According to http://www.nvidia.com/content/cudazone/download/OpenCL/NVIDIA_OpenCL_Pro... some Nvidia cards do support double precision and the extension should be supported.

I was benchmarking my simulation I'm coding that gave me the 650 time slower speed, but I can't post that publicly. I will have to code a test demo.

nythrix's picture

It seems my card has no support for double.
It is an interesting topic, though. And this document crossed my browser while I was fiddling around with google:

AMD wrote:

20. Is the OpenCL double precision optional extension supported?
Double precision, an optional OpenCL 1.0 feature, is not supported in the current release of
OpenCL bundled with the ATI Stream SDK v2.0.

Maybe double is emulated and this is the reason for the performance drop?