Skip to content

Instantly share code, notes, and snippets.

@PeronGH
Last active February 13, 2026 18:52
Show Gist options
  • Select an option

  • Save PeronGH/506d063311fa746dd76b6c86a8bdfbdb to your computer and use it in GitHub Desktop.

Select an option

Save PeronGH/506d063311fa746dd76b6c86a8bdfbdb to your computer and use it in GitHub Desktop.
Set up ROCm in WSL on Strix Halo Systems

How to Set up ROCm in WSL on Strix Halo Systems

First, wsl --install Ubuntu-24.04

In Ubuntu 24.04:

Install deps:

sudo apt update
sudo apt install -y ca-certificates wget gpg

Add AMD repo signing key:

sudo mkdir --parents --mode=0755 /etc/apt/keyrings
wget https://repo.radeon.com/rocm/rocm.gpg.key -O - | \
    gpg --dearmor | sudo tee /etc/apt/keyrings/rocm.gpg > /dev/null

Add AMD apt sources:

sudo tee /etc/apt/sources.list.d/rocm.list << EOF
deb [arch=amd64 signed-by=/etc/apt/keyrings/rocm.gpg] https://repo.radeon.com/rocm/apt/latest noble main
deb [arch=amd64 signed-by=/etc/apt/keyrings/rocm.gpg] https://repo.radeon.com/graphics/latest/ubuntu noble main
EOF

Set higher priority for AMD repo:

sudo tee /etc/apt/preferences.d/rocm-pin-600 << EOF
Package: *
Pin: release o=repo.radeon.com
Pin-Priority: 600
EOF

Install WSL-specific runtime:

sudo apt install hsa-runtime-rocr4wsl-amdgpu

Then get latest deb from https://github.com/ROCm/librocdxg/releases and install it.

Then you can install rocm meta package:

sudo apt install rocm

Finally, add these lines to your .bashrc:

export HSA_ENABLE_DXG_DETECTION=1
export PATH=/opt/rocm/bin:$PATH

Verification

sudo apt install rocminfo
rocminfo

PyTorch

pip install --index-url https://repo.amd.com/rocm/whl/gfx1151/ -U torch torchvision torchaudio
@ytoaa
Copy link

ytoaa commented Feb 9, 2026

I think there's a problem with core dump when running comfyui etc. with torch installed in Venv. What did I miss?

@troytse
Copy link

troytse commented Feb 13, 2026

I followed the steps and it prompted as follows:

WSL environment detected.
LoadLib(librocdxg.so) failed: librocdxg.so: cannot open shared object file: No such file or directory
Cannot load librocdxg.so, failed:(null)
dlsym failed: /opt/rocm-7.2.0/bin/../lib/libhsa-runtime64.so.1: undefined symbol: hsaKmtOpenKFD
Segmentation fault (core dumped)

@PeronGH
Copy link
Author

PeronGH commented Feb 13, 2026

I think there's a problem with core dump when running comfyui etc. with torch installed in Venv. What did I miss?

I'm unsure, I can get ComfyUI running stably for multiple models, but it's not any faster than Windows.

@PeronGH
Copy link
Author

PeronGH commented Feb 13, 2026

I followed the steps and it prompted as follows:

WSL environment detected.
LoadLib(librocdxg.so) failed: librocdxg.so: cannot open shared object file: No such file or directory
Cannot load librocdxg.so, failed:(null)
dlsym failed: /opt/rocm-7.2.0/bin/../lib/libhsa-runtime64.so.1: undefined symbol: hsaKmtOpenKFD
Segmentation fault (core dumped)

It could be https://github.com/ROCm/librocdxg not installed correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment