How AMD Is Taking Standard C/C++ Code To Run Directly On GPUs
([LLVM] 4 Hours Ago
LLVM Cross-Compiling)
- Reference: 0001511756
- News link: https://www.phoronix.com/news/AMD-Standard-C-Code-GPUs
- Source link:
Back at the [1]2024 LLVM Developers' Meeting was an interesting presentation by AMD engineer Joseph Huber for how they have been exploring running common, standard C/C++ code directly on GPUs without having to be adapted for any GPU language / programming dialects or other adaptations.
Joseph Huber of AMD talked about how the GPU can be treated as a standard hosted target by porting the LLVM C library, compiler run-time, and C++ run-time to run on modern GPUs so in turn regular C/C++ code can be compiled to target the GPU without having to go the route of OpenMP, OpenACC, or any other vendor-specific languages.
In effect they are porting LLVM C/C++ run-times to work on GPUs via cross-compiling. This can work for NVIDIA GPUs as well but limitations imposed by NVIDIA's PTX intermediate format. There are also some open challenges around handling some functionality on GPUs.
In any event now that the [2]2024 LLVM Developers' Meeting videos have been published online, those wishing to learn more about this AMD effort can do so via YouTube:
There is also the [3]PDF slide deck that accompanies the video.
It's via this C/C++ toolchain for the GPU effort that they [4]ported DOOM to run entirely on the GPU and is further talked about in the presentation.
[1] https://www.phoronix.com/news/LLVM-2024-Meeting-Videos
[2] https://www.phoronix.com/news/LLVM-2024-Meeting-Videos
[3] https://llvm.org/devmtg/2024-10/slides/techtalk/Huber-A-CPlusPlus-Toolchain-for-Your-GPU.pdf
[4] https://www.phoronix.com/news/DOOM-ROCm-LLVM-Port
Joseph Huber of AMD talked about how the GPU can be treated as a standard hosted target by porting the LLVM C library, compiler run-time, and C++ run-time to run on modern GPUs so in turn regular C/C++ code can be compiled to target the GPU without having to go the route of OpenMP, OpenACC, or any other vendor-specific languages.
In effect they are porting LLVM C/C++ run-times to work on GPUs via cross-compiling. This can work for NVIDIA GPUs as well but limitations imposed by NVIDIA's PTX intermediate format. There are also some open challenges around handling some functionality on GPUs.
In any event now that the [2]2024 LLVM Developers' Meeting videos have been published online, those wishing to learn more about this AMD effort can do so via YouTube:
There is also the [3]PDF slide deck that accompanies the video.
It's via this C/C++ toolchain for the GPU effort that they [4]ported DOOM to run entirely on the GPU and is further talked about in the presentation.
[1] https://www.phoronix.com/news/LLVM-2024-Meeting-Videos
[2] https://www.phoronix.com/news/LLVM-2024-Meeting-Videos
[3] https://llvm.org/devmtg/2024-10/slides/techtalk/Huber-A-CPlusPlus-Toolchain-for-Your-GPU.pdf
[4] https://www.phoronix.com/news/DOOM-ROCm-LLVM-Port
aerospace