| |
@@ -0,0 +1,85 @@
|
| |
+ = How to install OpenCL alongside mesa
|
| |
+
|
| |
+ == Introduction
|
| |
+
|
| |
+ The Objective is to install OpenCL userspace drivers as provided in the amdgpu-pro driver stack to work along default mesa drivers. A common use case is, for enabling GPU rendering in softwares like Blender, Darktable.
|
| |
+
|
| |
+ [WARNING]
|
| |
+
|
| |
+ ====
|
| |
+
|
| |
+ Make sure you don't have mesa-libOpenCL installed. If you have installed it, please remove it. The mesa library for OpenCL is not currently supported by softwares like Blender and it will conflict with the OpenCL drivers provided by this driver stack. Also make sure you don't have OpenCL or drivers installed from Rocm repository as it has had issues in the past and is not recommended.
|
| |
+ ----
|
| |
+
|
| |
+ sudo dnf remove mesa-libOpenCL
|
| |
+
|
| |
+ ----
|
| |
+
|
| |
+ ====
|
| |
+
|
| |
+ == Step #1 : Download Radeon Software for Linux
|
| |
+
|
| |
+ Download the tar.gz from AMD website provided for RHEL for RedHat/CentOS 8.xx. Currently the latest version tested is 20.50 -
|
| |
+
|
| |
+ https://www.amd.com/en/support/kb/release-notes/rn-amdgpu-unified-linux-20-50[Radeon Software for linux 20.50]
|
| |
+
|
| |
+ == Step #2 : Extract and move
|
| |
+
|
| |
+ Extract and move it into /var/local and rename the extracted folder to amdgpu. Execute -
|
| |
+
|
| |
+ ----
|
| |
+ cd /var/local
|
| |
+ sudo tar xf /path/to/amdgpu-pro-xx-xx-xxxxxx-rhel-x.x.tar.xz
|
| |
+ sudo mv amdgpu-pro-xx-xx-xxxxxx-rhel-x.x amdgpu
|
| |
+ ----
|
| |
+
|
| |
+ == Step #3 : Setup a repository
|
| |
+
|
| |
+ Create a repository file using your favorite text editor I will use nano. You can also use gedit for ease of use.
|
| |
+
|
| |
+ ----
|
| |
+ sudo nano /etc/yum.repos.d/amdgpu.repo
|
| |
+ ----
|
| |
+
|
| |
+ Copy paste and save the following:
|
| |
+
|
| |
+ ----
|
| |
+ [amdgpu]
|
| |
+ name=AMDGPU Packages
|
| |
+ baseurl=file:///var/local/amdgpu/
|
| |
+ enabled=1
|
| |
+ skip_if_unavailable=1
|
| |
+ gpgcheck=0
|
| |
+ cost=500
|
| |
+ metadata_expire=300
|
| |
+ ----
|
| |
+
|
| |
+ == Step #4 : Install the required packages
|
| |
+
|
| |
+ Now update and install the required OpenCL packages. Execute
|
| |
+ ----
|
| |
+ sudo dnf update
|
| |
+ sudo dnf install opencl-rocr-amdgpu-pro rocm-device-libs-amdgpu-pro hsa-runtime-rocr-amdgpu hsakmt-roct-amdgpu hip-rocr-amdgpu-pro comgr-amdgpu-pro opencl-orca-amdgpu-pro-icd
|
| |
+ ----
|
| |
+
|
| |
+ [NOTE]
|
| |
+
|
| |
+ ====
|
| |
+
|
| |
+ AMD GPU Core (amdgpu-core) package will fail to install and it is fine as we want to use amdgpu drivers already in the kernel.
|
| |
+
|
| |
+ ====
|
| |
+
|
| |
+ == Step #5 : Restart the System
|
| |
+
|
| |
+ Restart your system and you can test OpenCL in softwares like Blender and Darktable.
|
| |
+
|
| |
+ image:how-to-opencl-blender.png[OpenCL user-space drivers from 20.50 working with default mesa drivers on Fedora 33]
|
| |
+
|
| |
+ [NOTE]
|
| |
+
|
| |
+ ====
|
| |
+
|
| |
+ You can update OpenCL by simply replacing /var/local/amdgpu folder with the new one and running a dnf update, however in rare cases AMD changes the package names. I will keep this guide updated according to the latest radeon software repository.
|
| |
+
|
| |
+ ====
|
| |
A quick doc on how to correctly setup OpenCL usespace drivers to work alongside mesa.