warning : Double is not supported. Demoting to float Compiling SDK example code.

Hi Guys,

I wonder if the compiling a double value is truly double type.

Here’s an sdk exmaple ‘Mandelbrot’, I compile it in 64 bit machine w/ 64bit gcc. I got this warning:

make -C src/Mandelbrot/
make[1]: Entering directory `/home/skchoe/local/CUDA_SDK/C/src/Mandelbrot’
ptxas /tmp/tmpxft_00001996_00000000-2_Mandelbrot_sm11.ptx, line 1796;
warning : Double is not supported. Demoting to float

How to I detect my gcc compiler is not supporting Double, and how to check the output value is float?

Thank you.

S.

If you want double precision, you must tell nvcc to compile to the sm_13 architecture target, and run the resulting code on a compute 1.3 capable card. Then genuine IEEE 754 double precision is used. Older hardware has no double support, and everything is demoted at compile time to single precision. That is the warning you are seeing.

Thanks Avidday,

http://forums.nvidia.com/index.php?showtopic=82651
is so helpful how to work with sm_…

But it doesn’t seem that my card doesn’t support double. It is Geforce 8400 GT. I have 8600GTS but I wonder the card
is old too. Which card supports double well?

Thanks,

S.

GT200 based cards - GTX260/275/280/285/295, Telsa C1060, Telsa S1070, Quadro FX5800. The new Fermi based cards will also support double precision. Neither of your cards do, however.

Oh the answer is GTX series:

http://en.wikipedia.org/wiki/CUDA#Limitations says:
For double precision (only supported in newer GPUs like GTX 260[12]) there are some deviations from the IEEE 754 standard: round-to-nearest-even is the only supported rounding mode for reciprocal, division, and square root. In single precision, Denormals and signalling NaNs are not supported; only two IEEE rounding modes are supported (chop and round-to-nearest even), and those are specified on a per-instruction basis rather than in a control word; and the precision of division/square root is slightly lower than single precision.

So the original warning was new to me since the release of GTX series.

S.