ROCm OpenCL not working for kernel 5.3?

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

  1. Add the 2.10.0 repo to your package manager (3.0 doesn’t work). To do that for zypper on openSUSE create the following file:

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

    [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
    

I’m on Kernel 5.4.14.

1 Like