Building An AMD HIP Stack From Upstream Open-Source Code

Written by Michael Larabel in Radeon on 9 February 2024 at 06:45 AM EST. 23 Comments
RADEON
While AMD ships pre-built ROCm/HIP stacks for the major enterprise Linux distributions, if you are using not one of them or just want to be adventurous and compile your own stack for building HIP programs for running on AMD GPUs, one of the AMD Linux developers has written a how-to guide.

Nicolai Hähnle has been a longtime AMD open-source Linux graphics driver developer and currently is employed by them to work on their LLVM-based AMDGPU shader compiler.

On his personal blog Hähnle has written a guide for building a HIP environment from scratch. This guide includes leveraging the upstream LLVM/Clang/LLD compiler sources, ROCm CMake files, and using the libhsa-runtime64.so library as the lowest-level host-side library of the ROCm stack. Plus building the libamdhip64.so library as the host-side HIP API support.

The guide then shows how you can use your newly-built Clang to compile a hello world example for targeting AMD HIP and running on the GPU.

ROCm open-source


Those interested in compiling your own AMD HIP stack can learn all the details via Nicolai's how-to guide.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week