mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#397
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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 versionbuild_windows.batpins).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
0x1586or by name. Both the registry figure and HIP's are markedshared_memory, so neither adds to system RAM in the model choice (the same rule #895 uses on Linux).generate.cpp, host available memory minus 4 GiB) now also runs on Windows, wherehost_available_memory()already has aGlobalMemoryStatusExbranch. On Windows it adds what is left of the carve-out (DXGIDedicatedVideoMemoryless the process's local usage, newhip_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 setintegrated.STRATA_HIP_ARCHS. TheRock has arocm-sdk-device-gfx1151wheel for Windows.rocblas/library/gfx1151/, 150 files) instead of loose files; the packager now copies a folder withcopytree(it failed withPermissionErroroncopy2).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_handoff(Windows),ple_parity/expert_parity/pool_test(model fixtures),expert_cache_segmented_test(--vram-elasticis CUDA-only).python tools/test_setup_*.py: all pass, with a newtest_strix_halo.hip_prefill_mmq_parity: a test race, not a kernel bugIt first failed with
non-finite or unwritten MMQ output. Every output value still held the0xffsentinel bits; HIP returned success for the launch. What I checked:mul_mat_q<Q2_0, 16, false>has the same instruction mix as gfx1100's (16v_wmma, 8 global stores, 109ds_*, nos_trap); onlys_delay_aluhints differ (21 vs 24).hipMemseton the null stream, the kernel runs on ahipStreamNonBlockingstream, and those do not order against each other. With ahipDeviceSynchronize()after the memset all six products pass at 0.05-0.13% relative L2.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 handleron 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".@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.
@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:
short unbuffered read ... (error 1450)(Windows' "insufficient system resources").9bd3d50makes--low-ram autochoose the resident variant (--resident-experts) for a shared-memory GPU.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.76890d4sizes from the 16 GB carve-out every time.With that, the carve-out accounting caps the cache rather than only warning:
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:
setup.py+ a question about two constantsThe 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.@storm-ace commented on GitHub (Oct 8, 2026):
Tested your current main on the laptop: v0.1.41,
fb58e0d, built unchanged withtools\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
strata-device --selftest: OK (43.6 GiB free on the card).hip_handoff,ple_parity,expert_parity,pool_test,expert_cache_segmented_test.hip_prefill_mmq_paritypasses.Model run: IQ2_XS, 64K,
--kv int8, MTP, your engine and serverWhat 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: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. My9bd3d50makes--low-ram autochoose--resident-expertson a shared-memory GPU for this reason.With
--resident-expertsadded by hand it runs: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:
setup.py+ a question about two constantsAnswers 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-expertsis set. Without my changes, two things are missing on Windows:76890d4/9bd3d50).Happy to test a port of either part the same way.
@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.