mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #2637] [Bug]: gfx1100 2-GPU --pipeline-windows 2 + MTP: "verify: layer N never rang" (illegal memory access), engine exits on an 18k-token prompt (0.1.44.1, 2x 7900 XTX) #1053
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#1053
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 @dinesh-chander on GitHub (Oct 15, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/2637
Setup: 2× Radeon RX 7900 XTX (gfx1100, 24 GB each) on one box, Strata v0.1.44.1 (commit
296b59d2), Ubuntu 26.04.1 LTS, kernel 7.0.0-38, HIP 7.16.26385-0000000 (amdrocm-core10.1-gfx1100 10.1.0-3), Intel Core Ultra 7 265K, 93 GiB DDR5. Model Qwen3.8-Flash-Next unsloth UD-Q4_K_XL,--kv int8 --kv-resident 32768 --max-context 200000.Exact flags (both runs identical except
--adapt-every):env:
STRATA_PF_GEMM=1,STRATA_KV_PREFETCH=1,STRATA_HIPBLASLT_TUNING=<gfx1100 tuning file>. Layer split auto → K=24 (CUDA0 layers 0-23, CUDA1 24-47 + head); the pw2 cost line reports "272 MiB of CUDA0 kept out of the expert cache" (expert cache CUDA1 4933 → 4879 slots).Symptom. With
--pipeline-windows 2the pipelined decode dies on a ~18k-token prompt (cold read,max_tokens256, temperature 0):The engine then exits (
exit code 1) or is reloaded, and the client sees:--adapt-every 1)verify: layer 47 never rang (an illegal memory access was encountered)the engine said nothing for 684 s--adapt-every 0)verify: layer 36 never rang (unspecified launch failure)the engine stopped unexpectedly (exit code 1); the next request...Turning off the adaptive expert swap changes the symptom, not the outcome. This was the obvious suspect (a synchronous adaptive swap racing a pipelined speculative window), so the same 18k prompt was run with
--adapt-every 0: different layer (36 vs 47) and a different HIP error (unspecified launch failure719 vsillegal memory access700), but it still faults. The pipelined decode path itself is the trigger on gfx1100.Reproduce rate: 2/2 runs, 2/2
--adapt-everysettings, always on the first 16384-token request of the session (real prompt length 18 228 tokens, cold, no cache reuse).Small prompts are fine, and the payoff is large — which is why this is worth fixing rather than just documenting:
Prefill is flat (503.8 → 504.9 tok/s at 4096): the gain is entirely decode, up to ×1.7 over pw0 — the serial stage alternation disappearing, as intended.
Verbatim engine log, run A (
--adapt-every 1):Run B (
--adapt-every 0):The
#267lines are the watchdog firing after the fault — the cause is the verify window never ringing, not the 5 s watchdog.Why a gfx1100 box reaches this at all.
--pipeline-windows 2is auto-off on gfx1100 (decode_defaults_arch_ok()is gfx12-WMMA-only on HIP), but passing the flag explicitly skips that gate: thepipeline_windows > 0validation ingenerate.cppchecks serve / layer split / MTP /--batch/--peer-device/ helper caches and never the arch, so the engine starts the pipelined path with no warning that the arch's measured defaults (route tail skip, PCIe share) do not apply.docs/MULTI_GPU.md("--pipeline-windows 2asks for it on any split") reads as "supported on any split". Either honour the gate with a refusal/warning on gfx1100, or fix the decode path there.Workaround:
--pipeline-windows 0restores stability — the identical flag set (pw0) ran the full length sweep including 65536 tokens without any verify fault. The engine is back on pw0 here.Related: #2245 (gfx1030 2-GPU pw2 + MTP → #267 verify hang, bisected to
6126f8d; that one stalls the MEC, this one raises a HIP fault) · #267 · #1341 (closed, >100k prompt deadlocks the pipelined verify-window reader) · #1740 (closed, Windows pw2 stall) · #1447 (closed, docs: pw2 and--adapt-async 1combine).Happy to re-run with a minimal flag set (dropping
--short-read, theSTRATA_*env,--vision), to bisect the prompt-length boundary between 4.9k and 18.2k, or to try #2245'sSTRATA_ATTN_LANECELL=1on gfx11 if that is useful.@dinesh-chander commented on GitHub (Oct 15, 2026):
Resolved — it was the drafter's placement, not the pipelined decode itself.
docs/MULTI_GPU.md:257-264says that since 0.1.44 the draft layer loads on the first card when the pipeline is on, andgenerate.cpp:3511says two stages "pay off only with the drafter on the first card". That placement ismtp_first_default_on(), which is gfx12-only, so on gfx1100 my explicitly-forced--pipeline-windows 2ran the old arrangement: drafter on the last card, sharing it with the last stage's window and its verifier — precisely the collision the two fault lines describe.Setting
STRATA_MTP_STAGE0=1(drafter on card 0) fixes it, with no other engine change:Lengths 4096 / 16384 / 65536, 2 runs each, 4 passes each: zero
verify: layer N never rang, zero HIP errors, engine never restarted. Positive confirmation from the engine itself:strata pipeline: drafter on CUDA0— without the variable the same line readsCUDA1.Decode against the same workload at pw0 on this box (medians of 2; the cached and stream passes are pure decode, the cold pass carries the read):
Prefill is flat (1.04x / 1.00x / 0.93x).
Two caveats on those numbers. That arm also carried
--adapt-every 0, which the doc's own parity recipe requires and which costs the adaptive tier, so the multiples include that cost. And the engine logged one #879 non-finite event during the clean run (a 20,468-token prompt read, position 20461); #879 drops the live session and its parked conversations, so the passes after it re-read from token 0 and the 16384 cold median is noisy (50.5 vs 38.3 run to run). That is the pre-existing #879, it fires at pw0 on the same workload, and it is not part of this report.One residual nit, your call. An explicitly-given
--pipeline-windows 2on a two-stage split still bypasses themtp_firstrequirement silently: thepipeline_windows > 0validation checks serve / layer split / MTP /--batch/--peer-device/ helper caches but neither the arch nor the drafter's placement, whileMULTI_GPU.md:253reads as "asks for it on any split". Anyone on gfx10/gfx11 who forces the flag lands in the arrangement that faults here. Requiring/applyingmtp_firston two stages, or oneis off:-style line, would close that hole. I'm happy to open that as a separate issue rather than reopen this one.Config that works here:
--pipeline-windows 2plus"STRATA_MTP_STAGE0": "1"in the config'senv, on 2x RX 7900 XTX (gfx1100), ROCmamdrocm-core10.1-gfx110010.1.0-3, v0.1.44.1. Closing as resolved — thanks for the flag and for the docs, which had the answer in them.