# Any updates on using AMDGPU in WSL?

**URL:** <https://discourse.julialang.org/t/any-updates-on-using-amdgpu-in-wsl/125617>\
**Category:** New to Julia\
**Tags:** gpu, wsl2, amdgpu\
**Created:** [February 6, 2025, 11:46am UTC](https://discourse.julialang.org/t/any-updates-on-using-amdgpu-in-wsl/125617 "2025-02-06T11:46:09Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![ed123](https://avatars.discourse-cdn.com/v4/letter/e/9e8a1a/32.png) [@ed123](https://discourse.julialang.org/u/ed123)\
**Post date:** [February 6, 2025, 11:46am UTC](https://discourse.julialang.org/t/any-updates-on-using-amdgpu-in-wsl/125617/1 "2025-02-06T11:46:09Z")

</div>

I have seen the previous question [here](https://discourse.julialang.org/t/unable-to-test-or-use-hip-libraries-on-windows-10/109639/4) 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:

```julia
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?

---

<div class="post-metadata">

**Author:** ![pxl-th](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pxl-th/32/31939_2.png) [@pxl-th](https://discourse.julialang.org/u/pxl-th)\
**Post date:** [February 6, 2025, 12:10pm UTC](https://discourse.julialang.org/t/any-updates-on-using-amdgpu-in-wsl/125617/2 "2025-02-06T12:10:00Z")

</div>

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`.

---

<div class="post-metadata">

**Author:** ![ed123](https://avatars.discourse-cdn.com/v4/letter/e/9e8a1a/32.png) [@ed123](https://discourse.julialang.org/u/ed123)\
**Post date:** [February 6, 2025, 12:29pm UTC](https://discourse.julialang.org/t/any-updates-on-using-amdgpu-in-wsl/125617/3 "2025-02-06T12:29:09Z")

</div>

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:

 ![gpuinfo](https://global.discourse-cdn.com/julialang/original/3X/f/5/f5487837b348618d09cdc60781ba5edf82b58345.png)

---

<div class="post-metadata">

**Author:** ![sdanisch](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sdanisch/32/1406_2.png) [@sdanisch](https://discourse.julialang.org/u/sdanisch)\
**Post date:** [February 6, 2025, 12:32pm UTC](https://discourse.julialang.org/t/any-updates-on-using-amdgpu-in-wsl/125617/4 "2025-02-06T12:32:39Z")

</div>

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 ☹  
Maybe worth pinging the WSL issues on github about this.

---

<div class="post-metadata">

**Author:** ![pxl-th](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pxl-th/32/31939_2.png) [@pxl-th](https://discourse.julialang.org/u/pxl-th)\
**Post date:** [February 6, 2025, 12:53pm UTC](https://discourse.julialang.org/t/any-updates-on-using-amdgpu-in-wsl/125617/5 "2025-02-06T12:53:40Z")

</div>

Can you execute `rocminfo` in the WSL?

---

<div class="post-metadata">

**Author:** ![ed123](https://avatars.discourse-cdn.com/v4/letter/e/9e8a1a/32.png) [@ed123](https://discourse.julialang.org/u/ed123)\
**Post date:** [February 6, 2025, 1:02pm UTC](https://discourse.julialang.org/t/any-updates-on-using-amdgpu-in-wsl/125617/6 "2025-02-06T13:02:46Z")

</div>

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

```sh
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`

---

<div class="post-metadata">

**Author:** ![pxl-th](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pxl-th/32/31939_2.png) [@pxl-th](https://discourse.julialang.org/u/pxl-th)\
**Post date:** [February 6, 2025, 1:17pm UTC](https://discourse.julialang.org/t/any-updates-on-using-amdgpu-in-wsl/125617/7 "2025-02-06T13:17:38Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![sdanisch](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sdanisch/32/1406_2.png) [@sdanisch](https://discourse.julialang.org/u/sdanisch)\
**Post date:** [February 6, 2025, 4:35pm UTC](https://discourse.julialang.org/t/any-updates-on-using-amdgpu-in-wsl/125617/8 "2025-02-06T16:35:51Z")

</div>

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?).

 ![image](https://global.discourse-cdn.com/julialang/original/3X/b/6/b624333d739dff349283d26b9f8fe3d794965bdd.png)  
 ![image](https://global.discourse-cdn.com/julialang/original/3X/4/1/4108a622370806729cd09c009880dca4f76fd294.png)

---

<div class="post-metadata">

**Author:** ![pxl-th](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pxl-th/32/31939_2.png) [@pxl-th](https://discourse.julialang.org/u/pxl-th)\
**Post date:** [February 6, 2025, 4:46pm UTC](https://discourse.julialang.org/t/any-updates-on-using-amdgpu-in-wsl/125617/9 "2025-02-06T16:46:22Z")

</div>

> 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](https://buildkite.com/julialang/amdgpu-dot-jl).  
Please open an issue, there should be detailed stacktraces in the logs above for this error.  
Is this on `master` branch or latest release?
