Doble not working in device code! Is is not supported ?

Hi Folks,

I have a strange issue, I have written a simple matrix multiplication with a scalar value program, the matrix is of double type. Somehow it works in emulation mode but if the emulation switch is off during compilation it just doesn’t work.

I learned from the other post that double is not supported in device mode, so i changed my program to use all floats instead of doubles and it works fine with and without emulation mode.

So my question here is, is Double not supported in device code ? If so, are there any work around to get the doubles working in device code.


To use double precision, you need a compute capability 1.3 device (GTX 2xx, Tesla C1070/S1070, and some later Quadros), and you need to pass -arch sm_13 to nvcc. Otherwise, nvcc tries to convert your doubles to floats, and generally screws your the device code (as you found).

Hi Seibert,

I had GeForce GTX 280 card, yes you were right.

Using the flag -arch=sm_13 made the trick, doubles were working on it.