Any updates on using AMDGPU in WSL?

I have seen the previous question here which said that AMDGPU was still unsupported in Windows as of a year ago. Is this possible in 2025?

I have done the following steps so far:

  • installed WSL2 (Ubuntu 24.04)
  • installed AMD’s GPU packages for linux in WSL (amdgpu-install)
  • set HSA_OVERRRIDE_GFX_VERSION=9.0.0 as in the linked post above

running Pkg.test("AMDGPU", test_args=["hip"]) in WSL gives the following error message:

ROCR: unsupported GPU
Julia Version 1.11.3
Commit d63adeda50d (2025-01-21 19:42 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 16 × AMD Ryzen 7 PRO 4750U with Radeon Graphics
  WORD_SIZE: 64
  LLVM: libLLVM-16.0.6 (ORCJIT, znver2)
Threads: 1 default, 0 interactive, 1 GC (on 16 virtual cores)
Environment:
  JULIA_LOAD_PATH = @:/tmp/jl_vaukp0
[ Info: AMDGPU versioninfo
┌───────────┬──────────────────┬───────────┬────────────────────────────────────────────────────────────────────────────
│ Available │ Name             │ Version   │ Path                                                                      ⋯
├───────────┼──────────────────┼───────────┼────────────────────────────────────────────────────────────────────────────
│     +     │ LLD              │ -         │ /opt/rocm/llvm/bin/ld.lld                                                 ⋯
│     +     │ Device Libraries │ -         │ /home/*/.julia/artifacts/.../am ⋯
│     +     │ HIP              │ 6.2.41134 │ /opt/rocm/lib/libamdhip64.so                                              ⋯
│     +     │ rocBLAS          │ 4.2.1     │ /opt/rocm/lib/librocblas.so                                               ⋯
│     +     │ rocSOLVER        │ 3.26.0    │ /opt/rocm/lib/librocsolver.so                                             ⋯
│     +     │ rocSPARSE        │ -         │ /opt/rocm/lib/librocsparse.so                                             ⋯
│     +     │ rocRAND          │ 2.10.5    │ /opt/rocm/lib/librocrand.so                                               ⋯
│     +     │ rocFFT           │ 1.0.27    │ /opt/rocm/lib/librocfft.so                                                ⋯
│     +     │ MIOpen           │ 3.2.0     │ /opt/rocm/lib/libMIOpen.so                                                ⋯
└───────────┴──────────────────┴───────────┴────────────────────────────────────────────────────────────────────────────
                                                                                                        1 column omitted

[ Info: AMDGPU devices
ERROR: LoadError: HIPError(code hipErrorNoDevice, no device found)
Stacktrace:
 [1] check
   @ ~/.julia/packages/AMDGPU/0tq5E/src/hip/error.jl:145 [inlined]
 [2] macro expansion
   @ ~/.julia/packages/AMDGPU/0tq5E/src/utils.jl:123 [inlined]
 [3] hipGetDeviceCount(count::Base.RefValue{Int32})
   @ AMDGPU.HIP ~/.julia/packages/AMDGPU/0tq5E/src/hip/libhip.jl:42
 [4] ndevices
   @ ~/.julia/packages/AMDGPU/0tq5E/src/hip/device.jl:103 [inlined]
 [5] devices()
   @ AMDGPU.HIP ~/.julia/packages/AMDGPU/0tq5E/src/hip/device.jl:115
 [6] versioninfo()
   @ AMDGPU ~/.julia/packages/AMDGPU/0tq5E/src/utils.jl:25
 [7] top-level scope
   @ ~/.julia/packages/AMDGPU/0tq5E/test/runtests.jl:109
 [8] include(fname::String)
   @ Main ./sysimg.jl:38
 [9] top-level scope
   @ none:6
in expression starting at /home/*/.julia/packages/AMDGPU/0tq5E/test/runtests.jl:109
ERROR: Package AMDGPU errored during testing
Stacktrace:
 [1] pkgerror(msg::String)
   @ Pkg.Types ~/.julia/juliaup/julia-1.11.3+0.x64.linux.gnu/share/julia/stdlib/v1.11/Pkg/src/Types.jl:68
 [2] test(ctx::Pkg.Types.Context, pkgs::Vector{…}; coverage::Bool, julia_args::Cmd, test_args::Cmd, test_fn::Nothing, force_latest_compatible_version::Bool, allow_earlier_backwards_compatible_versions::Bool, allow_reresolve::Bool)
   @ Pkg.Operations ~/.julia/juliaup/julia-1.11.3+0.x64.linux.gnu/share/julia/stdlib/v1.11/Pkg/src/Operations.jl:2118
 [3] test
   @ ~/.julia/juliaup/julia-1.11.3+0.x64.linux.gnu/share/julia/stdlib/v1.11/Pkg/src/Operations.jl:2003 [inlined]
 [4] test(ctx::Pkg.Types.Context, pkgs::Vector{…}; coverage::Bool, test_fn::Nothing, julia_args::Cmd, test_args::Vector{…}, force_latest_compatible_version::Bool, allow_earlier_backwards_compatible_versions::Bool, allow_reresolve::Bool, kwargs::@Kwargs{…})
   @ Pkg.API ~/.julia/juliaup/julia-1.11.3+0.x64.linux.gnu/share/julia/stdlib/v1.11/Pkg/src/API.jl:481
 [5] test(pkgs::Vector{Pkg.Types.PackageSpec}; io::IOContext{IO}, kwargs::@Kwargs{test_args::Vector{String}})
   @ Pkg.API ~/.julia/juliaup/julia-1.11.3+0.x64.linux.gnu/share/julia/stdlib/v1.11/Pkg/src/API.jl:159
 [6] test
   @ ~/.julia/juliaup/julia-1.11.3+0.x64.linux.gnu/share/julia/stdlib/v1.11/Pkg/src/API.jl:147 [inlined]
 [7] #test#74
   @ ~/.julia/juliaup/julia-1.11.3+0.x64.linux.gnu/share/julia/stdlib/v1.11/Pkg/src/API.jl:146 [inlined]
 [8] top-level scope
   @ REPL[5]:1
Some type information was truncated. Use `show(err)` to see complete types.

I am not permitted to properly install Linux on this laptop. Is there anything I am missing to fix the “ROCR: GPU unsupported error” or is this still impossible to fix?

I’m not sure about the status of ROCm under WSL. But we do have support for Windows (except for MIOpen).

What is your GPU? If its not gfx9xx, then there’s no point in HSA_OVERRRIDE_GFX_VERSION=9.0.0.

The only information I can find about my GPU in system settings is “AMD Radeon(TM) Graphics” - I’m not sure of the model number.

Further info on GPU:

I recently tried to get this running and was a bit disappointed that support got worse
I’m not sure what’s going on but half/year ago, I got it to work and windows/amd/wsl drivers all worked without a problem out of the box without doing anything special.

Now, I dont get it to work even with starting from scratch and following every hint on the internet I could find.

Seems like nobody at Microsoft/AMD has the WSL GPU stack in their CI setup :frowning:
Maybe worth pinging the WSL issues on github about this.

Can you execute rocminfo in the WSL?

No, this does not work (so I’m guessing it’s a WSL issue rather than a Julia one)

WSL environment detected.
ROCR: unsupported GPU
hsa api call failure at: /long_pathname_so_that_rpms_can_package_the_debug_info/src/rocminfo/rocminfo.cc:1306
Call returned HSA_STATUS_ERROR_OUT_OF_RESOURCES: The runtime failed to allocate the necessary resources. This error may also occur when the core runtime library needs to spawn threads or create internal OS-specific events.

I installed the linux drivers with the WSL options as
amdgpu-install -y --usecase=wsl,rocm --no-dkms

If your GPU is integrated (which looks to me like the case) then it is also not supported by ROCm

I actually have to correct my previous post!

ROCm does seem to work fine on WSL for me on my 7900xtx.
But the OpenGL driver seem to have some problems.
The AMDGPU tests fail though ( I think this may be a known problem?).


The AMDGPU tests fail though ( I think this may be a known problem?).

No, our CI runs on RX7900XTX & RX7800XT and all tests pass there.
Please open an issue, there should be detailed stacktraces in the logs above for this error.
Is this on master branch or latest release?