2023.05.02. Tested with Ubuntu 22.10 and Debian 12 Bookworm.
Visit https://docs.amd.com > ROCm Release Documentation > Installation guide.
Download and install
amdgpu-install.x.y.z.deb. This will 1) configure
deb repositories; 2) install
Install ROCm OpenCL support from the newly added repositories:
apt install rocm-opencl-runtimeThis will pull some additional packages.
amdgpu-install --no-dkms --usecase=opencl
NB: Repositories can also be added manually, see Package Manager Method in Installation guide.
amdgpu-dkms package will attempt to compile
amdgpu kernel module from source
in AMD repository. Most likely this will only work with specific kernel versions.
To install OpenCL part from AMDGPU-PRO, run:
./amdgpu-install --opencl=legacy --headless --no-dkms
Last tested with:
amdgpu-installdoes not honor
--no-dkmsoption when run with
amdgpu-dkmsis intalled and kernel module
amdgpu.kois compiled, replacing the one from Linux kernel tree.
‘amdgpu’ is an open source Linux kernel module for AMD graphics. It is available in stock kernels starting with Linux 4.2. OpenCL support can be added by installing libraries from binary AMDGPU-PRO driver download, provided by AMD. AMDGPU-PRO itself only works with certain distributions/releases/kernel versions.
Check `lsmod` and
/var/log/Xorg.log that you have amdgpu loaded and working.
Download AMDGPU-PRO package for your Linux distribution from amd.com.
`tar -xvf ...` to upack the downloaded file and run:
amdgpu-pro-install --compute (see Update above)which is for “compute only”, i.e. it will install only the following:
clinfo-amdgpu-pro opencl-amdgpu-pro-icd amdgpu-pro-dkms libdrm2-amdgpu-pro libdrm-amdgpu-pro-amdgpu1
clinfo to check OpenCL support.