[GH-ISSUE #3982] [Engine] WSL2 + AMD RX 9060 XT (gfx1200): bundled HIP engine finds no GPU (hipErrorNoDevice) #1712

Closed
opened 2026-11-04 01:53:24 +07:00 by bsakaguchi · 4 comments
Owner

Originally created by @iNaD on GitHub (Oct 24, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/3982

Disclaimer: This issue was written by Claude Sonnet, I used it to debug the WSL setup and got it working this way.

Environment

  • Windows 11, Smart App Control enabled (so the native Windows build cannot be used), WSL2 Ubuntu 24.04
  • CPU: Ryzen 5 7500F, 32 GB RAM (WSL limited to 22 GB via .wslconfig), GPU: AMD Radeon RX 9060 XT 16 GB (gfx1200)
  • Windows AMD driver: 26.10.1 (Adrenalin) / 26.20.15.07-261015a-205306C-AMD-Software-Adrenalin-Edition (Driver)
  • ROCm 7.2.0 in /opt/rocm-7.2.0, WSL runtime from hsa-runtime-rocr4wsl-amdgpu 25.30.13 (also hsa-rocr-dev 1.18.0.70200 installed)
  • Strata 0.1.48, engine 0.1.48-linux-x86_64-hip-rx9070, model coder IQ1_M (~55 GB on disk)

Problem

rocminfo works in WSL and lists the GPU (gfx1200). strata doctor shows everything ok, except gpu_driver_probe: unverified. Starting the model fails with:

strata generate: PCIe probe failed -> pcie_frac default 0.55
strata generate: native embedding: cannot pin 322 MiB: no ROCm-capable device is detected, nor place it in VRAM

With AMD_LOG_LEVEL=3 the engine loads its own libamdhip64.so.7 and returns hipGetDeviceCount: Returned hipErrorNoDevice. The launcher then reports "no graphics card that Strata can use was found".

Cause (my analysis, not confirmed by the maintainers)

The engine directory contains its own libhsa-runtime64.so.1. This is a regular Linux runtime that talks to /dev/kfd, which does not exist in WSL (WSL uses /dev/dxg). The system's libhsa-runtime64.so.1 from hsa-runtime-rocr4wsl-amdgpu is the one that finds the GPU.

What I tried

  1. Replacing the bundled libhsa-runtime64.so.1 with a symlink to /opt/rocm-7.2.0/lib/libhsa-runtime64.so.1: the engine then sees the GPU (Gfx Major/Minor/Stepping: 12/0/0, hipGetDeviceCount: Returned hipSuccess), but the launcher refuses to start because the engine is flagged as manipulated.
  2. HSA_ENABLE_DXG_DETECTION=1: fails, LoadLib(librocdxg.so) failed, then undefined symbol: hsaKmtOpenKFD and a segfault. librocdxg is not installed, and the rocr4wsl runtime did not need it without this variable.

Working setup

Building the engine from source against the system ROCm, following docs/AMD_HIP.md (manual cmake build, no setup.sh, because KFD detection does not work in WSL):

export ROCM_PATH=/opt/rocm-7.2.0
cmake -S . -B build-hip -DCMAKE_BUILD_TYPE=Release \
  -DSTRATA_ENABLE_HIP=ON -DSTRATA_ENABLE_CUDA=OFF \
  -DCMAKE_HIP_ARCHITECTURES=gfx1200 \
  -DCMAKE_HIP_COMPILER=/opt/rocm-7.2.0/llvm/bin/clang++ \
  -DCMAKE_PREFIX_PATH=/opt/rocm-7.2.0
cmake --build build-hip --target strata -j4

The build succeeds (only -Wunused-result warnings for hipFree). The resulting binary links against the system HSA/HIP libraries, detects the GPU as gfx1200 (RDNA4, gfx12 defaults are applied) and runs via python -m serve.server --engine strata --config ... --port 8080 with exe set to build-hip/strata.

Arguments that work:
--serve --pack ... --native ... --ple-gguf ... --mmap-experts --expert-profile ... --expert-cache auto --prefill auto --spec 4 --spec-min-p 0.5 --mtp ... --max-context 65536 --kv int8 --vram-reserve-mib 2048

Notes:

  • Without --mmap-experts the start filled the 22 GB of WSL RAM, CPU stayed at 100% and WSL froze completely (not even wsl --shutdown worked). With it, RAM use stays at ~2 GB (the rest is page cache).
  • With 65536 context: 3530 experts (6.73 GiB) in the expert cache, ~1.7 GiB VRAM free.
  • I first used --pcie-frac 0 --adapt-every 0 from the AMD_HIP.md example. Removing both raised the expert cache hit rate from ~38% to ~80% on repeated prompts, with similar speed.
  • Speed: 25-35 tok/s (300-token answers, short prompt). Natively on Windows I got 32-40 tok/s with the same model.

Requests / suggestions

  1. Detect WSL (e.g. /dev/dxg) in the GPU detection and strata doctor, and say so instead of reporting "no graphics card".
  2. In WSL, either do not use the bundled libhsa-runtime64, or document that it cannot work there.
  3. Allow an official, supported way to use a custom engine build (or the system HSA runtime) without the integrity check reporting "manipulated".
  4. Document gfx1200 (RX 9060 XT) and WSL2 in AMD_HIP.md, including that --mmap-experts is needed to avoid the RAM exhaustion above.
  5. The PCIe probe fails in WSL. A documented fallback or recommended --pcie-frac value for WSL would help.

I can provide full logs if useful.

Originally created by @iNaD on GitHub (Oct 24, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/3982 Disclaimer: This issue was written by Claude Sonnet, I used it to debug the WSL setup and got it working this way. ### Environment - Windows 11, Smart App Control enabled (so the native Windows build cannot be used), WSL2 Ubuntu 24.04 - CPU: Ryzen 5 7500F, 32 GB RAM (WSL limited to 22 GB via `.wslconfig`), GPU: AMD Radeon RX 9060 XT 16 GB (gfx1200) - Windows AMD driver: 26.10.1 (Adrenalin) / 26.20.15.07-261015a-205306C-AMD-Software-Adrenalin-Edition (Driver) - ROCm 7.2.0 in `/opt/rocm-7.2.0`, WSL runtime from `hsa-runtime-rocr4wsl-amdgpu 25.30.13` (also `hsa-rocr-dev 1.18.0.70200` installed) - Strata 0.1.48, engine `0.1.48-linux-x86_64-hip-rx9070`, model coder IQ1_M (~55 GB on disk) ### Problem `rocminfo` works in WSL and lists the GPU (gfx1200). `strata doctor` shows everything `ok`, except `gpu_driver_probe: unverified`. Starting the model fails with: ``` strata generate: PCIe probe failed -> pcie_frac default 0.55 strata generate: native embedding: cannot pin 322 MiB: no ROCm-capable device is detected, nor place it in VRAM ``` With `AMD_LOG_LEVEL=3` the engine loads its own `libamdhip64.so.7` and returns `hipGetDeviceCount: Returned hipErrorNoDevice`. The launcher then reports "no graphics card that Strata can use was found". ### Cause (my analysis, not confirmed by the maintainers) The engine directory contains its own `libhsa-runtime64.so.1`. This is a regular Linux runtime that talks to `/dev/kfd`, which does not exist in WSL (WSL uses `/dev/dxg`). The system's `libhsa-runtime64.so.1` from `hsa-runtime-rocr4wsl-amdgpu` is the one that finds the GPU. ### What I tried 1. Replacing the bundled `libhsa-runtime64.so.1` with a symlink to `/opt/rocm-7.2.0/lib/libhsa-runtime64.so.1`: the engine then sees the GPU (`Gfx Major/Minor/Stepping: 12/0/0`, `hipGetDeviceCount: Returned hipSuccess`), but the launcher refuses to start because the engine is flagged as manipulated. 2. `HSA_ENABLE_DXG_DETECTION=1`: fails, `LoadLib(librocdxg.so) failed`, then `undefined symbol: hsaKmtOpenKFD` and a segfault. `librocdxg` is not installed, and the `rocr4wsl` runtime did not need it without this variable. ### Working setup Building the engine from source against the system ROCm, following `docs/AMD_HIP.md` (manual `cmake` build, no `setup.sh`, because KFD detection does not work in WSL): ``` export ROCM_PATH=/opt/rocm-7.2.0 cmake -S . -B build-hip -DCMAKE_BUILD_TYPE=Release \ -DSTRATA_ENABLE_HIP=ON -DSTRATA_ENABLE_CUDA=OFF \ -DCMAKE_HIP_ARCHITECTURES=gfx1200 \ -DCMAKE_HIP_COMPILER=/opt/rocm-7.2.0/llvm/bin/clang++ \ -DCMAKE_PREFIX_PATH=/opt/rocm-7.2.0 cmake --build build-hip --target strata -j4 ``` The build succeeds (only `-Wunused-result` warnings for `hipFree`). The resulting binary links against the system HSA/HIP libraries, detects the GPU as gfx1200 (RDNA4, gfx12 defaults are applied) and runs via `python -m serve.server --engine strata --config ... --port 8080` with `exe` set to `build-hip/strata`. Arguments that work: `--serve --pack ... --native ... --ple-gguf ... --mmap-experts --expert-profile ... --expert-cache auto --prefill auto --spec 4 --spec-min-p 0.5 --mtp ... --max-context 65536 --kv int8 --vram-reserve-mib 2048` Notes: - Without `--mmap-experts` the start filled the 22 GB of WSL RAM, CPU stayed at 100% and WSL froze completely (not even `wsl --shutdown` worked). With it, RAM use stays at ~2 GB (the rest is page cache). - With 65536 context: 3530 experts (6.73 GiB) in the expert cache, ~1.7 GiB VRAM free. - I first used `--pcie-frac 0 --adapt-every 0` from the AMD_HIP.md example. Removing both raised the expert cache hit rate from ~38% to ~80% on repeated prompts, with similar speed. - Speed: 25-35 tok/s (300-token answers, short prompt). Natively on Windows I got 32-40 tok/s with the same model. ### Requests / suggestions 1. Detect WSL (e.g. `/dev/dxg`) in the GPU detection and `strata doctor`, and say so instead of reporting "no graphics card". 2. In WSL, either do not use the bundled `libhsa-runtime64`, or document that it cannot work there. 3. Allow an official, supported way to use a custom engine build (or the system HSA runtime) without the integrity check reporting "manipulated". 4. Document gfx1200 (RX 9060 XT) and WSL2 in `AMD_HIP.md`, including that `--mmap-experts` is needed to avoid the RAM exhaustion above. 5. The PCIe probe fails in WSL. A documented fallback or recommended `--pcie-frac` value for WSL would help. I can provide full logs if useful.
Author
Owner

@github-actions[bot] commented on GitHub (Oct 24, 2026):

Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing:

  • Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other], then a short description. Example: "[Engine] decode stops after 2 minutes".

Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment /reopen.

Details: CONTRIBUTING.md

<!-- gh-comment-id:6386474827 --> @github-actions[bot] commented on GitHub (Oct 24, 2026): Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing: - [ ] Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other], then a short description. Example: "[Engine] decode stops after 2 minutes". Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment `/reopen`. Details: [CONTRIBUTING.md](https://github.com/Niko1221/Strata/blob/main/CONTRIBUTING.md)
Author
Owner

@github-actions[bot] commented on GitHub (Oct 24, 2026):

Thanks, this follows the format now.

<!-- gh-comment-id:6386486110 --> @github-actions[bot] commented on GitHub (Oct 24, 2026): Thanks, this follows the format now.
Author
Owner

@Retina-sys commented on GitHub (Oct 24, 2026):

imho strata is way too complicated to properly setup for what it is. similar issue I've got but for the windows hip.exe package.

<!-- gh-comment-id:6389118980 --> @Retina-sys commented on GitHub (Oct 24, 2026): imho strata is way too complicated to properly setup for what it is. similar issue I've got but for the windows hip.exe package.
Author
Owner

@Niko1221 commented on GitHub (Nov 5, 2026):

Thanks for taking the time to report this.

Strata has changed a lot since this was opened, and 0.2.11 is out now, so many older reports no longer apply. We're closing issues older than a week that have had no new reports in the last week. Closed here does not mean rejected.

To reopen it takes about two minutes:

  1. Re-test on 0.2.11. It may already be fixed. Write down what you see.
  2. Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other].
  3. Fill in the parts of the issue form: what happened, the Strata version, your graphics card, memory and system.
  4. Comment /reopen. A check runs and either reopens the issue or lists what is still missing.

The rules are in CONTRIBUTING.md.

<!-- gh-comment-id:6659836449 --> @Niko1221 commented on GitHub (Nov 5, 2026): Thanks for taking the time to report this. Strata has changed a lot since this was opened, and 0.2.11 is out now, so many older reports no longer apply. We're closing issues older than a week that have had no new reports in the last week. Closed here does not mean rejected. To reopen it takes about two minutes: 1. Re-test on 0.2.11. It may already be fixed. Write down what you see. 2. Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other]. 3. Fill in the parts of the issue form: what happened, the Strata version, your graphics card, memory and system. 4. Comment `/reopen`. A check runs and either reopens the issue or lists what is still missing. The rules are in [CONTRIBUTING.md](https://github.com/Niko1221/Strata/blob/main/CONTRIBUTING.md).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#1712
No description provided.