Community feedback has pointed out a number of confusing, oudated, or missing sections in our ROCm README file. For example, we do not describe what our ROCm package structure is, or how the packages and meta-packages fit together. This can make it confusing for users who do not want to just install rocm-dkms and move on. Our repo manifest (default.xml) is severely out of date. It is missing almost all of the current ROCm projects, and it always pulls from the main development branch. This means we do not have a pinned manifest that allows you to pull the code from a particular ROCm reelease. Manifest updated, and the section of the README discussing it is majorly overhauled (including links for information/scripts about building the code after downloading it). Rather than continually grow our version history in the main README page, this splits off old version information into its own file.
34 KiB
Are You Ready to ROCK?
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. This software enables the high-performance operation of AMD GPUs for computationally oriented tasks in the Linux operating system.
Current ROCm Version: 2.0
- Hardware Support
- New features and enhancements in ROCm 2.0
- The latest ROCm platform - ROCm 2.0
- Installing from AMD ROCm repositories
- Known issues / workarounds
- Closed source components
- Getting ROCm source code
- Final notes
Hardware Support
ROCm is focused on using AMD GPUs to accelerate computational tasks such as machine learning, engineering workloads, and scientific computing. In order to focus our development efforts on these domains of interest, ROCm supports a targeted set of hardware configurations which are detailed further in this section.
Supported GPUs
Because the ROCm Platform has a focus on particular computational domains, we offer official support for a selection of AMD GPUs that are designed to offer good performance and price in these domains.
ROCm officially supports AMD GPUs that use following chips:
- GFX8 GPUs
- "Fiji" chips, such as on the AMD Radeon R9 Fury X and Radeon Instinct MI8
- "Polaris 10" chips, such as on the AMD Radeon RX 580 and Radeon Instinct MI6
- "Polaris 11" chips, such as on the AMD Radeon RX 570 and Radeon Pro WX 4100
- "Polaris 12" chips, such as on the AMD Radeon RX 550 and Radeon RX 540
- GFX9 GPUs
- "Vega 10" chips, such as on the AMD Radeon RX Vega 64 and Radeon Instinct MI25
- "Vega 7nm" chips
ROCm is a collection of software ranging from drivers and runtimes to libraries and developer tools. Some of this software may work with more GPUs than the "officially supported" list above, though AMD does not make any official claims of support for these devices on the ROCm software platform. The following list of GPUs are enabled in the ROCm software, though full support is not guaranteed:
- GFX7 GPUs
- "Hawaii" chips, such as the AMD Radeon R9 390X and FirePro W9100
As described in the next section, GFX8 GPUs require PCI Express 3.0 (PCIe 3.0) with support for PCIe atomics. This requires both CPU and motherboard support. GFX9 GPUs, by default, also require PCIe 3.0 with support for PCIe atomics, but they can operate in most cases without this capability.
At this time, the integrated GPUs in AMD APUs are not officially supported targets for ROCm.
For a more detailed list of hardware support, please see the following documentation.
Supported CPUs
As described above, GFX8 GPUs require PCIe 3.0 with PCIe atomics in order to run ROCm. In particular, the CPU and every active PCIe point between the CPU and GPU require support for PCIe 3.0 and PCIe atomics. The CPU root must indicate PCIe AtomicOp Completion capabilities and any intermediate switch must indicate PCIe AtomicOp Routing capabilities.
Current CPUs which support PCIe Gen3 + PCIe Atomics are:
- AMD Ryzen CPUs;
- The CPUs in AMD Ryzen APUs;
- AMD Ryzen Threadripper CPUs
- AMD EPYC CPUs;
- Intel Xeon E7 v3 or newer CPUs;
- Intel Xeon E5 v3 or newer CPUs;
- Intel Xeon E3 v3 or newer CPUs;
- Intel Core i7 v4, Core i5 v4, Core i3 v4 or newer CPUs (i.e. Haswell family or newer).
- Some Ivy Bridge-E systems
Beginning with ROCm 1.8, GFX9 GPUs (such as Vega 10) no longer require PCIe atomics. We have similarly opened up more options for number of PCIe lanes. GFX9 GPUs can now be run on CPUs without PCIe atomics and on older PCIe generations, such as PCIe 2.0. This is not supported on GPUs below GFX9, e.g. GFX8 cards in the Fiji and Polaris families.
If you are using any PCIe switches in your system, please note that PCIe Atomics are only supported on some switches, such as Broadcom PLX. When you install your GPUs, make sure you install them in a PCIe 3.0 x16, x8, x4, or x1 slot attached either directly to the CPU's Root I/O controller or via a PCIe switch directly attached to the CPU's Root I/O controller.
In our experience, many issues stem from trying to use consumer motherboards which provide physical x16 connectors that are electrically connected as e.g. PCIe 2.0 x4, PCIe slots connected via the Southbridge PCIe I/O controller, or PCIe slots connected through a PCIe switch that does not support PCIe atomics.
If you attempt to run ROCm on a system without proper PCIe atomic support, you may see an error in the kernel log (dmesg):
kfd: skipped device 1002:7300, PCI rejects atomics
Experimental support for our Hawaii (GFX7) GPUs (Radeon R9 290, R9 390, FirePro W9100, S9150, S9170) does not require or take advantage of PCIe Atomics. However, we still recommend that you use a CPU from the list provided above for compatibility purposes.
Not supported or very limited support under ROCm
Limited support
- ROCm 2.0.x should support PCIe 2.0 enabled CPUs such as the AMD Opteron, Phenom, Phenom II, Athlon, Athlon X2, Athlon II and older Intel Xeon and Intel Core Architecture and Pentium CPUs. However, we have done very limited testing on these configurations, since our test farm has been catering to CPUs listed above. This is where we need community support. If you find problems on such setups, please report these issues.
- Thunderbolt 1, 2, and 3 enabled breakout boxes should now be able to work with ROCm. Thunderbolt 1 and 2 are PCIe 2.0 based, and thus are only supported with GPUs that do not require PCIe 3.0 atomics (e.g. Vega 10). However, we have done no testing on this configuration and would need community support due to limited access to this type of equipment.
Not supported
- "Tonga", "Iceland", and "Vega M" GPUs are not supported in ROCm 2.0.x
- We do not support GFX8-class GPUs (Fiji, Polaris, etc.) on CPUs that do not have PCIe 3.0 with PCIe atomics.
- As such, do not support AMD Carrizo and Kaveri APUs as hosts for such GPUs.
- Thunderbolt 1 and 2 enabled GPUs are not supported by GFX8 GPUs on ROCm. Thunderbolt 1 & 2 are based on PCIe 2.0.
- AMD Carrizo based APUs have limited support due to OEM & ODM's choices when it comes to some key configuration parameters. In particular, we have observed that Carrizo laptops, AIOs, and desktop systems showed inconsistencies in exposing and enabling the System BIOS parameters required by the ROCm stack. Before purchasing a Carrizo system for ROCm, please verify that the BIOS provides an option for enabling IOMMUv2 and that the system BIOS properly exposes the correct CRAT table - please inquire with the OEM about the latter.
- AMD Merlin/Falcon Embedded System is not currently supported by the public repo.
- AMD Raven Ridge APU are currently not supported as GPU targets.
New features and enhancements in ROCm 2.0
Features and enhancements introduced in previous versions of ROCm can be found in version_history.md
Adds support for RHEL 7.6 / CentOS 7.6 and Ubuntu 18.04.1
Adds support for Vega 7nm, Polaris 12 GPUs
Introduces MIVisionX
- A comprehensive computer vision and machine intelligence libraries, utilities and applications bundled into a single toolkit.
Improvements to ROCm Libraries
- rocSPARSE & hipSPARSE
- rocBLAS with improved DGEMM efficiency on Vega 7nm
MIOpen
- This release contains general bug fixes and an updated performance database
- Group convolutions backwards weights performance has been improved
- RNNs now support fp16
Tensorflow multi-gpu and Tensorflow FP16 support for Vega 7nm
- TensorFlow v1.12 is enabled with fp16 support
PyTorch/Caffe2 with Vega 7nm Support
- fp16 support is enabled
- Several bug fixes and performance enhancements
- Known Issue: breaking changes are introduced in ROCm 2.0 which are not addressed upstream yet. Meanwhile, please continue to use ROCm fork at https://github.com/ROCmSoftwarePlatform/pytorch
Improvements to ROCProfiler tool
- Support for Vega 7nm
Support for hipStreamCreateWithPriority
- Creates a stream with the specified priority. It creates a stream on which enqueued kernels have a different priority for execution compared to kernels enqueued on normal priority streams. The priority could be higher or lower than normal priority streams.
OpenCL 2.0 support
- ROCm 2.0 introduces full support for kernels written in the OpenCL 2.0 C language on certain devices and systems. Applications can detect this support by calling the “clGetDeviceInfo” query function with “parame_name” argument set to “CL_DEVICE_OPENCL_C_VERSION”. In order to make use of OpenCL 2.0 C language features, the application must include the option “-cl-std=CL2.0” in options passed to the runtime API calls responsible for compiling or building device programs. The complete specification for the OpenCL 2.0 C language can be obtained using the following link: https://www.khronos.org/registry/OpenCL/specs/opencl-2.0-openclc.pdf
Improved Virtual Addressing (48-bit VA) management for Vega 10 and later GPUs
- Fixes Clang AddressSanitizer and potentially other 3rd-party memory debugging tools with ROCm
- Small performance improvement on workloads that do a lot of memory management
- Removes virtual address space limitations on systems with more VRAM than system memory
Kubernetes support
The latest ROCm platform - ROCm 2.0
The latest supported version of the drivers, tools, libraries and source code for the ROCm platform have been released and are available from the following GitHub repositories:
- ROCm Core Components
- ROCm Support Software
- ROCm Development Tools
- HCC compiler
- HIP
- ROCm Device Libraries
- ROCm OpenCL, which is created from the following components:
- ROCm OpenCL Runtime
- ROCm OpenCL Driver
- The ROCm OpenCL compiler, which is created from the following components:
- ROCM Clang-OCL Kernel Compiler
- Asynchronous Task and Memory Interface (ATMI)
- ROCr Debug Agent
- ROCm Code Object Manager
- Example Applications:
- ROCm Libraries
Supported Operating Systems - New operating systems available
The ROCm 2.0.x platform supports the following operating systems:
- Ubuntu 16.04.x and 18.04.x (Version 16.04.3 and newer or kernels 4.13 and newer)
- CentOS 7.4, 7.5, and 7.6 (Using devtoolset-7 runtime support)
- RHEL 7.4, 7.5, and 7.6 (Using devtoolset-7 runtime support)
ROCm support in upstream Linux kernels
As of ROCm 1.9.0, the ROCm user-level software is compatible with the AMD drivers in certain upstream Linux kernels. As such, users have the option of either using the ROCK kernel driver that are part of AMD's ROCm repositories or using the upstream driver and only installing ROCm user-level utilities from AMD's ROCm repositories.
These releases of the upstream Linux kernel support the following GPUs in ROCm:
- 4.17: Fiji, Polaris 10, Polaris 11
- 4.18: Fiji, Polaris 10, Polaris 11, Vega10
The upstream driver may be useful for running ROCm software on systems that are not compatible with the kernel driver available in AMD's repositories. For users that have the option of using either AMD's or the upstreamed driver, there are various tradeoffs to take into consideration:
Using AMD's rock-dkms package |
Using the upstream kernel driver | |
|---|---|---|
| Pros | More GPU features, and they are enabled earlier | Includes the latest Linux kernel features |
| Tested by AMD on supported distributions | May work on other distributions and with custom kernels | |
| Supported GPUs enabled regardless of kernel version | ||
| Includes the latest GPU firmware | ||
| Cons | May not work on all Linux distributions or versions | Features and hardware support varies depending on kernel version |
| Not currently supported on kernels newer than 4.18 | Limits GPU's usage of system memory to 3/8 of system memory | |
| IPC and RDMA capabilities are not yet enabled | ||
Not tested by AMD to the same level as rock-dkms package |
||
| Does not include most up-to-date firmware |
Installing from AMD ROCm repositories
AMD hosts both Debian and RPM repositories for the ROCm 2.0.x packages at this time.
The packages in the Debian repository have been signed to ensure package integrity.
ROCm Binary Package Structure
ROCm is a collection of software ranging from drivers and runtimes to libraries and developer tools.
In AMD's package distributions, these software projects are provided as a separate packages.
This allows users to install only the packages they need, if they do not wish to install all of ROCm.
These packages will install most of the ROCm software into /opt/rocm/ by default.
The packages for each of the major ROCm components are:
- ROCm Core Components
- ROCk Kernel Driver:
rock-dkms - ROCr Runtime:
hsa-rocr-dev,hsa-ext-rocr-dev - ROCt Thunk Interface:
hsakmt-roct,hsakmt-roct-dev
- ROCk Kernel Driver:
- ROCm Support Software
- ROCm SMI:
rocm-smi - ROCm cmake:
rocm-cmake - rocminfo:
rocminfo - ROCm Bandwidth Test:
rocm_bandwidth_test
- ROCm SMI:
- ROCm Development Tools
- HCC compiler:
hcc - HIP:
hip_base,hip_doc,hip_hcc,hip_samples - ROCm Device Libraries:
rocm-device-libs - ROCm OpenCL:
rocm-opencl,rocm-opencl-devel(on RHEL/CentOS),rocm-opencl-dev(on Ubuntu) - ROCM Clang-OCL Kernel Compiler:
rocm-clang-ocl - Asynchronous Task and Memory Interface (ATMI):
atmi - ROCr Debug Agent:
rocr_debug_agent - ROCm Code Object Manager:
comgr
- HCC compiler:
- ROCm Libraries
- rocBLAS:
rocblas - hipBLAS:
hipblas - rocFFT:
rocfft - rocRAND:
rocrand - rocSPARSE:
rocsparse - hipSPARSE:
hipsparse - rocALUTION:
rocalution: - MIOpenGEMM:
miopengemm - MIOpen:
MIOpen-HIP(for the HIP version),MIOpen-OpenCL(for the OpenCL version) - HIP Thrust:
thrust(on RHEL/CentOS),hip-thrust(on Ubuntu) - ROCm SMI Lib:
rocm_smi_lib64 - RCCL:
rccl - MIVisionX:
mivisionx
- rocBLAS:
To make it easier to install ROCm, the AMD binary repos provide a number of meta-packages that will automatically install multiple other packages.
For example, rocm-dkms is the primary meta-package that is used to install most of the base technology needed for ROCm to operate.
It will install the rock-dkms kernel driver, and another meta-package (rocm-dev) which installs most of the user-land ROCm core components, support software, and development tools.
The rocm-utils meta-package will install useful utilities that, while not required for ROCm to operate, may still be beneficial to have.
Finally, the rocm-libs meta-package will install some (but not all) of the libraries that are part of ROCm.
The chain of software installed by these meta-packages is illustrated below
rocm-dkms
|-- rock-dkms
\-- rocm-dev
|--hsa-rocr-dev
|--hsa-ext-rocr-dev
|--rocm-device-libs
|--rocm-utils
|-- rocminfo
|-- rocm-cmake
\-- rocm-clang-ocl # This will cause OpenCL to be installed
|--hcc
|--hip_base
|--hip_doc
|--hip_hcc
|--hip_samples
|--rocm-smi
|--hsakmt-roct
|--hsakmt-roct-dev
|--hsa-amd-aqlprofile
|--comgr
\--rocr_debug_agent
rocm-libs
|-- rocblas
|-- rocfft
|-- rocrand
\-- hipblas
These meta-packages are not required but may be useful to make it easier to install ROCm on most systems.
Some users may want to skip certain packages. For instance, a user that wants to use the upstream kernel drivers (rather than those supplied by AMD) may want to skip the rocm-dkms and rock-dkms packages, and instead directly install rocm-dev.
Similarly, a user that only wants to install OpenCL support instead of HCC and HIP may want to skip the rocm-dkms and rocm-dev packages.
Instead, they could directly install rock-dkms, rocm-opencl, and rocm-opencl-dev and their dependencies.
Ubuntu Support - installing from a Debian repository
The following directions show how to install ROCm on supported Debian-based systems such as Ubuntu 18.04.
These directions may not work as written on unsupported Debian-based distributions.
For example, newer versions of Ubuntu may not be compatible with the rock-dkms kernel driver.
As such, users may want to skip the rocm-dkms and rock-dkms packages, as described above, and instead use the upstream kernel driver.
First make sure your system is up to date
sudo apt update
sudo apt dist-upgrade
sudo apt install libnuma-dev
sudo reboot
Add the ROCm apt repository
For Debian-based systems like Ubuntu, configure the Debian ROCm repository as follows:
wget -qO - http://repo.radeon.com/rocm/apt/debian/rocm.gpg.key | sudo apt-key add -
echo 'deb [arch=amd64] http://repo.radeon.com/rocm/apt/debian/ xenial main' | sudo tee /etc/apt/sources.list.d/rocm.list
The gpg key might change, so it may need to be updated when installing a new release. If the key signature verification is failed while update, please re-add the key from ROCm apt repository. The current rocm.gpg.key is not available in a standard key ring distribution, but has the following sha1sum hash:
f7f8147431c75e505c58a6f3a3548510869357a6 rocm.gpg.key
Install
Next, update the apt repository list and install the rocm-dkms meta-package:
sudo apt update
sudo apt install rocm-dkms
Next set your permissions
Users will need to be in the video group in order to have access to the GPU.
As such, you should ensure that your user account is a member of the video group prior to using ROCm.
You can find which groups you are a member of with the following command:
groups
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
You may want to ensure that any future users you add to your system are put into the "video" group by default. To do that, you can run the following commands:
echo 'ADD_EXTRA_GROUPS=1' | sudo tee -a /etc/adduser.conf
echo 'EXTRA_GROUPS=video' | sudo tee -a /etc/adduser.conf
Once complete, reboot your system.
Test basic ROCm installation
After rebooting the system run the following commands to verify that the ROCm installation was successful. If you see your GPUs listed by both of these commands, you should be ready to go!
/opt/rocm/bin/rocminfo
/opt/rocm/opencl/bin/x86_64/clinfo
Note that, to make running ROCm programs easier, you may wish to put the ROCm binaries in your PATH.
echo 'export PATH=$PATH:/opt/rocm/bin:/opt/rocm/profiler/bin:/opt/rocm/opencl/bin/x86_64' | sudo tee -a /etc/profile.d/rocm.sh
If you have an install issue please read this FAQ.
Performing an OpenCL-only Installation of ROCm
Some users may want to install a subset of the full ROCm installation.
In particular, if you are trying to install on a system with a limited amount of storage space, or which will only run a small collection of known applications, you may want to install only the packages that are required to run OpenCL applications.
To do that, you can run the following installation command instead of the command to install rocm-dkms.
sudo apt-get install dkms rock-dkms rocm-opencl
How to uninstall from Ubuntu 16.04 or Ubuntu 18.04
To uninstall the ROCm packages installed in the above directions, you can execute;
sudo apt autoremove rocm-dkms rocm-dev rocm-utils
Installing development packages for cross compilation
It is often useful to develop and test on different systems. For example, some development or build systems may not have an AMD GPU installed. In this scenario, you may prefer to avoid installing the ROCK kernel driver to your development system.
In this case, install the development subset of packages:
sudo apt update
sudo apt install rocm-dev
Note: To execute ROCm enabled apps you will require a system with the full ROCm driver stack installed
Using Debian-based ROCm with upstream kernel drivers
As described in the above section about upstream Linux kernel support, users may want to try installing ROCm user-level software without installing AMD's custom ROCK kernel driver.
Users who do want to use upstream kernels can run the following commands instead of installing rocm-dkms
sudo apt update
sudo apt install rocm-dev
echo 'SUBSYSTEM=="kfd", KERNEL=="kfd", TAG+="uaccess", GROUP="video"' | sudo tee /etc/udev/rules.d/70-kfd.rules
CentOS/RHEL 7 (7.4, 7.5, 7.6) Support
The following directions show how to install ROCm on supported RPM-based systems such as CentOS 7.6.
These directions may not work as written on unsupported RPM-based distributions.
For example, Fedora may work but may not be compatible with the rock-dkms kernel driver.
As such, users may want to skip the rocm-dkms and rock-dkms packages, as described above, and instead use the upstream kernel driver.
Support for CentOS/RHEL 7 was added in ROCm 1.8, but ROCm requires a special runtime environment provided by the RHEL Software Collections and additional dkms support packages to properly install and run.
Preparing RHEL 7 (7.4, 7.5, 7.6) for installation
RHEL is a subscription-based operating system, and you must enable several external repositories to enable installation of the devtoolset-7 environment and the DKMS support files. These steps are not required for CentOS.
First, the subscription for RHEL must be enabled and attached to a pool id. Please see Obtaining an RHEL image and license page for instructions on registering your system with the RHEL subscription server and attaching to a pool id.
Second, enable the following repositories:
sudo subscription-manager repos --enable rhel-server-rhscl-7-rpms
sudo subscription-manager repos --enable rhel-7-server-optional-rpms
sudo subscription-manager repos --enable rhel-7-server-extras-rpms
Third, enable additional repositories by downloading and installing the epel-release-latest-7 repository RPM:
sudo rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
Install and setup Devtoolset-7
To setup the Devtoolset-7 environment, follow the instructions on this page:
https://www.softwarecollections.org/en/scls/rhscl/devtoolset-7/
Note that devtoolset-7 is a Software Collections package, and it is not supported by AMD.
Prepare CentOS/RHEL (7.4, 7.5, 7.6) for DKMS Install
Installing kernel drivers on CentOS/RHEL 7.4/7.5/7.6 requires dkms tool being installed:
sudo yum install -y epel-release
sudo yum install -y dkms kernel-headers-`uname -r` kernel-devel-`uname -r`
Installing ROCm on the system
It is recommended to remove previous ROCm installations before installing the latest version to ensure a smooth installation.
At this point ROCm can be installed on the target system. Create a /etc/yum.repos.d/rocm.repo file with the following contents:
[ROCm]
name=ROCm
baseurl=http://repo.radeon.com/rocm/yum/rpm
enabled=1
gpgcheck=0
The repo's URL should point to the location of the repositories repodata database. Install ROCm components using these commands:
sudo yum install rocm-dkms
The rock-dkms component should be installed and the /dev/kfd device should be available on reboot.
Set up permissions
Ensure that your user account is a member of the "video" or "wheel" group prior to using the ROCm driver. You can find which groups you are a member of with the following command:
groups
To add yourself to the video (or wheel) group you will need the sudo password and can use the following command:
sudo usermod -a -G video $LOGNAME
You may want to ensure that any future users you add to your system are put into the "video" group by default. To do that, you can run the following commands:
echo 'ADD_EXTRA_GROUPS=1' | sudo tee -a /etc/adduser.conf
echo 'EXTRA_GROUPS=video' | sudo tee -a /etc/adduser.conf
Current release supports CentOS/RHEL 7.4, 7.5, 7.6. If users want to update the OS version, they should completely remove ROCm packages before updating to the latest version of the OS, to avoid DKMS related issues.
Once complete, reboot your system.
Test basic ROCm installation
After rebooting the system run the following commands to verify that the ROCm installation was successful. If you see your GPUs listed by both of these commands, you should be ready to go!
/opt/rocm/bin/rocminfo
/opt/rocm/opencl/bin/x86_64/clinfo
Note that, to make running ROCm programs easier, you may wish to put the ROCm binaries in your PATH.
echo 'export PATH=$PATH:/opt/rocm/bin:/opt/rocm/profiler/bin:/opt/rocm/opencl/bin/x86_64' | sudo tee -a /etc/profile.d/rocm.sh
If you have an install issue please read this FAQ.
Performing an OpenCL-only Installation of ROCm
Some users may want to install a subset of the full ROCm installation.
In particular, if you are trying to install on a system with a limited amount of storage space, or which will only run a small collection of known applications, you may want to install only the packages that are required to run OpenCL applications.
To do that, you can run the following installation command instead of the command to install rocm-dkms.
sudo yum install rock-dkms rocm-opencl
Compiling applications using HCC, HIP, and other ROCm software
To compile applications or samples, please use gcc-7.2 provided by the devtoolset-7 environment. To do this, compile all applications after running this command:
scl enable devtoolset-7 bash
How to uninstall ROCm from CentOS/RHEL 7.4, 7.5 and 7.6
To uninstall the ROCm packages installed by the above directions, you can execute:
sudo yum autoremove rocm-dkms rock-dkms
Installing development packages for cross compilation
It is often useful to develop and test on different systems. For example, some development or build systems may not have an AMD GPU installed. In this scenario, you may prefer to avoid installing the ROCK kernel driver to your development system.
In this case, install the development subset of packages:
sudo yum install rocm-dev
Note: To execute ROCm enabled apps you will require a system with the full ROCm driver stack installed
Using ROCm with upstream kernel drivers
As described in the above section about upstream Linux kernel support, use
rs may want to try installing ROCm user-level software without installing AMD's custom ROCK kernel driver.
Users who do want to use upstream kernels can run the following commands instead of installing rocm-dkms
sudo yum install rocm-dev
echo 'SUBSYSTEM=="kfd", KERNEL=="kfd", TAG+="uaccess", GROUP="video"' | sudo tee /etc/udev/rules.d/70-kfd.rules
Known issues / workarounds
HCC: removed support for C++AMP in ROCm 2.0
HipCaffe is supported on single GPU configurations
The ROCm SMI library calls to rsmi_dev_power_cap_set() and rsmi_dev_power_profile_set() will not work for all but the first gpu in multi-gpu set ups.
Closed source components
The ROCm platform relies on a few closed source components to provide functionality such as HSA image support. These components are only available through the ROCm repositories, and they will either be deprecated or become open source components in the future. These components are made available in the following packages:
- hsa-ext-rocr-dev
Getting ROCm source code
ROCm is built from open source software. As such, it is possible to make modifications to the various components of ROCm by downloading the source code, making modifications to it, and rebuilding the components. The source code for ROCm components can be cloned from each of the GitHub repositories using git. In order to make it easier to download the correct versions of each of these tools, this ROCm repository contains a repo manifest file, default.xml. Interested users can thus use this manifest file to download the source code for all of the ROCm software.
Installing repo
Google's repo tool allows you to manage multiple git repositories simultaneously. You can install it by executing the following example commands:
mkdir -p ~/bin/
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
Note that you can choose a different folder to install repo into if you desire. ~/bin/ is simply used as an example.
Downloading the ROCm source code
The following example shows how to use the repo binary downloaded above to download all of the ROCm source code.
If you chose a directory other than ~/bin/ to install repo, you should use that directory below.
mkdir -p ~/ROCm/
cd ~/ROCm/
~/bin/repo init -u https://github.com/RadeonOpenCompute/ROCm.git -b roc-2.0.0
repo sync
This will cause repo to download all of the open source code associated with this ROCm release. You may want to ensure that you have ssh-keys configured on your machine for your GitHub ID.
Building the ROCm source code
Each ROCm component repository contains directions for building that component. As such, you should go to the repository you are interested in building to find how to build it.
That said, AMD also offers a project that demonstrates how to download, build, package, and install ROCm software on various distributions. The scripts here may be useful for anyone looking to build ROCm components.
Final notes
- OpenCL Runtime and Compiler will be submitted to the Khronos Group for conformance testing prior to its final release.