To install ROCm with OpenCL and OpenCL Image support, you have do the following five steps:
-
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 -
Install the required packages using:
zypper in rocm-opencl hsa-ext-rocr-dev -
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 -
To load the new paths into the linker run:
ldconfig -
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.