Cuda and C++ AMP double precision


  • Dear all

       I have a question regarding double precision in C++ AMP. I have an NVIDIA GTS 450, and two version of the same program, one in CUDA and the other one in C++ AMP. The C++ AMP version, in the case I use double precision just crash, with float it is working. This is reasonable because the video card should not support the double precision.

    The CUDA version is working with double,without problems. I compile using what they suggest here in order to have support of double-precision floating-point math.

    Moreover reading this it seems that my videocard can process double-precision floating-point math, and with CUDA does.

    Why is not possible with C++ AMP?

    Thanks a lot for your help


    Tuesday, March 27, 2012 4:46 PM


  • Hi Stefano

    You mentioned precise_math namespace, so please make sure you have read our blog post on the math library:

    I am sorry that the double precision situation is still not clear to you; I know it is not as straightforward as I would like it to be, at this moment in time.

    Based on what you wrote, I suspect that you have a WDDM 1.1 driver and that your card supports_limited_double_precision. Can you please confirm that the property returns true? Again, the way to do that, and the double precision situation for C++ AMP (please note that CUDA is totally irrelevant within this context so none of those links or documentation will help), is described here:

    If you can confirm that it supports limited double precision, then all you need is a WDDM 1.2 driver, and you will be able to get full double precision. The only issue, at this moment in time during the Beta period, is that you need to run your tests on Windows 8 (or Windows Server 8). I expect the hardware vendors to have WDDM 1.2 drivers for Windows 7 (and Windows Server 2008 R2) before C++ AMP ships.

    Please feel free to post follow up questions if you have them, we are always happy to help.


    Wednesday, March 28, 2012 6:31 PM

All replies