Getting AMD ROCm Working on the RX 6750 XT (Ubuntu 22.04)
I recently went through the process of setting up AMD’s ROCm stack on a desktop with a Ryzen 9 7900X3D and a Radeon RX 6750 XT (Navi 22). It wasn’t entirely plug-and-play — ROCm still doesn’t officially support RDNA2 consumer GPUs — but it can work with the right tweaks.
Here’s the path I took, what didn’t work at first, and how I fixed it.
Why ROCm?
I wanted to build a local AI Note Taker that recently added linux support, but it did not detect GPU acceleration.
System setup
Hardware:
- CPU: AMD Ryzen 9 7900X3D
- GPU: AMD Radeon RX 6750 XT (Navi 22 / gfx1031)
OS: Ubuntu 22.04.
Kernel: 6.8 (with amdgpu built in).
Installing ROCm
ROCm comes as a set of APT packages via the official AMD repo. The basic runtime stack is easy to install:
sudo apt update
sudo apt install rocm-smi-lib hip-runtime-amd rocminfo hipccThat gets you:
- rocminfo(device enumerator)
- hipcc(HIP compiler)
- rocm-smi-lib(system management interface)
- runtime libraries for HIP and HSA.
Making sure it’s on PATH
ROCm installs into a versioned folder (/opt/rocm-6.4.1). I symlinked it to /opt/rocm for convenience:
sudo ln -sfn /opt/rocm-6.4.1 /opt/rocm
echo 'export PATH=/opt/rocm/bin:$PATH' >> ~/.zshrc
exec zsh -lNow rocminfo and hipcc are both available globally.
Permissions and groups
ROCm needs access to /dev/kfd and /dev/dri/*. Make sure your user is in the right groups:
sudo usermod -aG render,video $USERLog out and back in (or reboot). Then check:
ls -l /dev/kfd /dev/driYou should see group ownership as render or video.
Testing the stack
First test:
rocminfo | head -40Initially, I saw only the CPU agent — no GPU. This is because the RX 6750 XT (gfx1031) isn’t officially supported by ROCm.
The magic fix: HSA_OVERRIDE_GFX_VERSION
ROCm’s runtime filters out unrecognized GPUs by GFX ID. Navi 22 (gfx1031) isn’t whitelisted. To make ROCm treat it as a known architecture (gfx1030), I added this:
echo 'export HSA_OVERRIDE_GFX_VERSION=10.3.0' >> ~/.zshrc
exec zsh -lAfter restarting the shell:
rocminfo | grep -A20 gfx1030Now I had a GPU agent:
Name: AMD Radeon RX 6750 XT
Device Type: GPU
Compute Unit: 40
Wavefront Size: 32Checking with HIP
Quick sanity test:
cat <<'EOF' > hip_info.cpp
#include <hip/hip_runtime.h>
#include <cstdio>
int main(){
  int n=0; hipGetDeviceCount(&n);
  printf("HIP devices: %d\n", n);
  for(int i=0;i<n;++i){
    hipDeviceProp_t p{};
    hipGetDeviceProperties(&p,i);
    printf("[%d] %s arch=%d.%d gcn=%s mem=%zuMB\n",
      i,p.name,p.major,p.minor,p.gcnArchName,(size_t)(p.totalGlobalMem/1024/1024));
  }
}
EOF
hipcc --offload-arch=gfx1030 hip_info.cpp -o hip_info
./hip_infoOutput:
HIP devices: 1
[0] AMD Radeon RX 6750 XT arch=10.3 gcn=gfx1030 mem=12272MBOptional: AMD-SMI CLI
AMD now ships a Python-based CLI for managing GPUs. Install it from the ROCm tree:
sudo apt install amd-smi-lib
python3 -m pip install --user /opt/rocm-6.4.1/share/amd_smiThen:
amd-smi version
amd-smiQuick validation kernel
To actually use the GPU:
__global__ void vadd(const float*a,const float*b,float*c,int n){
  int i = blockIdx.x*blockDim.x + threadIdx.x;
  if(i<n) c[i]=a[i]+b[i];
}Build:
hipcc --offload-arch=gfx1030 vadd.cpp -o vadd
./vaddYou’ll see correct output from the GPU kernel.
Takeaways
- The 6750 XT (gfx1031) works fine with ROCm 6.4, but requires HSA_OVERRIDE_GFX_VERSION=10.3.0.
- hipccnow uses- --offload-archinstead of- --amdgpu-target.
- Make sure /opt/rocm/binand~/.local/binare on your PATH.
- Add yourself to renderandvideo.
- The rest “just works.”
Thing's to try next next
Now that it’s running, next steps I’d explore:
- Installing PyTorch ROCm wheels and running a GPU benchmark.
- Trying TensorFlow ROCm builds.
- Packaging the setup in a Docker container with the override baked in.
- Writing a one-liner shell script to automate this setup from scratch.
TL;DR Command Reference
# Install core ROCm stack
sudo apt update
sudo apt install rocm-smi-lib hip-runtime-amd rocminfo hipcc
# Fix the ROCm path
sudo ln -sfn /opt/rocm-6.4.1 /opt/rocm
echo 'export PATH=/opt/rocm/bin:$PATH' >> ~/.zshrc
# Add GPU access permissions
sudo usermod -aG render,video $USER
# Then log out / back in (or reboot)
# Enable Navi 22 GPUs for ROCm (the critical step)
echo 'export HSA_OVERRIDE_GFX_VERSION=10.3.0' >> ~/.zshrc
exec zsh -l
# Verify installation
rocminfo | grep -A2 gfx1030           # Should show GPU agent
hipcc --version                       # Should print HIP/clang version
amd-smi                               # Should list your Radeon card
# Optional: AMD-SMI Python CLI
sudo apt install amd-smi-lib
python3 -m pip install --user /opt/rocm-6.4.1/share/amd_smi
echo 'export PATH=$HOME/.local/bin:$PATH' >> ~/.zshrc
exec zsh -l
# Test HIP runtime
cat <<'EOF' > hip_info.cpp
#include <hip/hip_runtime.h>
#include <cstdio>
int main(){
  int n=0; hipGetDeviceCount(&n);
  printf("HIP devices: %d\n", n);
  for(int i=0;i<n;++i){
    hipDeviceProp_t p{}; hipGetDeviceProperties(&p,i);
    printf("[%d] %s arch=%d.%d gcn=%s mem=%zuMB\n",
      i,p.name,p.major,p.minor,p.gcnArchName,(size_t)(p.totalGlobalMem/1024/1024));
  }
}
EOF
hipcc --offload-arch=gfx1030 hip_info.cpp -o hip_info
./hip_info
# → should print your RX 6750 XT with ~12 GB memory