none
Cuda and C++ AMP double precision

    Question

  • 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 http://www.herikstad.net/2009/05/cuda-and-double-precision-floating.html in order to have support of double-precision floating-point math.

    Moreover reading this http://techreport.com/articles.x/19619 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

    Stefano

    Tuesday, March 27, 2012 4:46 PM

Answers

  • Hi Stefano

    You mentioned precise_math namespace, so please make sure you have read our blog post on the math library: http://blogs.msdn.com/b/nativeconcurrency/archive/2012/02/08/math-library-for-c-amp.aspx

    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: http://blogs.msdn.com/b/nativeconcurrency/archive/2012/02/07/double-precision-support-in-c-amp.aspx

    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.

    Cheers
    Daniel


    http://www.danielmoth.com/Blog/

    Wednesday, March 28, 2012 6:31 PM

All replies