[GH-ISSUE #1691] gfx906: 0.1.41 verify timeouts ("timed out at layer N"); prompt-read stalls are pre-existing (clamp blame retracted) #676

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

Originally created by @KevinX8 on GitHub (Oct 9, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/1691

Bisected a gfx906 regression to the q8_1 clamp pair. Reporter setup below, A/B table, then logs.

Setup

  • 1x AMD Instinct MI50 16 GB (gfx906, wave64), Ryzen 9 5900X (AVX2, no AVX-512), 60 GB RAM, Ubuntu 26.10, kernel amdgpu
  • ROCm 10.1 community gfx906 build (also reproduced on 10.0), HIP 7.16, clang 24
  • Engine built with -DSTRATA_HIP_GFX906=ON -DCMAKE_HIP_ARCHITECTURES=gfx906 (docs/AMD_HIP.md recipe)
  • Model: Unsloth UD-IQ4_XS (native pack), 262144 context, q4_0 KV + --kv-resident 32768, --resident-budget-gib 43, MTP --spec 4 --spec-min-p 0.5, single GPU
  • 0.1.40.x needs one local patch to build (two defines in the gfx906 compat header, same class as #1396):
    cudaStreamCreateWithPriority / cudaDeviceGetStreamPriorityRange in include/strata/platform/hip_compat/strata_hip.h (a732a19 fixed the neighbouring cudaEventBlockingSync but not these; src/core/mtp.cpp:423-424 uses them)

What 0.1.41 does (fb58e0d)

Two failure signatures on the same box where 0.1.40.x serves all day:

  1. Unrecoverable native verification failure: verify: timed out at layer 10 and ... layer 26; its GPU waits were released — decode stalls (18 -> 4.7 tok/s) then the engine exits, twice.
  2. no progress for 60 s during a request (reading the prompt (batched): waiting for the GPU (attention, router) ... — twice more.

Decode on the runs that complete: ~19.8 tok/s vs ~26-28 tok/s on 0.1.40.x.

Bisect (v0.1.40.4 base, same flags/config/machine)

  • v0.1.40.4 alone: story x3 + a full live session, no hang, 23-28 tok/s decode.
  • v0.1.40.4 + ccd657a (HC norm scratch): 3 stories, 29.0/27.6 tok/s after warmup, no hang. Exonerated.
  • v0.1.40.4 + e372d4f + 7a0e302 (q8_1 clamps, isolated, no ccd657a): 4 consecutive prompt-read hangs across mixed traffic — a 27-token prompt dying 12 tokens in, a 2.6K prompt dying 5 tokens from the end, a 3.8K prompt dying 5 tokens from the end — every one waiting for the GPU (attention, router), each ended by the 60 s watchdog + engine restart. Nothing else served in between except the hangs.

So the clamp pair alone reproduces a hang on gfx906. The 0.1.41 verify-timeout crashes were not re-tested to 5x (stopped per the reporter's rule after the bisect landed); they may be the same root cause surfacing in decode.

Happy to re-run anything on this card (single MI50 16 GB, can build any commit with the one-line patch above).

Originally created by @KevinX8 on GitHub (Oct 9, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/1691 Bisected a gfx906 regression to the q8_1 clamp pair. Reporter setup below, A/B table, then logs. ## Setup - 1x AMD Instinct MI50 16 GB (gfx906, wave64), Ryzen 9 5900X (AVX2, no AVX-512), 60 GB RAM, Ubuntu 26.10, kernel amdgpu - ROCm 10.1 community gfx906 build (also reproduced on 10.0), HIP 7.16, clang 24 - Engine built with `-DSTRATA_HIP_GFX906=ON -DCMAKE_HIP_ARCHITECTURES=gfx906` (docs/AMD_HIP.md recipe) - Model: Unsloth UD-IQ4_XS (native pack), 262144 context, q4_0 KV + `--kv-resident 32768`, `--resident-budget-gib 43`, MTP `--spec 4 --spec-min-p 0.5`, single GPU - 0.1.40.x needs one local patch to build (two defines in the gfx906 compat header, same class as #1396): `cudaStreamCreateWithPriority` / `cudaDeviceGetStreamPriorityRange` in `include/strata/platform/hip_compat/strata_hip.h` (a732a19 fixed the neighbouring `cudaEventBlockingSync` but not these; `src/core/mtp.cpp:423-424` uses them) ## What 0.1.41 does (fb58e0d) Two failure signatures on the same box where 0.1.40.x serves all day: 1. `Unrecoverable native verification failure: verify: timed out at layer 10` and `... layer 26; its GPU waits were released` — decode stalls (18 -> 4.7 tok/s) then the engine exits, twice. 2. `no progress for 60 s during a request (reading the prompt (batched): waiting for the GPU (attention, router) ...` — twice more. Decode on the runs that complete: ~19.8 tok/s vs ~26-28 tok/s on 0.1.40.x. ## Bisect (v0.1.40.4 base, same flags/config/machine) - v0.1.40.4 alone: story x3 + a full live session, no hang, 23-28 tok/s decode. - v0.1.40.4 + ccd657a (HC norm scratch): 3 stories, 29.0/27.6 tok/s after warmup, no hang. Exonerated. - v0.1.40.4 + e372d4f + 7a0e302 (q8_1 clamps, isolated, no ccd657a): 4 consecutive prompt-read hangs across mixed traffic — a 27-token prompt dying 12 tokens in, a 2.6K prompt dying 5 tokens from the end, a 3.8K prompt dying 5 tokens from the end — every one `waiting for the GPU (attention, router)`, each ended by the 60 s watchdog + engine restart. Nothing else served in between except the hangs. So the clamp pair alone reproduces a hang on gfx906. The 0.1.41 verify-timeout crashes were not re-tested to 5x (stopped per the reporter's rule after the bisect landed); they may be the same root cause surfacing in decode. Happy to re-run anything on this card (single MI50 16 GB, can build any commit with the one-line patch above).
Author
Owner

@KevinX8 commented on GitHub (Oct 9, 2026):

Correction — the bisect conclusion above is wrong; please disregard the clamp blame.

  1. The prompt-read stall is not a regression. Re-attributing every no progress for 60 s ... waiting for the GPU (attention, router) stall report in my logs by the binary that was running: clean v0.1.40.4 (only the compat-header defines added) 6, 0.1.41 5, .4+ccd657a / .4+clamps 4, and clean 0.1.40 also has them. So it happens on every build. Every report shows the host under memory pressure (1.5–4.9 GB RAM available, often 2–8 GB in swap, with --resident-budget-gib 43 on a 60 GB box). My clamp run just hit a bad stretch of them.
  2. The clamps can't plausibly cause it. I compiled fused_gr.cu / verify_kernels.cu / iq_kernels.cu for gfx906 with and without e372d4f+7a0e302 and compared -Rpass-analysis=kernel-resource-usage: occupancy is the same for all 363 kernels. fused_gr has identical resources; gdn_step_norm_multi_kernel<false,true> spills 196 instead of 168 bytes/lane; s26_swiglu_q8_1_kernel uses 17 VGPRs instead of 16. Only the numerics of overflowing blocks change.
  3. What still looks 0.1.41-specific: Unrecoverable native verification failure: verify: timed out at layer N (layers 26, 17, 0, 10, 47). Every one I can attribute came from 0.1.41, and I saw none in about 3 h on 0.1.40.4. That one is not bisected yet.

Sorry for the noise. I'll update here if I bisect the verify timeout properly.

<!-- gh-comment-id:6079675091 --> @KevinX8 commented on GitHub (Oct 9, 2026): Correction — the bisect conclusion above is wrong; please disregard the clamp blame. 1. **The prompt-read stall is not a regression.** Re-attributing every `no progress for 60 s ... waiting for the GPU (attention, router)` stall report in my logs by the binary that was running: clean v0.1.40.4 (only the compat-header defines added) 6, 0.1.41 5, .4+ccd657a / .4+clamps 4, and clean 0.1.40 also has them. So it happens on every build. Every report shows the host under memory pressure (1.5–4.9 GB RAM available, often 2–8 GB in swap, with `--resident-budget-gib 43` on a 60 GB box). My clamp run just hit a bad stretch of them. 2. **The clamps can't plausibly cause it.** I compiled fused_gr.cu / verify_kernels.cu / iq_kernels.cu for gfx906 with and without e372d4f+7a0e302 and compared `-Rpass-analysis=kernel-resource-usage`: occupancy is the same for all 363 kernels. fused_gr has identical resources; gdn_step_norm_multi_kernel<false,true> spills 196 instead of 168 bytes/lane; s26_swiglu_q8_1_kernel uses 17 VGPRs instead of 16. Only the numerics of overflowing blocks change. 3. **What still looks 0.1.41-specific:** `Unrecoverable native verification failure: verify: timed out at layer N` (layers 26, 17, 0, 10, 47). Every one I can attribute came from 0.1.41, and I saw none in about 3 h on 0.1.40.4. That one is not bisected yet. Sorry for the noise. I'll update here if I bisect the verify timeout properly.
Author
Owner

@KevinX8 commented on GitHub (Oct 9, 2026):

Root cause found - and it is not the clamps (already retracted) nor the kernel. It is 805088d (#1194: file-tier hot-fraction rule), bisected by revert-screening on plain v0.1.40.4:

  • Plain v0.1.40.4, same box/config: first prompt dies (watchdog, waiting for the GPU), ~34 tok/s when it limps.
  • v0.1.40.4 with only 805088d reverted: 346 / 364 tok/s on the same prompts, 0.0 s of KFD queue suspension, no stalls.
  • Plain v0.1.40 (built with only your f236dbb gfx906 fixes): 358-366 tok/s, 0.0 s suspended idle and per prompt, survives a 6 GiB RAM hog, full benchmark clean.

Mechanism, all measured on 1x MI50 16 GB (gfx906), ROCm 10.0 and 10.1, 60 GB RAM, 43 GiB resident budget (12.4 GiB of experts read from files, ~6.6 GiB of file-cache room):

  • 805088d changed file_cache_keeps to a 5%-of-read-bytes rule, so this box reads the file tier THROUGH the page cache. 0.1.40 required room >= all read bytes, so it read UNBUFFERED.
  • Through-cache here means ~42 GB of storage reads per prompt through a 6.6 GB cache (3.7x amplification in the engine's own file-tier counters) - relentless reclaim.
  • On ROCm the 43 GiB expert arena is HMM-tracked but unpinned (VmPin 0 after hipHostRegister; hipHostMalloc path also affected), so reclaim unmaps its pages and KFD suspends ALL of the process's GPU queues. Measured: up to 45 of 60 s suspended while idle, 7-26 s per prompt. Past 60 s the watchdog kills the engine (prompt stalls); starved the same way, the verify spin flags time out (0.1.41's verify: timed out at layer N).
  • With unbuffered reads there is no cache churn, nothing reclaims, suspensions are 0.0 s - even on the unlocked paced path.

Why your Tesla-P100 measurement does not transfer: on NVIDIA, reclaim around registered memory does not suspend all GPU queues, so through-cache wins there down to 7% room. On AMD the reclaim side effect (queue eviction) dwarfs the read-speed benefit.

Suggested upstream fix: on HIP builds, do not apply the 5% hot-fraction rule (keep hot_fraction=1.0 / the old room >= read_bytes rule), or pick unbuffered whenever a large registered arena exists. Separately, mlock'ing the HIP-registered arena (my 5-line patch in expert_source.cpp: lock_off = 0 on HIP) halves the damage as hardening but does not fix the throughput - the cache churn itself costs ~2x prompt speed (175 vs 360 tok/s with the arena locked).

Happy to open a PR gating the rule on HIP, and to re-run anything on this card.

<!-- gh-comment-id:6085509085 --> @KevinX8 commented on GitHub (Oct 9, 2026): Root cause found - and it is not the clamps (already retracted) nor the kernel. It is 805088d (#1194: file-tier hot-fraction rule), bisected by revert-screening on plain v0.1.40.4: - Plain v0.1.40.4, same box/config: first prompt dies (watchdog, waiting for the GPU), ~34 tok/s when it limps. - v0.1.40.4 with only 805088d reverted: 346 / 364 tok/s on the same prompts, 0.0 s of KFD queue suspension, no stalls. - Plain v0.1.40 (built with only your f236dbb gfx906 fixes): 358-366 tok/s, 0.0 s suspended idle and per prompt, survives a 6 GiB RAM hog, full benchmark clean. Mechanism, all measured on 1x MI50 16 GB (gfx906), ROCm 10.0 and 10.1, 60 GB RAM, 43 GiB resident budget (12.4 GiB of experts read from files, ~6.6 GiB of file-cache room): - 805088d changed file_cache_keeps to a 5%-of-read-bytes rule, so this box reads the file tier THROUGH the page cache. 0.1.40 required room >= all read bytes, so it read UNBUFFERED. - Through-cache here means ~42 GB of storage reads per prompt through a 6.6 GB cache (3.7x amplification in the engine's own file-tier counters) - relentless reclaim. - On ROCm the 43 GiB expert arena is HMM-tracked but unpinned (VmPin 0 after hipHostRegister; hipHostMalloc path also affected), so reclaim unmaps its pages and KFD suspends ALL of the process's GPU queues. Measured: up to 45 of 60 s suspended while idle, 7-26 s per prompt. Past 60 s the watchdog kills the engine (prompt stalls); starved the same way, the verify spin flags time out (0.1.41's verify: timed out at layer N). - With unbuffered reads there is no cache churn, nothing reclaims, suspensions are 0.0 s - even on the unlocked paced path. Why your Tesla-P100 measurement does not transfer: on NVIDIA, reclaim around registered memory does not suspend all GPU queues, so through-cache wins there down to 7% room. On AMD the reclaim side effect (queue eviction) dwarfs the read-speed benefit. Suggested upstream fix: on HIP builds, do not apply the 5% hot-fraction rule (keep hot_fraction=1.0 / the old room >= read_bytes rule), or pick unbuffered whenever a large registered arena exists. Separately, mlock'ing the HIP-registered arena (my 5-line patch in expert_source.cpp: lock_off = 0 on HIP) halves the damage as hardening but does not fix the throughput - the cache churn itself costs ~2x prompt speed (175 vs 360 tok/s with the arena locked). Happy to open a PR gating the rule on HIP, and to re-run anything on this card.
Author
Owner

@KevinX8 commented on GitHub (Oct 9, 2026):

Fix verified on v0.1.41 itself and PR opened: #1752 (from KevinX8:fix-1691-hip-filetier-pin). v0.1.41 + the 11-line HIP-only patch, same box/config, full benchmark: 316-366 tok/s prompt reads, 0.0-0.1 s suspended per prompt, 0 stalls, 0 verify timeouts - including through a 6 GiB RAM-pressure phase. Leaving the box on plain v0.1.40 for daily use until this lands.

<!-- gh-comment-id:6086860539 --> @KevinX8 commented on GitHub (Oct 9, 2026): Fix verified on v0.1.41 itself and PR opened: #1752 (from KevinX8:fix-1691-hip-filetier-pin). v0.1.41 + the 11-line HIP-only patch, same box/config, full benchmark: 316-366 tok/s prompt reads, 0.0-0.1 s suspended per prompt, 0 stalls, 0 verify timeouts - including through a 6 GiB RAM-pressure phase. Leaving the box on plain v0.1.40 for daily use until this lands.
Author
Owner

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

Thanks for the correction. The prompt-read stalls you list all show 1.5-4.9 GB of RAM available and 2-8 GB in swap with --resident-budget-gib 43 on a 60 GB box: that is the host-memory-pressure mechanism of #1705/#750 (the GPU's queues suspended while the kernel reclaims pinned pages). Please try HSA_USERPTR_FOR_PAGED_MEM=0 in the env block, a smaller --resident-budget-gib (e.g. 32) and swap off or vm.swappiness low, and see whether both the stalls and the verify timeouts go away; if the timeouts remain with the RAM free, a bisect of the verify timeouts between 0.1.40.4 and 0.1.41 is the useful next step. The cudaStreamCreateWithPriority defines you needed on 0.1.40 are not needed on main (that code is skipped in the gfx906 build; we compile-checked it). v0.1.42 also adds the opt-in query swizzle and reduce12 attention switches from 0FL01.

<!-- gh-comment-id:6099687247 --> @Niko1221 commented on GitHub (Oct 10, 2026): Thanks for the correction. The prompt-read stalls you list all show 1.5-4.9 GB of RAM available and 2-8 GB in swap with --resident-budget-gib 43 on a 60 GB box: that is the host-memory-pressure mechanism of #1705/#750 (the GPU's queues suspended while the kernel reclaims pinned pages). Please try HSA_USERPTR_FOR_PAGED_MEM=0 in the env block, a smaller --resident-budget-gib (e.g. 32) and swap off or vm.swappiness low, and see whether both the stalls and the verify timeouts go away; if the timeouts remain with the RAM free, a bisect of the verify timeouts between 0.1.40.4 and 0.1.41 is the useful next step. The cudaStreamCreateWithPriority defines you needed on 0.1.40 are not needed on main (that code is skipped in the gfx906 build; we compile-checked it). v0.1.42 also adds the opt-in query swizzle and reduce12 attention switches from 0FL01.
Author
Owner

@KevinX8 commented on GitHub (Oct 10, 2026):

Ran your three suggestions on stock v0.1.42 (same box: MI50 16 GB, ROCm 10.0, 60 GB RAM). Stock 0.1.42 at 43 GiB first, for the baseline: 4 watchdog stalls in one benchmark run, first prompt kills the engine - still broken, same as 0.1.40.4/0.1.41.

  1. HSA_USERPTR_FOR_PAGED_MEM=0 (env block, budget still 43): 0 stalls over 2x ~7.7k prompts, but prompt reads at 51-61 tok/s (vs 360 on the unbuffered path). Stable yet crippled - which fits the HMM mechanism rather well: without userptr tracking there is nothing for reclaim to invalidate, but every copy goes through the slow path.
  2. --resident-budget-gib 32 (env cleared): 0 stalls; prompt 1 at 54 tok/s cold, prompt 2 at 168 tok/s warmed. Smaller HMM-tracked range + more room for the file cache.
  3. Swap off / low swappiness: needs sudo on this box, have not run it. Given (1) and (2) both stabilize, and the 805088d revert-screen (plain .4 + revert = 346/364 tok/s, 0.0 s suspended, on the unlocked paced path), the evidence keeps pointing at cached file-tier reads -> reclaim -> HMM invalidation -> queue suspension, rather than pressure alone: the 35 GiB budget run on 0.1.40.4 (12.6 GB RAM free, no pressure) stalled the same way.

No verify timeouts in either test run (they were always rarer than the stalls). PR #1752 still applies cleanly to the v0.1.42 tree. Happy to run the swappiness arm if you still want it.

<!-- gh-comment-id:6100462256 --> @KevinX8 commented on GitHub (Oct 10, 2026): Ran your three suggestions on stock v0.1.42 (same box: MI50 16 GB, ROCm 10.0, 60 GB RAM). Stock 0.1.42 at 43 GiB first, for the baseline: 4 watchdog stalls in one benchmark run, first prompt kills the engine - still broken, same as 0.1.40.4/0.1.41. 1. **HSA_USERPTR_FOR_PAGED_MEM=0** (env block, budget still 43): 0 stalls over 2x ~7.7k prompts, but prompt reads at 51-61 tok/s (vs 360 on the unbuffered path). Stable yet crippled - which fits the HMM mechanism rather well: without userptr tracking there is nothing for reclaim to invalidate, but every copy goes through the slow path. 2. **--resident-budget-gib 32** (env cleared): 0 stalls; prompt 1 at 54 tok/s cold, prompt 2 at 168 tok/s warmed. Smaller HMM-tracked range + more room for the file cache. 3. **Swap off / low swappiness**: needs sudo on this box, have not run it. Given (1) and (2) both stabilize, and the 805088d revert-screen (plain .4 + revert = 346/364 tok/s, 0.0 s suspended, on the *unlocked* paced path), the evidence keeps pointing at cached file-tier reads -> reclaim -> HMM invalidation -> queue suspension, rather than pressure alone: the 35 GiB budget run on 0.1.40.4 (12.6 GB RAM free, no pressure) stalled the same way. No verify timeouts in either test run (they were always rarer than the stalls). PR #1752 still applies cleanly to the v0.1.42 tree. Happy to run the swappiness arm if you still want it.
Author
Owner

@KevinX8 commented on GitHub (Oct 10, 2026):

Third arm done (swappiness 10, runtime-only, stock v0.1.42, 43 GiB budget): prompt 1 at 66.6 tok/s (367 s), prompt 2 at 44.0 tok/s, 1 watchdog stall. Still broken.

Full table on stock v0.1.42:

arm stalls prompt read
baseline 43 GiB 4, engine died dies
HSA_USERPTR_FOR_PAGED_MEM=0 0 51-61 tok/s
budget 32 0 54 cold, 168 warmed
swappiness 10 1 44-67 tok/s

So two arms stabilize but none restores speed; only the 805088d revert (or 0.1.40) gives 350+ tok/s with 0.0 s suspended. No verify timeouts appeared in any of these runs either (they remain the rarer signature). PR #1752 stands.

<!-- gh-comment-id:6100642567 --> @KevinX8 commented on GitHub (Oct 10, 2026): Third arm done (swappiness 10, runtime-only, stock v0.1.42, 43 GiB budget): prompt 1 at 66.6 tok/s (367 s), prompt 2 at 44.0 tok/s, 1 watchdog stall. Still broken. Full table on stock v0.1.42: | arm | stalls | prompt read | |---|---|---| | baseline 43 GiB | 4, engine died | dies | | HSA_USERPTR_FOR_PAGED_MEM=0 | 0 | 51-61 tok/s | | budget 32 | 0 | 54 cold, 168 warmed | | swappiness 10 | 1 | 44-67 tok/s | So two arms stabilize but none restores speed; only the 805088d revert (or 0.1.40) gives 350+ tok/s with 0.0 s suspended. No verify timeouts appeared in any of these runs either (they remain the rarer signature). PR #1752 stands.
Author
Owner

@KevinX8 commented on GitHub (Oct 12, 2026):

Retested on the new v0.1.43 (same box: 1x MI50 16 GB gfx906, ROCm 10.0, 60 GB RAM, 43 GiB resident budget, default checkpoints off the table - config is the one setup writes plus --max-context 262144 --kv q4_0). Summary: stock v0.1.43 is still broken here, and PR #1752 fixes it.

Stock v0.1.43 (805088d's 5% rule still in file_tier_unbuffered): the file tier reads through the page cache, the GPU is suspended 130 s of the first 168 s prompt (46 tok/s), and the engine is dead on prompt 2 (watchdog: waiting for the GPU). Same failure as v0.1.40.4, v0.1.41 and v0.1.42.

v0.1.43 + PR #1752 (now only the 6-line HIP rule change; I dropped the mlock part - you were right that it needs ulimit -l raised, and the benchmark does not need it; locked memory 0.0 GiB in this run):

phase result
3x ~4k prompts 356 / 364 / 365 tok/s, 0.2-0.3 s of KFD suspension each
300-token story 26.8 tok/s decode
prompt after a 6 GiB RAM hog 360 tok/s, 0.0 s suspended
watchdog stalls / verify timeouts 0 / 0

Without the PR, Strata is effectively unusable on an MI50 16 GB at this configuration: every release since 0.1.40.2 (the first one containing 805088d) dies on the first real prompt or crawls. The workarounds you suggested do stabilise it, but at roughly a sixth of the speed (tested on v0.1.42: HSA_USERPTR_FOR_PAGED_MEM=0 -> 51-61 tok/s, budget 32 -> 54 cold / 168 warm, vm.swappiness=10 -> 44-67 tok/s with 1 stall). Only unbuffered file-tier reads give the 350+ tok/s that v0.1.40 had on this card, and the PR is the only change that gets 0.1.4x back there.

Limits of what I measured: one box, one card, one RAM size (60 GB). The mechanism (unpinned HMM arena + cached reads -> reclaim -> queue suspension) should hold for any gfx906 with a resident budget close to RAM, but I have not tested other RAM sizes. One thing the PR does not fix: while a large RAM hog is actively running with no request in flight, the GPU is still suspended for most of that window (the #1705/#750 pressure case); the next request after it is unaffected.

<!-- gh-comment-id:6120905140 --> @KevinX8 commented on GitHub (Oct 12, 2026): Retested on the new v0.1.43 (same box: 1x MI50 16 GB gfx906, ROCm 10.0, 60 GB RAM, 43 GiB resident budget, default checkpoints off the table - config is the one setup writes plus --max-context 262144 --kv q4_0). Summary: stock v0.1.43 is still broken here, and PR #1752 fixes it. **Stock v0.1.43** (805088d's 5% rule still in file_tier_unbuffered): the file tier reads through the page cache, the GPU is suspended 130 s of the first 168 s prompt (46 tok/s), and the engine is dead on prompt 2 (watchdog: waiting for the GPU). Same failure as v0.1.40.4, v0.1.41 and v0.1.42. **v0.1.43 + PR #1752** (now only the 6-line HIP rule change; I dropped the mlock part - you were right that it needs `ulimit -l` raised, and the benchmark does not need it; locked memory 0.0 GiB in this run): | phase | result | |---|---| | 3x ~4k prompts | 356 / 364 / 365 tok/s, 0.2-0.3 s of KFD suspension each | | 300-token story | 26.8 tok/s decode | | prompt after a 6 GiB RAM hog | 360 tok/s, 0.0 s suspended | | watchdog stalls / verify timeouts | 0 / 0 | Without the PR, Strata is effectively unusable on an MI50 16 GB at this configuration: every release since 0.1.40.2 (the first one containing 805088d) dies on the first real prompt or crawls. The workarounds you suggested do stabilise it, but at roughly a sixth of the speed (tested on v0.1.42: HSA_USERPTR_FOR_PAGED_MEM=0 -> 51-61 tok/s, budget 32 -> 54 cold / 168 warm, vm.swappiness=10 -> 44-67 tok/s with 1 stall). Only unbuffered file-tier reads give the 350+ tok/s that v0.1.40 had on this card, and the PR is the only change that gets 0.1.4x back there. Limits of what I measured: one box, one card, one RAM size (60 GB). The mechanism (unpinned HMM arena + cached reads -> reclaim -> queue suspension) should hold for any gfx906 with a resident budget close to RAM, but I have not tested other RAM sizes. One thing the PR does not fix: while a large RAM hog is actively running with no request in flight, the GPU is still suspended for most of that window (the #1705/#750 pressure case); the next request after it is unaffected.
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:6156184532 --> @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.
Author
Owner

@KevinX8 commented on GitHub (Oct 14, 2026):

Trying to get you that stock-0.1.44 proof run, but stock v0.1.44.1 does not build for gfx906 on a ROCm-only box (no CUDA toolkit here, and 0.1.43 built fine with the same flags). New breakage from the NVFP4 work:
CMakeLists.txt:1449 adds strata_mmq_w4a4 (mmq_nvfp4_w4a4.cu) unconditionally to strata_mmq, which the HIP strata binary links. That TU pulls ggml-cuda/vendors/cuda.h -> <cuda_runtime.h> <cuda.h> <cublas_v2.h> <cuda_bf16.h>, none of which exist without the CUDA toolkit:

FAILED: CMakeFiles/strata_mmq_w4a4.dir/src/prefill/mmq_nvfp4_w4a4.cu.o
vendors/cuda.h:4:10: error: 'cuda.h' file not found with <angled> include
vendors/cuda.h:6:10: fatal error: 'cuda_bf16.h' file not found

Build flags (same as my working 0.1.43 gfx906 build): -DSTRATA_HIP_GFX906=ON -DCMAKE_HIP_ARCHITECTURES=gfx906 -DSTRATA_PORTABLE=ON, ROCm 10.1 clang, CMAKE_PREFIX_PATH=/opt/rocm/core-10.1. git show v0.1.43:CMakeLists.txt | grep -c w4a4 = 0, so this is new in 0.1.44.
The W4A4 path is documented as RTX-50-only with runtime fallback to W4A8, so gating that TU on CUDA availability (or the CUDA compiler) should be safe for the gfx906 build. Point me at a flag if one already exists, otherwise I need that gate before I can run the stock proof you asked for. Worktree is sitting at the v0.1.44.1 tag ready to rebuild.

<!-- gh-comment-id:6162930051 --> @KevinX8 commented on GitHub (Oct 14, 2026): Trying to get you that stock-0.1.44 proof run, but stock v0.1.44.1 does not build for gfx906 on a ROCm-only box (no CUDA toolkit here, and 0.1.43 built fine with the same flags). New breakage from the NVFP4 work: `CMakeLists.txt:1449` adds `strata_mmq_w4a4` (mmq_nvfp4_w4a4.cu) unconditionally to `strata_mmq`, which the HIP `strata` binary links. That TU pulls `ggml-cuda/vendors/cuda.h` -> `<cuda_runtime.h> <cuda.h> <cublas_v2.h> <cuda_bf16.h>`, none of which exist without the CUDA toolkit: ``` FAILED: CMakeFiles/strata_mmq_w4a4.dir/src/prefill/mmq_nvfp4_w4a4.cu.o vendors/cuda.h:4:10: error: 'cuda.h' file not found with <angled> include vendors/cuda.h:6:10: fatal error: 'cuda_bf16.h' file not found ``` Build flags (same as my working 0.1.43 gfx906 build): `-DSTRATA_HIP_GFX906=ON -DCMAKE_HIP_ARCHITECTURES=gfx906 -DSTRATA_PORTABLE=ON`, ROCm 10.1 clang, `CMAKE_PREFIX_PATH=/opt/rocm/core-10.1`. `git show v0.1.43:CMakeLists.txt | grep -c w4a4` = 0, so this is new in 0.1.44. The W4A4 path is documented as RTX-50-only with runtime fallback to W4A8, so gating that TU on CUDA availability (or the CUDA compiler) should be safe for the gfx906 build. Point me at a flag if one already exists, otherwise I need that gate before I can run the stock proof you asked for. Worktree is sitting at the v0.1.44.1 tag ready to rebuild.
Author
Owner

@KevinX8 commented on GitHub (Oct 14, 2026):

Stock v0.1.44.1 proof, same box (1x MI50 16 GB gfx906, ROCm 10.1, 60 GB RAM, standard 256k setup config, resident budget 43 GiB). The issue still applies verbatim.
Build note (disclosed): stock v0.1.44.1 does not compile for gfx906 on a ROCm-only box (NVFP4 W4A4 TU + qwen35 engine need the CUDA toolkit - see my previous comment). To run stock I gated those two TU blocks on CMAKE_CUDA_COMPILER in CMakeLists.txt. Engine sources are byte-identical to the tag (git diff --stat: 1 file, CMakeLists.txt +12/-0). Neither skipped object can run here anyway (W4A4 is RTX-50-only with W4A8 fallback; qwen35 runs only for qwen35moe models; this run is IQ4_XS Qwen3.8-Flash-Next).
Stock v0.1.44.1 takes the cached path, same as every release since 0.1.40.2:

strata generate: the file tier reads through the file cache (46.9 GiB available, 43.0 GiB of it still to be taken by the RAM copy, 12.4 GiB of experts read from the files...)
strata generate: the file tier reads through the file cache (re-checked with the RAM copy built (42.17 GiB): 8.0 GiB available, ... 13.3 GiB of experts rea...)

2x ~4k prompts (streaming, client-measured):

prompt result
1 (6734 tokens) 17.8 tok/s over 379 s wall; engine-side 61.9 tok/s with a mid-prompt watchdog stop
2 0 tokens in 90 s - engine dead/restarting, request failed
Watchdog, engine-side:
strata serve: no progress for 60 s during a request (reading the prompt (batched): waiting for the GPU (attention, router) at layer 6 of the prompt chunk from token 0) - stopping the engine so the server starts it again

Totals for the run: 1 watchdog stall, 0 verify timeouts (it died before verifying anything). Same signature as stock v0.1.43 on this box (46 tok/s, dead on prompt 2). With only the 6-line HIP file-tier rule from #1752 on top of 0.1.43, the same prompts run 356-365 tok/s with 0 stalls - I have not re-run the full benchmark on .1, but nothing in .1 touches file_tier_unbuffered (the 5% rule is still at expert_source.cpp:530), so there is no reason to expect different stock behavior.
The v0.1.43.1 watchdog grace (10 s of file-tier activity) cannot cover this: the GPU is gone for tens of seconds at a time, not one silent second.

<!-- gh-comment-id:6163433967 --> @KevinX8 commented on GitHub (Oct 14, 2026): Stock v0.1.44.1 proof, same box (1x MI50 16 GB gfx906, ROCm 10.1, 60 GB RAM, standard 256k setup config, resident budget 43 GiB). The issue still applies verbatim. **Build note (disclosed):** stock v0.1.44.1 does not compile for gfx906 on a ROCm-only box (NVFP4 W4A4 TU + qwen35 engine need the CUDA toolkit - see my previous comment). To run stock I gated those two TU blocks on `CMAKE_CUDA_COMPILER` in CMakeLists.txt. Engine sources are byte-identical to the tag (`git diff --stat`: 1 file, CMakeLists.txt +12/-0). Neither skipped object can run here anyway (W4A4 is RTX-50-only with W4A8 fallback; qwen35 runs only for qwen35moe models; this run is IQ4_XS Qwen3.8-Flash-Next). **Stock v0.1.44.1 takes the cached path**, same as every release since 0.1.40.2: ``` strata generate: the file tier reads through the file cache (46.9 GiB available, 43.0 GiB of it still to be taken by the RAM copy, 12.4 GiB of experts read from the files...) strata generate: the file tier reads through the file cache (re-checked with the RAM copy built (42.17 GiB): 8.0 GiB available, ... 13.3 GiB of experts rea...) ``` **2x ~4k prompts (streaming, client-measured):** | prompt | result | |---|---| | 1 (6734 tokens) | 17.8 tok/s over 379 s wall; engine-side 61.9 tok/s with a mid-prompt watchdog stop | | 2 | 0 tokens in 90 s - engine dead/restarting, request failed | Watchdog, engine-side: ``` strata serve: no progress for 60 s during a request (reading the prompt (batched): waiting for the GPU (attention, router) at layer 6 of the prompt chunk from token 0) - stopping the engine so the server starts it again ``` Totals for the run: 1 watchdog stall, 0 verify timeouts (it died before verifying anything). Same signature as stock v0.1.43 on this box (46 tok/s, dead on prompt 2). With only the 6-line HIP file-tier rule from #1752 on top of 0.1.43, the same prompts run 356-365 tok/s with 0 stalls - I have not re-run the full benchmark on .1, but nothing in .1 touches `file_tier_unbuffered` (the 5% rule is still at expert_source.cpp:530), so there is no reason to expect different stock behavior. The v0.1.43.1 watchdog grace (10 s of file-tier activity) cannot cover this: the GPU is gone for tens of seconds at a time, not one silent second.
Author
Owner

@KevinX8 commented on GitHub (Oct 14, 2026):

Supplement to the proof above, with the exact version line you asked for, plus the retest on the rebased PR since that comment:

strata generate: session is up (engine 0.1.44.1)

That line is from the same stock run (log strata-0144-stock.log, engine binary built from the v0.1.44.1 tag, only CMakeLists.txt gated as disclosed).

And the other half, measured since: v0.1.44.1 + PR #1752 (rebased, two commits) on the same box and config - file tier reads unbuffered, prompt 2 at 273 tok/s warming to 287-300, 300-token story 26.5 tok/s decode, 0 stalls / 0 verify timeouts. A same-session back-to-back A/B with forced restarts and identical prompts gives 0.1.43+PR 286/297 tok/s vs 0.1.44.1+PR 276/289 tok/s with identical 25.7 tok/s decode, so no version gap - the 356-365 figures in my earlier comment were quieter-box runs. Stock on the same box and day: 18 tok/s wall with a mid-prompt watchdog kill, dead on prompt 2.

So: still reproduces on stock 0.1.44.1, still fixed by the PR's 6-line rule change. Please reopen.

<!-- gh-comment-id:6165589625 --> @KevinX8 commented on GitHub (Oct 14, 2026): Supplement to the proof above, with the exact version line you asked for, plus the retest on the rebased PR since that comment: ``` strata generate: session is up (engine 0.1.44.1) ``` That line is from the same stock run (log `strata-0144-stock.log`, engine binary built from the v0.1.44.1 tag, only CMakeLists.txt gated as disclosed). And the other half, measured since: **v0.1.44.1 + PR #1752 (rebased, two commits) on the same box and config** - file tier reads unbuffered, prompt 2 at 273 tok/s warming to 287-300, 300-token story 26.5 tok/s decode, 0 stalls / 0 verify timeouts. A same-session back-to-back A/B with forced restarts and identical prompts gives 0.1.43+PR 286/297 tok/s vs 0.1.44.1+PR 276/289 tok/s with identical 25.7 tok/s decode, so no version gap - the 356-365 figures in my earlier comment were quieter-box runs. Stock on the same box and day: 18 tok/s wall with a mid-prompt watchdog kill, dead on prompt 2. So: still reproduces on stock 0.1.44.1, still fixed by the PR's 6-line rule change. Please reopen.
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#676
No description provided.