28877

Precision and Performance Analysis of C Standard Math Library Functions on GPUs

Anton Rydahl, Joseph Huber, Ethan Luis McDonough, Johannes Doerfert
Center for Applied Scientific Computing, Lawrence Livermore National Laboratory, Livermore, California, USA
Proceedings of the SC ’23 Workshops of The International Conference on High Performance Computing, Network, Storage, and Analysis (SC-W ’23), 2023

@inproceedings{rydahl2023precision,

   title={Precision and Performance Analysis of C Standard Math Library Functions on GPUs},

   author={Rydahl, Anton and Huber, Joseph and Mcdonough, Ethan Luis and Doerfert, Johannes},

   booktitle={Proceedings of the SC’23 Workshops of The International Conference on High Performance Computing, Network, Storage, and Analysis},

   pages={892–903},

   year={2023}

}

Download Download (PDF)   View View   Source Source   

577

views

With the advent of GPU computing, executing large program sections on accelerators has become increasingly important. Efforts are being made to support the C standard library, LIBC, on GPUs via LLVM machinery. Therefore, the C standard math library, LIBM, must be supported on GPUs. So far, LLVM frontends, such as Clang, have relied on GPU vendor implementations of LIBM functionality wrapped into (mostly) LIBM-compatible forwarding functions. We propose a novel LIBM for GPUs reusing a collection of LLVM target-agnostic implementations and built-ins alongside vendor implementations of most single and double-precision floating point math functions. Our approach allows selecting between individual implementations based on the GPU target as opposed to the current approach, which serves only the single third-party library implementation. Our extensive numerical analysis highlights the various implementations’ differences in performance and precision. Our solution allows users to choose the implementation that maximizes speed while meeting their specific precision requirements.
No votes yet.
Please wait...

Recent source codes

* * *

* * *

HGPU group © 2010-2024 hgpu.org

All rights belong to the respective authors

Contact us: