Coder Social home page Coder Social logo

rocm-arch's Introduction

ROCm for Arch Linux

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.

Installation

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.

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.

Recommendations for building from source

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"

Some commonly used compiler flags are unsupported by clang (and thus hipcc) from rocm-llvm, including stack protection,

-fstack-protector-all
-fstack-protector-strong
-fstack-protector

See the official documentation for a full list.

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.

Discussions/Support/Issues

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.

Contributing

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.

rocm-arch's People

Contributors

7910f6ba7ee4 avatar acxz avatar agravgaard avatar chriskitching avatar clapbr avatar darjankrijan avatar dorianrudolph avatar evilmav avatar farnoy avatar fernandoblalves avatar guiguid avatar haampie avatar helfio avatar holishing avatar illuhad avatar jp-ellis avatar keyvank avatar lahwaacz avatar linedot avatar marcopompili avatar naetherm avatar neeshy avatar nquest avatar oleid avatar ranisalt avatar rigred avatar s-bernard avatar tpkessler avatar ulyssesrr avatar whoisroot avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.