Building An AMD HIP Stack From Upstream Open-Source Code
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.
Those interested in compiling your own AMD HIP stack can learn all the details via Nicolai's 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.
Those interested in compiling your own AMD HIP stack can learn all the details via Nicolai's how-to guide.
23 Comments