Install AMDGPU HiP, OpenCL on Fedora 40

  1. amdgpu installer can be get from https://www.amd.com/en/support/linux-drivers

  2. Expand “RHEL x86 64-Bit” and download Radeon™ Software for Linux® version xx.yy.z for RHEL 9.x.
    You will get a rpm file: amdgpu-install-xxxyyyzzz.el9.noarch.rpm.

  1. Install amdgpu installer.

    $ sudo dnf install amdgpu-install-....el9.noarch.rpm
    
    $ rpm -lq amdgpu-install
    /etc/amdgpu-install
    /etc/amdgpu-install/amdgpu-setup.conf
    /etc/amdgpu-install/rocm.gpg.key
    /etc/yum.repos.d/amdgpu.repo
    /etc/yum.repos.d/rocm.repo
    /usr/bin/amdgpu-install
    /usr/bin/amdgpu-setup
    /usr/share/amdgpu-install
    /usr/share/amdgpu-install/AMDGPUPROEULA
    /usr/share/amdgpu-install/amdgpu.repo.template
    /usr/share/amdgpu-install/orig
    /usr/share/amdgpu-install/orig/amdgpu.repo
    /usr/share/amdgpu-install/orig/rocm.repo
    /usr/share/amdgpu-install/rocm.repo.template
    

    This package provide a script for install amdgpu: amdgpu-install, and 2 repos: amdgpu.repo and rocm.repo.

  2. Edit baseurl in /etc/yum.repos.d/amdgpu*.repo, change $amdgpudistro to 9.4:

    $ sed -i -e "s#\$amdgpudistro#9.3#g" /etc/yum.repos.d/amdgpu*.repo
    
  3. Enable rocm repo (if not enabled)

    $ sudo dnf config-manager --enable rocm
    
  4. Install hip and opencl

    $ amdgpu-install --no-dkms --usecase=hip,opencl
    

    Option --no-dkms is important to keep using the open source driver, which is much more stable.

  5. Done. Now you can open Blender (>= 3.2) to check if HiP is available in Cycle.
    If blender cannot enable HIP, try using the app downloaded from Blender website instead of the one from Fedora repo.

References

https://rocm.docs.amd.com/projects/install-on-linux/en/latest/how-to/amdgpu-install.html

See also

comments powered by Disqus