How to install AMD ROCm for OpenCL support

To install ROCm with OpenCL and Image Support, you have do the following five steps:

  1. Add the ROCm 2.10.0 repository to your package manager (3.0 doesn’t work). You can find the repositories for Debian/Ubuntu, Fedora/RHEL or openSUSE/SLE here.

    For example to add a zypper repository on openSUSE create the following file:

    /etc/zypp/repos.d/rocm.repo

    with the content:

    [rocm]
    name=Radeon Open Compute
    enabled=1
    autorefresh=0
    baseurl=http://repo.radeon.com/rocm/zyp/2.10.0/
    type=rpm-md
    
  2. Install the required packages using:

    zypper in rocm-opencl hsa-ext-rocr-dev
    
  3. Create /etc/ld.so.conf.d/rocm-opencl.conf with the following content:

    /opt/rocm/hsa/lib/
    /opt/rocm/lib
    /opt/rocm/lib64
    /opt/rocm/opencl/lib/x86_64
    
  4. To load the new paths into the linker run: ldconfig

  5. And last but not least create an OpenCL ICD file using:

    echo libamdocl64.so > /etc/OpenCL/vendors/amdocl64.icd
    
  6. Now you can run clinfo to verify that it is working. Check for Image Support, this is what you need for darktable or RawTherapee.

5 Likes