sudo apt-get install ./amdgpu-install-VERSION.deb
amdgpu-install --usecase=workstation,rocm,opencl --opencl=rocr,legacy --vulkan=pro --accept-eula
sudo apt-get -y install ocl-icd-opencl-dev opencl-headers
To use the ROCr implementation of OpenCL, the running user might need additional permissions depending on OS policy. If clinfo or any openCL application does not work, check ownership and permissions of the render nodes:
ls -l /dev/dri/render*
If the render nodes are owned by group render but not readable and writable by all users, consider adding the current user to the render group:
sudo usermod -a -G render $LOGNAME
If you are an administrator, $LOGNAME can be replaced by any valid username.
Alternatively, if the render nodes are owned by the video group but not readable and writable by all users, consider adding the current user to the video group:
sudo usermod -a -G video $LOGNAME
Different Linux distributions have different ownership and permission policies for render nodes. In addition, your organization may have its own policies that override the distribution defaults. If unsure, consult the documentation for your distribution or your organization.
In some scenarios, it may be desirable to install only the OpenCL portion of the AMDGPU stack (omitting the OpenGL portion), which can be accomplished by using the –usecase=opencl option instead. The typical use case is headless compute.