This repository hosts a collection of Arch Linux PKGBUILDs for the AMD ROCm Platform. These scripts implement a great portion of the stack, ranging from low-level interfaces, over compilers to high-level application libraries.
The Arch Linux packages for ROCm are available on the
AUR.
Since many packages will be installed, it is recommended to use an
AUR helper
like paru
.
It is also recommended to use the
arch4edu
binary repository as it will greatly speed up your installation time.
For directions see Add arch4edu to your Archlinux.
WARNING Currently,
arch4edu
is out of sync see this discussion.
To install ROCm, use
paru -S rocm-hip-sdk rocm-opencl-sdk
which includes the low-level components and compilers, utilities like rocminfo
and GPU-accelerated math libraries. See the
documentation
for an overview on the available meta packages.
WARNING It is strongly recommended to remove all ROCm components when updating to a new release. Otherwise, building the packages with
paru
may have unwanted side effects resulting in build errors. If it's a small release with only a few updated packages, consider building them in a clean chroot.One way to mitigate these issues is to use the binary versions of the packages provided by arch4edu.
ROCm stack comprises around 50 packages including a fork of LLVM.
Therefore, building all packages from source can take a long time and can use a lot of RAM.
If you are experiencing the latter when building rocm-llvm
set the number of threads for its compilation via the environment variable NINJAFLAGS
,
export NINJAFLAGS="-jXX"
where XX
is the number of threads you would like to use.
To speed up compilation of application libraries like rocblas
or rocfft
export AMDGPU_TARGETS
and set it to the architecture name of your GPU. To find out this name, install rocminfo
,
paru -S rocminfo
and call
rocminfo | grep gfx
for VEGA 56/64 the output is
Name: gfx900
Name: amdgcn-amd-amdhsa--gfx900:xnack-
Hence, you have to set AMDGPU_TARGETS
to gfx900
,
export AMDGPU_TARGETS="gfx900"
For additional installation configuration, such as adding a user to the video
group, we refer to AMD's
installation guide.
To uninstall, use the following command:
paru -R rocm-hip-sdk rocm-opencl-sdk
For more helpful tips see the ArchWiki entry on ROCm, here.
For general concerns/comments/support we use Discussions. If you have issues specific to your setup or are having difficulties getting something to work, feel free to post there.
Use the issue tracker to report problems with the AUR packages.
Your contribution is always welcome. Before making a pull request, please open
an issue at the issue tracker
to report the problem with build/error logs.
For most packages, you have to update pkgver
and sha256sums
. Before you commit your changes you will need to generate .SRCINFO
from the updated PKGBUILD
:
makepkg --printsrcinfo > .SRCINFO
and add it to your commit.
As we want to bring ROCm into community
we would greatly appreciate if you test that the package builds in a clean chroot.