![]() In the comments above, Robert Crovella also pointed to a GTC 2015 talk by Scott LeGrand, which I haven't had time to check out yet.Īs for accuracy, double-float has a representational precision of 49 (24+24+1) bits, compared with IEEE-755 double which provides 53 bits. I gave a brief overview of easily available literature on such methods in a recent posting in the NVIDIA developer forums. Instead one can use float computation, augmented by error compensating techniques, one of the oldest of which is the Kahan summation. Note that in various applications, full double-float arithmetic may not be necessary. x = tailĭblfloat mul_dblfloat (dblfloat x, dblfloat y) ![]() You can easily measure this yourself, in the context relevant to you, i.e. A reasonably conservative estimate may therefore be that double-float arithmetic performs at 1/20 the throughput of native float arithmetic. However, the instruction sequences for double-float operations also require temporary variables, which increases register pressure and can decrease occupancy. The addition requires around 20 float instructions. NVIDIA's double-double code supports the operations addition, subtraction, division, square root, and reciprocal square root.Īs you can see, the multiplication below requires 8 float instructions unary negation is absorbed into FMA. If you are a registered CUDA developer you can download double-double code from NVIDIA's developer website (log in at ) which is under BSD license, and rework it relatively quickly into double-float code. From previous analysis I believe the addition code given in the paper is correct, and that it avoids common pitfalls in faster but less accurate implementations (which lose accuracy when the magnitude of the operands is within a factor of two). For double-float addition code, I would point you to a paper by Andrew Thall as I do not have the time to code this up right now. I am showing a double-float multiplication below that takes full advantage of FMA (fused multiply-add) support on the GPU. You would want to inspect binary code with cuobjdump -dump-sass to get an accurate count.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |