Page 1 of 1
What is the best way to run ROCm on Debian?
Posted: 2024-12-19 17:02
by td211
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?
Re: What is the best way to run ROCm on Debian?
Posted: 2024-12-22 01:19
by ruwolf
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!
Re: What is the best way to run ROCm on Debian?
Posted: 2024-12-22 07:09
by Aki
Hello,
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?
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
Re: What is the best way to run ROCm on Debian?
Posted: 2024-12-23 07:23
by td211
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.
Re: What is the best way to run ROCm on Debian?
Posted: 2024-12-23 11:45
by ruwolf
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.
Re: What is the best way to run ROCm on Debian?
Posted: 2024-12-24 16:36
by pwzhangzz
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):
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
viewtopic.php?t=158450 (quoting my own thread; sorry, can't recall where I got this from)
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).
Re: What is the best way to run ROCm on Debian?
Posted: 2025-01-01 23:59
by pwzhangzz
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.
Re: What is the best way to run ROCm on Debian?
Posted: 2025-01-02 07:17
by pwzhangzz
Installations of both rocm and amdgpu-dkms packages are successful. However, post-installation processing of amdgpu-dkms returned an error message:
Code: Select all
dpkg: error processing package amdgpu-dkms (--configure): installed amdgpu-dkms package post-installation script subprocess returned error exit status 10
log file:
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'
For the sake of completeness, the following are the steps that I used in installing the rocm and gpu-dkms packages in Sid:
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
Happy ROCming
with Debian!
Re: What is the best way to run ROCm on Debian?
Posted: 2025-01-17 10:06
by superjamie
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.