I have a system with hybrid AMD graphics (iGPU + dGPU), I need to get OpenCL to work and ROCm for some tensorflow related projects. What is the recommended way to do it considering AMD ROCM does not officially support Debian?
I'm considering an Ubuntu container and install ROCm in it, would that work? And how can I integrate it with my Debian host to make working with the container less of a hassle?
What is the best way to run ROCm on Debian?
- ruwolf
- Posts: 924
- Joined: 2008-02-18 05:04
- Location: Banovce nad Bebravou
- Has thanked: 91 times
- Been thanked: 71 times
Re: What is the best way to run ROCm on Debian?
This is only my personal hint, so it may be not the best solution.
If it works in Ubuntu, I would try to use FrankenDebian, even it is not recommended.
With very well understanding/knowledge of APT pinning, Debian and Ubuntu releases and their upgrades and potential risks, of course!
If it works in Ubuntu, I would try to use FrankenDebian, even it is not recommended.
With very well understanding/knowledge of APT pinning, Debian and Ubuntu releases and their upgrades and potential risks, of course!
-
- Global Moderator
- Posts: 4190
- Joined: 2014-07-20 18:12
- Location: Europe
- Has thanked: 123 times
- Been thanked: 565 times
Re: What is the best way to run ROCm on Debian?
Hello,
Hope this helps.
—
[1] AMD - ROCm™ Software 6.3.1- Quick start installation guide
I’m not a ROCM user, but according to installation instruction [1], Debian 12 is supported.td211 wrote: 2024-12-19 17:02 I have a system with hybrid AMD graphics (iGPU + dGPU), I need to get OpenCL to work and ROCm for some tensorflow related projects. What is the recommended way to do it considering AMD ROCM does not officially support Debian?
Hope this helps.
—
[1] AMD - ROCm™ Software 6.3.1- Quick start installation guide
Re: What is the best way to run ROCm on Debian?
Thanks for the link but it needs Python 3.10, which isn't available on Debian. It also suggests add an Ubuntu jammy repo, so a FrankenDebian.Aki wrote: 2024-12-22 07:09 I’m not a ROCM user, but according to installation instruction [1], Debian 12 is supported.
Hope this helps.
—
[1] AMD - ROCm™ Software 6.3.1- Quick start installation guide
- ruwolf
- Posts: 924
- Joined: 2008-02-18 05:04
- Location: Banovce nad Bebravou
- Has thanked: 91 times
- Been thanked: 71 times
Re: What is the best way to run ROCm on Debian?
It needs libpython3.10 for Ubuntu 22.04, but libpython3.12 for Ubuntu 24.04, so, in my humble opinion, libpython3.11 for Debian 12 should not be a problem.
-
- User Project Contributor
- Posts: 536
- Joined: 2020-11-11 17:42
- Has thanked: 12 times
- Been thanked: 41 times
Re: What is the best way to run ROCm on Debian?
Thanks for the link. According to the planned release milestones, we should be able to expect the RCOm 6.1 deb package in Bookworm repo early 2025 (& we may expect the 6.3+ packages in Sid repo thereafter):
viewtopic.php?t=158450 (quoting my own thread; sorry, can't recall where I got this from)2024-11-30 Transitions underway
2025-01-12 Transition freeze
2025-02-12 Soft freeze (only small, target changes; no NEW)
2025-03-12 Hard freeze
However, I will try the above-mentioned installation guide when I have some time during the New Year holidays. This will be a great example for the need to make an "immutable" Debian (customized live iso).
-
- User Project Contributor
- Posts: 536
- Joined: 2020-11-11 17:42
- Has thanked: 12 times
- Been thanked: 41 times
Re: What is the best way to run ROCm on Debian?
I tried to install ROCm-6.3.1 in Sid. Everything seems to be working OK, except that I had to change from libpython3.10 to libpython3.12. Also download of the deb package was performed unsandboxed as root as the file '/home/user/amdgpu-install_6.3.60301-1_all.deb' couldn't be accessed by user '_apt'.
However, the installation of the rocm package would need 35.7 GB of space; this test was run with my customized Sid live iso ("immutable Debian") which can access only about 8GB of free RAM space. Not even close. Will try again using a persistence drive with enough disk space.
However, the installation of the rocm package would need 35.7 GB of space; this test was run with my customized Sid live iso ("immutable Debian") which can access only about 8GB of free RAM space. Not even close. Will try again using a persistence drive with enough disk space.
-
- User Project Contributor
- Posts: 536
- Joined: 2020-11-11 17:42
- Has thanked: 12 times
- Been thanked: 41 times
Re: What is the best way to run ROCm on Debian?
Installations of both rocm and amdgpu-dkms packages are successful. However, post-installation processing of amdgpu-dkms returned an error message:
log file:
For the sake of completeness, the following are the steps that I used in installing the rocm and gpu-dkms packages in Sid:
Happy ROCming with Debian!
Code: Select all
dpkg: error processing package amdgpu-dkms (--configure): installed amdgpu-dkms package post-installation script subprocess returned error exit status 10
Code: Select all
DKMS make.log for amdgpu-6.10.5-2095006.22.04 for kernel 6.12.6-amd64 (amd64)
Wed Jan 1 07:25:55 PM HST 2025
make: Entering directory '/usr/src/linux-headers-6.12.6-amd64'
/tmp/amd.y2Byqdt6/Makefile:52: *** dma_resv->seq is missing. exit.... Stop.
make[1]: *** [/usr/src/linux-headers-6.12.6-common/Makefile:1962: /tmp/amd.y2Byqdt6] Error 2
make: *** [/usr/src/linux-headers-6.12.6-common/Makefile:236: __sub-make] Error 2
make: Leaving directory '/usr/src/linux-headers-6.12.6-amd64'
Code: Select all
sudo apt update
sudo apt install "linux-headers-$(uname -r)"
sudo apt install python3-setuptools python3-wheel libpython3.12
sudo usermod -a -G render,video $LOGNAME
wget https://repo.radeon.com/amdgpu-install/6.3.1/ubuntu/jammy/amdgpu-install_6.3.60301-1_all.deb
sudo apt install ./amdgpu-install_6.3.60301-1_all.deb
sudo apt update
sudo apt install amdgpu-dkms rocm
-
- Posts: 9
- Joined: 2023-07-26 10:50
- Has thanked: 1 time
- Been thanked: 1 time
Re: What is the best way to run ROCm on Debian?
Debian has ROCm libraries in-repo. They're an older libary version than AMD's but Debian libraries have all architectures since gfx800 compiled so should work on many GPUs that official ROCm doesn't support.
You need either Bookworm Backports kernel or Trixie kernel, those both expose all required kernel interfaces.
There is no need to install the external amdgpu driver or external ROCm drivers. That arguably provides an inferior experience to just using Debian's ROCm.
I don't know about tensorflow, it seems tensorflow-rocm is available in pip.
The debian-ai mailing list would be a better place to discuss this if you can't get it working.
You need either Bookworm Backports kernel or Trixie kernel, those both expose all required kernel interfaces.
There is no need to install the external amdgpu driver or external ROCm drivers. That arguably provides an inferior experience to just using Debian's ROCm.
I don't know about tensorflow, it seems tensorflow-rocm is available in pip.
The debian-ai mailing list would be a better place to discuss this if you can't get it working.