Skip to content

Commit d4cccbc

Browse files
authored
Add ROCm article (#1231)
1 parent 99a7ae6 commit d4cccbc

File tree

1 file changed

+89
-0
lines changed

1 file changed

+89
-0
lines changed

content/rocm.md

+89
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
---
2+
title: Install ROCm
3+
description: >
4+
Instructions for setting up ROCm for HIP & OpenCL workloads on AMD GPUs
5+
keywords:
6+
- AMD
7+
- ROCm
8+
- ROCr
9+
- ROCt
10+
- ROCk
11+
- Radeon Open Compute
12+
- HIP
13+
- OpenCL
14+
15+
facebookImage: /_social/article
16+
twitterImage: /_social/article
17+
18+
hidden: false
19+
section: software
20+
tableOfContents: true
21+
---
22+
23+
AMD GPUs use [HIP](https://rocm.docs.amd.com/projects/HIP/en/latest/) (Heterogeneous-Compute Interface for Portability) and [OpenCL](https://www.khronos.org/opencl/) (Open Computing Language) to run compute workloads, similar to CUDA on NVIDIA GPUs. In order to use HIP and OpenCL, [ROCm](https://www.amd.com/en/products/software/rocm.html) (the Radeon Open Compute modules) must be installed. The ROCm package interfaces with the AMDGPU driver built into the default Pop!\_OS kernel, and does not require installing any DKMS packages.
24+
25+
The below instructions correspond with the necessary steps from [AMD's installation documentation for Ubuntu](https://rocm.docs.amd.com/projects/install-on-linux/en/latest/how-to/native-install/ubuntu.html).
26+
27+
## Installation on Pop!\_OS 22.04
28+
29+
First, add AMD's official ROCm repository to the system and set the appropriate apt pin priority using the below commands:
30+
31+
```
32+
wget https://repo.radeon.com/rocm/rocm.gpg.key -O - | gpg --dearmor | sudo tee /etc/apt/keyrings/rocm.gpg > /dev/null
33+
echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/rocm.gpg] https://repo.radeon.com/rocm/apt/6.1 jammy main" | sudo tee --append /etc/apt/sources.list.d/rocm.list
34+
echo -e 'Package: *\nPin: release o=repo.radeon.com\nPin-Priority: 600' | sudo tee /etc/apt/preferences.d/rocm-pin-600
35+
```
36+
37+
Next, update the package lists and install the `rocm` package:
38+
39+
```
40+
sudo apt update
41+
sudo apt install rocm
42+
```
43+
44+
Finally, add the current user to the `render` group so the user has permission to run compute workloads:
45+
46+
```
47+
sudo usermod -a -G render $USER
48+
```
49+
50+
It will be necessary to restart any applications utilizing ROCm before they will detect the GPU(s). If in doubt, reboot the system to ensure the new group membership takes effect.
51+
52+
### Testing the Installation
53+
54+
To check if ROCm is installed, run the `rocminfo` command. The output should list the ROCm-compatible GPUs (which may also include CPU-integrated graphics) present in the system:
55+
56+
```
57+
system76@pop-os:~$ rocminfo
58+
ROCk module is loaded
59+
...
60+
==========
61+
HSA Agents
62+
==========
63+
*******
64+
Agent 1
65+
*******
66+
Name: AMD Ryzen 7 6800U with Radeon Graphics
67+
Uuid: CPU-XX
68+
Marketing Name: AMD Ryzen 7 6800U with Radeon Graphics
69+
Vendor Name: CPU
70+
...
71+
Device Type: CPU
72+
...
73+
*******
74+
Agent 2
75+
*******
76+
Name: gfx1035
77+
Uuid: GPU-XX
78+
Marketing Name: AMD Radeon Graphics
79+
Vendor Name: AMD
80+
...
81+
Device Type: GPU
82+
...
83+
*** Done ***
84+
system76@pop-os:~$
85+
```
86+
87+
### Blender Compatibility
88+
89+
The default Blender `.deb` package in Pop!\_OS 22.04, which is provided by Ubuntu, does not support HIP workloads. The Blender flatpak package may be unable to properly detect the GPU(s) due to sandboxing restrictions. Therefore, for GPU rendering with HIP in Blender, it's recommended to [download Blender directly from blender.org](https://www.blender.org/). (After extracting the `.tar.xz` file, simply double-click the `blender` executable to run the program.)

0 commit comments

Comments
 (0)