[GH-ISSUE #918] Windows: Radeon 8060S (gfx1151) builds, selftests and passes the HIP ctest on top of #895 #397

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

Originally created by @storm-ace on GitHub (Oct 5, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/918

On top of #895 (Linux gfx1151) I made the Windows side work on a Radeon 8060S, for the gfx1151 port mentioned in #612. The branch is ready if it helps; I can open it as a PR on #895 or on main once #895 is in, whichever you prefer.

Branch: https://github.com/storm-ace/Strata/tree/windows-gfx1151 (one commit on #895's head 598e9a2: diff)

Test machine

Laptop, Ryzen AI Max+ PRO 395, Radeon 8060S (gfx1151, PCI 1002:1586), 64 GB with a 16 GB firmware carve-out, Windows 11 Pro 26200, AMD driver 32.0.22018.5, TheRock ROCm 10.2.0a20260930 (the version build_windows.bat pins).

On Windows this APU's memory looks different from Linux: Windows reports 47.8 GB of RAM (the carve-out is outside it), the display registry 16 GB of VRAM, and HIP 43.8 GiB (carve-out plus shared RAM).

What changes

  • setup: the 8060S / 8050S by PCI id 0x1586 or by name. Both the registry figure and HIP's are marked shared_memory, so neither adds to system RAM in the model choice (the same rule #895 uses on Linux).
  • engine: #895's APU cap on the automatic expert cache (generate.cpp, host available memory minus 4 GiB) now also runs on Windows, where host_available_memory() already has a GlobalMemoryStatusEx branch. On Windows it adds what is left of the carve-out (DXGI DedicatedVideoMemory less the process's local usage, new hip_compat::apu_dedicated_free() next to the WDDM budget code), since Windows keeps the carve-out outside system RAM. The arch check (gfx1151) also covers a runtime that does not set integrated.
  • build_windows.bat: gfx1151 in the default STRATA_HIP_ARCHS. TheRock has a rocm-sdk-device-gfx1151 wheel for Windows.
  • package_windows.py: rocBLAS ships gfx1151's kernels as a folder (rocblas/library/gfx1151/, 150 files) instead of loose files; the packager now copies a folder with copytree (it failed with PermissionError on copy2).
  • tests/hip/prefill_mmq_parity.cpp: see below.

Results on that machine

  • tools\hip\build_windows.bat tests: builds all 280 targets and packages the zip with gfx1151.
  • strata-device --selftest: OK (gfx1151, wave32, 20 CUs, 43.8 GiB).
  • HIP ctest: 60 of 65 pass, 2 skipped. The 5 failures are the known ones: hip_handoff (Windows), ple_parity / expert_parity / pool_test (model fixtures), expert_cache_segmented_test (--vram-elastic is CUDA-only).
  • python tools/test_setup_*.py: all pass, with a new test_strix_halo.
  • Not yet: a model run on Windows.

hip_prefill_mmq_parity: a test race, not a kernel bug

It first failed with non-finite or unwritten MMQ output. Every output value still held the 0xff sentinel bits; HIP returned success for the launch. What I checked:

  • The gfx1151 code object of mul_mat_q<Q2_0, 16, false> has the same instruction mix as gfx1100's (16 v_wmma, 8 global stores, 109 ds_*, no s_trap); only s_delay_alu hints differ (21 vs 24).
  • The sentinel is written with hipMemset on the null stream, the kernel runs on a hipStreamNonBlocking stream, and those do not order against each other. With a hipDeviceSynchronize() after the memset all six products pass at 0.05-0.13% relative L2.
  • The fix sets the sentinel with hipMemsetAsync(..., stream). The test then passes without the extra sync. It does not depend on gfx1151: on other cards the race was just won.

The HIP runtime also logs KMD failed to setup the trap handler on this APU under Windows, so a device-side trap would end a kernel without an error there. That was not the cause here, but it is worth knowing when a Windows gfx1151 kernel "does nothing".

Originally created by @storm-ace on GitHub (Oct 5, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/918 On top of #895 (Linux gfx1151) I made the Windows side work on a Radeon 8060S, for the gfx1151 port mentioned in #612. The branch is ready if it helps; I can open it as a PR on #895 or on main once #895 is in, whichever you prefer. **Branch:** https://github.com/storm-ace/Strata/tree/windows-gfx1151 (one commit on #895's head `598e9a2`: [diff](https://github.com/storm-ace/Strata/compare/598e9a2...windows-gfx1151)) ## Test machine Laptop, Ryzen AI Max+ PRO 395, Radeon 8060S (gfx1151, PCI `1002:1586`), 64 GB with a 16 GB firmware carve-out, Windows 11 Pro 26200, AMD driver 32.0.22018.5, TheRock ROCm 10.2.0a20260930 (the version `build_windows.bat` pins). On Windows this APU's memory looks different from Linux: Windows reports 47.8 GB of RAM (the carve-out is outside it), the display registry 16 GB of VRAM, and HIP 43.8 GiB (carve-out plus shared RAM). ## What changes - **setup:** the 8060S / 8050S by PCI id `0x1586` or by name. Both the registry figure and HIP's are marked `shared_memory`, so neither adds to system RAM in the model choice (the same rule #895 uses on Linux). - **engine:** #895's APU cap on the automatic expert cache (`generate.cpp`, host available memory minus 4 GiB) now also runs on Windows, where `host_available_memory()` already has a `GlobalMemoryStatusEx` branch. On Windows it adds what is left of the carve-out (DXGI `DedicatedVideoMemory` less the process's local usage, new `hip_compat::apu_dedicated_free()` next to the WDDM budget code), since Windows keeps the carve-out outside system RAM. The arch check (`gfx1151`) also covers a runtime that does not set `integrated`. - **build_windows.bat:** gfx1151 in the default `STRATA_HIP_ARCHS`. TheRock has a `rocm-sdk-device-gfx1151` wheel for Windows. - **package_windows.py:** rocBLAS ships gfx1151's kernels as a folder (`rocblas/library/gfx1151/`, 150 files) instead of loose files; the packager now copies a folder with `copytree` (it failed with `PermissionError` on `copy2`). - **tests/hip/prefill_mmq_parity.cpp:** see below. ## Results on that machine - `tools\hip\build_windows.bat tests`: builds all 280 targets and packages the zip with gfx1151. - `strata-device --selftest`: OK (gfx1151, wave32, 20 CUs, 43.8 GiB). - HIP ctest: **60 of 65 pass**, 2 skipped. The 5 failures are the known ones: `hip_handoff` (Windows), `ple_parity` / `expert_parity` / `pool_test` (model fixtures), `expert_cache_segmented_test` (`--vram-elastic` is CUDA-only). - `python tools/test_setup_*.py`: all pass, with a new `test_strix_halo`. - **Not yet:** a model run on Windows. ## `hip_prefill_mmq_parity`: a test race, not a kernel bug It first failed with `non-finite or unwritten MMQ output`. Every output value still held the `0xff` sentinel bits; HIP returned success for the launch. What I checked: - The gfx1151 code object of `mul_mat_q<Q2_0, 16, false>` has the same instruction mix as gfx1100's (16 `v_wmma`, 8 global stores, 109 `ds_*`, no `s_trap`); only `s_delay_alu` hints differ (21 vs 24). - The sentinel is written with `hipMemset` on the null stream, the kernel runs on a `hipStreamNonBlocking` stream, and those do not order against each other. With a `hipDeviceSynchronize()` after the memset all six products pass at 0.05-0.13% relative L2. - The fix sets the sentinel with `hipMemsetAsync(..., stream)`. The test then passes without the extra sync. It does not depend on gfx1151: on other cards the race was just won. The HIP runtime also logs `KMD failed to setup the trap handler` on this APU under Windows, so a device-side trap would end a kernel without an error there. That was not the cause here, but it is worth knowing when a Windows gfx1151 kernel "does nothing".
Author
Owner

@Niko1221 commented on GitHub (Oct 7, 2026):

Thanks for the Windows gfx1151 work. From the branch, 0.1.40.2 takes the prefill_mmq_parity memset fix (the test queued the memset on the null stream, so it landed after the kernel on a non-blocking stream) with credit to you in the commit. The carve-out accounting (apu_dedicated_free and the expert-cache limit) is not in: we have no Windows gfx1151 machine to run it on, and the cache limit would warn rather than cap. If you can test a build of the current branch on your laptop, tell us and we will port that part with your authorship.

<!-- gh-comment-id:6037874624 --> @Niko1221 commented on GitHub (Oct 7, 2026): Thanks for the Windows gfx1151 work. From the branch, 0.1.40.2 takes the prefill_mmq_parity memset fix (the test queued the memset on the null stream, so it landed after the kernel on a non-blocking stream) with credit to you in the commit. The carve-out accounting (apu_dedicated_free and the expert-cache limit) is not in: we have no Windows gfx1151 machine to run it on, and the cache limit would warn rather than cap. If you can test a build of the current branch on your laptop, tell us and we will port that part with your authorship.
Author
Owner

@storm-ace commented on GitHub (Oct 8, 2026):

Thanks for taking the memset fix. Yes, I can test on the laptop. Here is what I have so far, all on my branch (two commits since this issue was opened: 76890d4 and 9bd3d50), not yet on your current main.

First model run on Windows gfx1151

Same laptop: Ryzen AI Max+ PRO 395, Radeon 8060S, 64 GB with a 16 GB carve-out, Windows 11 Pro 26200, AMD driver 32.0.22018.5, TheRock ROCm 10.2.0a20260930. Qwen3.8-Flash-Next IQ2_XS, 64K context, --kv int8, MTP on, reasoning off, temperature 0.

What the first start needed:

  • Setup's mode choice. Setup picked the usual mode: every expert copied into RAM (IQ2_XS, 31.6 GiB) beside the GPU cache. On an APU the GPU cache is RAM too, so most experts were held twice, and the engine stopped at its first start with short unbuffered read ... (error 1450) (Windows' "insufficient system resources"). 9bd3d50 makes --low-ram auto choose the resident variant (--resident-experts) for a shared-memory GPU.
  • Context size. Once the HIP engine is installed, setup reads the GPU from strata-device --list-devices, which reports carve-out plus shared RAM (43.8 GiB), so a second setup run picked 128K where the first picked 64K. 76890d4 sizes from the 16 GB carve-out every time.

With that, the carve-out accounting caps the cache rather than only warning:

strata generate: integrated AMD GPU: 9.62 GiB of its carve-out free
strata generate: integrated AMD GPU shares system RAM: limiting the expert cache's 37.44 GiB device-free figure to 37.07 GiB of host memory
strata generate: expert cache auto: 37.07 GiB free, 700 MiB reserved (+143 MiB for the draft head) -> 24576 slots
FileExpertSource: allocating 3.33 GiB pageable resident cache complement

All 24,576 experts end up in GPU memory, beside a 3.3 GiB RAM copy.

One run each, other programs open, not a benchmark:

Request Prompt Prompt read Output Drafts accepted
short question + one-liner 42 tokens (35 reused) 56.6 tok/s 24 tokens, 35.4 tok/s 17 of 20
palindrome function with asserts 43 tokens 57.3 tok/s 102 tokens, 32.3 tok/s 66 of 92
900 lines of setup.py + a question about two constants 17,116 tokens 291.4 tok/s 78 tokens, 32.6 tok/s 55 of 65

The answers were right, including both constants from the 17K-token prompt (MIN_ENGINE, CONTEXTS).

In a later chat session with longer replies on the same setup, output was lower: 18.6-23.2 tok/s for 300-2,400-token replies, and 9.8 tok/s for a 935-token reply after a 9,391-token prompt (4,788 tokens newly read). Decode cache hit rate stayed at 97.7-99.3%.

Next

I'll build your current main (v0.1.41, fb58e0d) on the laptop with gfx1151, run the selftest, the HIP ctest and the same model requests, and post the results here. If you port the carve-out part, I can run that build the same way.

<!-- gh-comment-id:6059754328 --> @storm-ace commented on GitHub (Oct 8, 2026): Thanks for taking the memset fix. Yes, I can test on the laptop. Here is what I have so far, all on my branch (two commits since this issue was opened: [76890d4](https://github.com/storm-ace/Strata/commit/76890d4) and [9bd3d50](https://github.com/storm-ace/Strata/commit/9bd3d50)), not yet on your current main. ## First model run on Windows gfx1151 Same laptop: Ryzen AI Max+ PRO 395, Radeon 8060S, 64 GB with a 16 GB carve-out, Windows 11 Pro 26200, AMD driver 32.0.22018.5, TheRock ROCm 10.2.0a20260930. Qwen3.8-Flash-Next IQ2_XS, 64K context, `--kv int8`, MTP on, reasoning off, temperature 0. What the first start needed: - **Setup's mode choice.** Setup picked the usual mode: every expert copied into RAM (IQ2_XS, 31.6 GiB) beside the GPU cache. On an APU the GPU cache is RAM too, so most experts were held twice, and the engine stopped at its first start with `short unbuffered read ... (error 1450)` (Windows' "insufficient system resources"). 9bd3d50 makes `--low-ram auto` choose the resident variant (`--resident-experts`) for a shared-memory GPU. - **Context size.** Once the HIP engine is installed, setup reads the GPU from `strata-device --list-devices`, which reports carve-out plus shared RAM (43.8 GiB), so a second setup run picked 128K where the first picked 64K. 76890d4 sizes from the 16 GB carve-out every time. With that, the carve-out accounting caps the cache rather than only warning: ``` strata generate: integrated AMD GPU: 9.62 GiB of its carve-out free strata generate: integrated AMD GPU shares system RAM: limiting the expert cache's 37.44 GiB device-free figure to 37.07 GiB of host memory strata generate: expert cache auto: 37.07 GiB free, 700 MiB reserved (+143 MiB for the draft head) -> 24576 slots FileExpertSource: allocating 3.33 GiB pageable resident cache complement ``` All 24,576 experts end up in GPU memory, beside a 3.3 GiB RAM copy. One run each, other programs open, not a benchmark: | Request | Prompt | Prompt read | Output | Drafts accepted | | --- | ---: | ---: | ---: | ---: | | short question + one-liner | 42 tokens (35 reused) | 56.6 tok/s | 24 tokens, 35.4 tok/s | 17 of 20 | | palindrome function with asserts | 43 tokens | 57.3 tok/s | 102 tokens, 32.3 tok/s | 66 of 92 | | 900 lines of `setup.py` + a question about two constants | 17,116 tokens | 291.4 tok/s | 78 tokens, 32.6 tok/s | 55 of 65 | The answers were right, including both constants from the 17K-token prompt (`MIN_ENGINE`, `CONTEXTS`). In a later chat session with longer replies on the same setup, output was lower: 18.6-23.2 tok/s for 300-2,400-token replies, and 9.8 tok/s for a 935-token reply after a 9,391-token prompt (4,788 tokens newly read). Decode cache hit rate stayed at 97.7-99.3%. ## Next I'll build your current main (v0.1.41, `fb58e0d`) on the laptop with gfx1151, run the selftest, the HIP ctest and the same model requests, and post the results here. If you port the carve-out part, I can run that build the same way.
Author
Owner

@storm-ace commented on GitHub (Oct 8, 2026):

Tested your current main on the laptop: v0.1.41, fb58e0d, built unchanged with tools\hip\build_windows.bat tests (same machine as above: Radeon 8060S, 64 GB with a 16 GB carve-out, Windows 11 Pro 26200, AMD driver 32.0.22018.5, TheRock ROCm 10.2.0a20260930).

Build and tests

  • Build: all 336 targets; the zip (613 MiB) carries gfx1151 with rocBLAS's gfx1151 folder.
  • strata-device --selftest: OK (43.6 GiB free on the card).
  • HIP ctest: 87 of 92 pass, 3 skipped. The 5 failures are the same known ones: hip_handoff, ple_parity, expert_parity, pool_test, expert_cache_segmented_test. hip_prefill_mmq_parity passes.

Model run: IQ2_XS, 64K, --kv int8, MTP, your engine and server

What setup picks does not start. With 47.8 GB of RAM, low_ram_wanted("IQ2_XS", 47.8) is False, so setup writes the usual mode. The engine copies the experts into RAM and then finds nothing left for the GPU cache:

strata generate: WARNING: the expert arena needs 33.02 GiB of RAM but 17.85 GiB is available (15.17 GiB short): ...
strata generate: loaded 33.02 GiB at 3.00 GiB/s
strata generate: expert cache auto: 0.00 GiB free, 2560 MiB reserved (+143 MiB for the draft head) -> 0 slots
strata generate: no VRAM is left for the expert cache: it needs at least 315 slots (453 MiB), ...

and the server reports "the engine exited before it was ready". The message differs from my first run (error 1450), but the cause looks the same: on an APU the GPU's pool is the same RAM, so the full RAM copy leaves the cache nothing. My 9bd3d50 makes --low-ram auto choose --resident-experts on a shared-memory GPU for this reason.

With --resident-experts added by hand it runs:

strata generate: expert cache auto: 37.44 GiB free, 2560 MiB reserved (+143 MiB for the draft head) -> 24576 slots
FileExpertSource: available RAM 0.29 GiB, 7.39 GiB after the mapped experts left the process working set (#467)
FileExpertSource: WARNING: 2808 of 2808 lendable slots (100%) will read their experts from the pack during a long prompt; ...
strata serve: 3200 MiB of VRAM free with everything loaded

All 24,576 experts are in GPU memory, but the RAM copy for the prompt path's borrowed slots is 0 GiB, where my branch's capped cache leaves room for 3.33 GiB. There is no APU warning at all: the #895 check sits in #if defined(STRATA_USE_HIP) && !defined(_WIN32) (generate.cpp), so on Windows it never runs.

One run each, temperature 0, reasoning off, other programs open, not a benchmark:

Request Prompt Prompt read Output Drafts accepted
short question 20 tokens 28.2 tok/s 42 tokens, 28.8 tok/s 27 of 36
follow-up: string-reverse one-liner 88 tokens (63 reused) 69.5 tok/s 10 tokens, 29.2 tok/s 7 of 12
palindrome function with asserts 38 tokens 59.9 tok/s 268 tokens, 36.6 tok/s 177 of 241
900 lines of setup.py + a question about two constants 17,101 tokens 300.3 tok/s 76 tokens, 42.3 tok/s 59 of 63

Answers were right, including both constants (MIN_ENGINE, CONTEXTS). Speed is in line with my branch (291 tok/s reading the 17K prompt there). The empty RAM copy did not slow this 17K prompt down; the engine's own warning says it shows on 50K+ prompts, which I have not measured.

Summary

Your main builds, passes the tests and runs well on Windows gfx1151 once --resident-experts is set. Without my changes, two things are missing on Windows:

  1. Setup's mode choice: the usual mode does not start on this APU (76890d4 / 9bd3d50).
  2. The cache limit: nothing checks the cache against host memory on Windows. The resident run worked here, but with 0.29 GiB of RAM available after loading.

Happy to test a port of either part the same way.

<!-- gh-comment-id:6060211686 --> @storm-ace commented on GitHub (Oct 8, 2026): Tested your current main on the laptop: v0.1.41, `fb58e0d`, built unchanged with `tools\hip\build_windows.bat tests` (same machine as above: Radeon 8060S, 64 GB with a 16 GB carve-out, Windows 11 Pro 26200, AMD driver 32.0.22018.5, TheRock ROCm 10.2.0a20260930). ## Build and tests - Build: all 336 targets; the zip (613 MiB) carries gfx1151 with rocBLAS's gfx1151 folder. - `strata-device --selftest`: OK (43.6 GiB free on the card). - HIP ctest: **87 of 92 pass**, 3 skipped. The 5 failures are the same known ones: `hip_handoff`, `ple_parity`, `expert_parity`, `pool_test`, `expert_cache_segmented_test`. `hip_prefill_mmq_parity` passes. ## Model run: IQ2_XS, 64K, `--kv int8`, MTP, your engine and server **What setup picks does not start.** With 47.8 GB of RAM, `low_ram_wanted("IQ2_XS", 47.8)` is False, so setup writes the usual mode. The engine copies the experts into RAM and then finds nothing left for the GPU cache: ``` strata generate: WARNING: the expert arena needs 33.02 GiB of RAM but 17.85 GiB is available (15.17 GiB short): ... strata generate: loaded 33.02 GiB at 3.00 GiB/s strata generate: expert cache auto: 0.00 GiB free, 2560 MiB reserved (+143 MiB for the draft head) -> 0 slots strata generate: no VRAM is left for the expert cache: it needs at least 315 slots (453 MiB), ... ``` and the server reports "the engine exited before it was ready". The message differs from my first run (`error 1450`), but the cause looks the same: on an APU the GPU's pool is the same RAM, so the full RAM copy leaves the cache nothing. My 9bd3d50 makes `--low-ram auto` choose `--resident-experts` on a shared-memory GPU for this reason. **With `--resident-experts` added by hand it runs:** ``` strata generate: expert cache auto: 37.44 GiB free, 2560 MiB reserved (+143 MiB for the draft head) -> 24576 slots FileExpertSource: available RAM 0.29 GiB, 7.39 GiB after the mapped experts left the process working set (#467) FileExpertSource: WARNING: 2808 of 2808 lendable slots (100%) will read their experts from the pack during a long prompt; ... strata serve: 3200 MiB of VRAM free with everything loaded ``` All 24,576 experts are in GPU memory, but the RAM copy for the prompt path's borrowed slots is 0 GiB, where my branch's capped cache leaves room for 3.33 GiB. There is no APU warning at all: the #895 check sits in `#if defined(STRATA_USE_HIP) && !defined(_WIN32)` (`generate.cpp`), so on Windows it never runs. One run each, temperature 0, reasoning off, other programs open, not a benchmark: | Request | Prompt | Prompt read | Output | Drafts accepted | | --- | ---: | ---: | ---: | ---: | | short question | 20 tokens | 28.2 tok/s | 42 tokens, 28.8 tok/s | 27 of 36 | | follow-up: string-reverse one-liner | 88 tokens (63 reused) | 69.5 tok/s | 10 tokens, 29.2 tok/s | 7 of 12 | | palindrome function with asserts | 38 tokens | 59.9 tok/s | 268 tokens, 36.6 tok/s | 177 of 241 | | 900 lines of `setup.py` + a question about two constants | 17,101 tokens | 300.3 tok/s | 76 tokens, 42.3 tok/s | 59 of 63 | Answers were right, including both constants (`MIN_ENGINE`, `CONTEXTS`). Speed is in line with my branch (291 tok/s reading the 17K prompt there). The empty RAM copy did not slow this 17K prompt down; the engine's own warning says it shows on 50K+ prompts, which I have not measured. ## Summary Your main builds, passes the tests and runs well on Windows gfx1151 once `--resident-experts` is set. Without my changes, two things are missing on Windows: 1. Setup's mode choice: the usual mode does not start on this APU (76890d4 / 9bd3d50). 2. The cache limit: nothing checks the cache against host memory on Windows. The resident run worked here, but with 0.29 GiB of RAM available after loading. Happy to test a port of either part the same way.
Author
Owner

@Niko1221 commented on GitHub (Oct 13, 2026):

Thanks for the report. To keep the tracker current we are closing issues older than three days: 0.1.44 is out with a long list of fixes, and many older reports are covered by it or by 0.1.43.1.

If this still happens on 0.1.44, please leave a comment here with your engine log (and the version line it prints), and we will reopen it. A new issue that links this one works too.

<!-- gh-comment-id:6155986456 --> @Niko1221 commented on GitHub (Oct 13, 2026): Thanks for the report. To keep the tracker current we are closing issues older than three days: [0.1.44](https://github.com/Niko1221/Strata/releases/tag/v0.1.44) is out with a long list of fixes, and many older reports are covered by it or by 0.1.43.1. If this still happens on 0.1.44, please leave a comment here with your engine log (and the version line it prints), and we will reopen it. A new issue that links this one works too.
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#397
No description provided.