View on GitHub ROCm_Logo

ROCm, a New Era in Open GPU Computing

Platform for GPU-Enabled HPC and Ultrascale Computing

ROCm GPU Server Driver Installation Guide for Linux


The ROCm Platform brings a rich foundation to advanced computing by seamlessly integrating the CPU and GPU with the goal of solving real-world problems.

ROCm started with just the support of AMD’s FIJI Family of dGPUs. Starting with ROCm 1.3 we further extends support to include the Polaris Family of ASICs. With ROCm 1.6 we added Vega Family of products.

New too ROCm 1.7 is the DKMS driver installation

System Requirements

To use ROCm on your system you need the following:

Table 1. Native Linux Distribution Support in ROCm 1.7

Distribution Kernel GCC GLIBC
Ubuntu 16.04 4.11 5.40 2.23

Pre Install Directions

First make sure your system is up to date
sudo apt update
sudo apt dist-upgrade
sudo reboot
Verify You Have ROCm Capable GPU Installed int the System
lspci | grep -i AMD
You will see list of AMD GPU’s
Verify You Have a Supported Version of Linux
uname -m && cat /etc/*release
You will see some thing like for Ubuntu
Verify version of GCC
gcc --version 
You will see
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609 

Choose an Installation Method

Package manager Based Install A Package Manager Based Installation use your Linux Distro system’s package management service.
Ubuntu uses Debian and Fedora RPM Packages

Ubuntu Install

Add the Repo Server

For Debian based systems, like Ubuntu, configure the Debian ROCm repository as follows:

wget -qO - | sudo apt-key add -
sudo sh -c 'echo deb [arch=amd64] xenial main > /etc/apt/sources.list.d/rocm.list'

The gpg key might change, so it may need to be updated when installing a new release. The current rocm.gpg.key is not avialable in a standard key ring distribution, but has the following sha1sum hash:

f0d739836a9094004b0a39058d046349aacc1178 rocm.gpg.key

Install or update ROCm

Next, update the apt-get repository list and install/update the ROCm package:

Warning: Before proceeding, make sure to completely uninstall any previous ROCm package:

sudo apt-get update
sudo apt-get install libnuma-dev
sudo apt-get install rocm-dkms rocm-opencl-dev

Setting Permisions to Use ROCm

With move to upstreaming the KFD driver and the support of DKMS, for all Console aka headless user, you will need to add all your users to the ‘video” group by setting the Unix permissions

Configure Ensure that your user account is a member of the “video” group prior to using the ROCm driver. You can find which groups you are a member of with the following command:


To add yourself to the video group you will need the sudo password and can use the following command:

sudo usermod -a -G video $LOGNAME 

Once complete, reboot your system.

We recommend you verify your installation to make sure everything completed successfully.

Post install verification
Upon restart, To test your OpenCL instance

Post Install all user need to part of the member of “video” group so set your Unix permisions for this.

Build and run Hello World OCL app..

HelloWorld sample:


Build it using the default ROCm OpenCL include and library locations:

g++ -I /opt/rocm/opencl/include/ ./HelloWorld.cpp -o HelloWorld -L/opt/rocm/opencl/lib/x86_64 -lOpenCL

Run it:

Un-install ROCm

To un-install the entire rocm development package execute:

Installing development packages for cross compilation

It is often useful to develop and test on different systems. In this scenario, you may prefer to avoid installing the ROCm Kernel to your development system.

In this case, install the development subset of packages:

sudo apt-get update
sudo apt-get install rocm-dev