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#895
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 @metzenwest on GitHub (Oct 13, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/2245
Setup: 2× Radeon Pro V620 (gfx1030), Strata v0.1.43.1, Qwen3.8-Flash-Next IQ3_S,
layer_split 25,--spec 3 --spec-min-p 0.7 --mtp rt-en --pipeline-windows 2, ROCm TheRock 7.14.0a20260612 (7.13.0a20260515 alsoreproduces).
Symptom: "verify: the window never finished; its GPU waits were released but the GPU did not finish within 5 s
(#267)". GPU breadcrumbs stop on stage 1 between
waitA(19) andVRAM hits(20); the GPU is busy but nothingruns. About 30% of runs fail; with
STRATA_VERIFY_TRACE=1nearly every first request fails.Bisect: first bad commit
6126f8d("HIP gfx103x: PR ROCm/legacy-rocm-build#540's attention kernel with 8 cells per step and DPPlane exchanges"). The 9-step bisect ran from
2bfac51(the PR ROCm/legacy-rocm-build#859 merge, good) toe8ca9af(0.1.40.2, bad).What it is (details in the ROCm issue: https://github.com/ROCm/TheRock/issues/9306): at the hang, the drafter's queue has
attn_chunk_kernel_pre75<1,8,true>next and stage 1's queue has
native_down_multi_kernelnext. Both packets are valid, every earlier packet isretired, there are no waves, and the MEC pipes owning those queues are idle. It looks like a GPU firmware-level
stall that this kernel triggers through timing, not a bug in the kernel's math: no out-of-bounds access, every loop
bounded, 0 scratch.
Variants tested (
STRATA_VERIFY_TRACE=1, 4-8 requests each):STRATA_ATTN_LANECELL=1(bypasses pre75 entirely)Also tried, and still hangs: MTP drafter stream at high priority (fewer hangs, not zero),
GPU_MAX_HW_QUEUES=6, asynchronous chained prompt read (single submitting thread), scratch-reclaim off,
amdgpu.cwsr_enable=0, ROCm 7.13.Suggestion: until AMD weighs in, on gfx103x layer splits with MTP and pipeline windows, either keep the drafter's
decode attention on the default kernel, or prefer
STRATA_ATTN_LANECELL=1. Both avoided the hang in our tests andboth are faster than our previous v620-based build (with upstream's opt-in switches, same flags, 2 rounds):
STRATA_ATTN_LANECELL=1(bypasses pre75)@bcrawford-cpm commented on GitHub (Oct 13, 2026):
<html>Same hang on gfx1100, where 6126f8d's kernel does not run, and
--short-read 0avoids it here while keeping--pipeline-windows 2.Setup: 2× RX 7900 XT (gfx1100), Windows 11 Pro build 26300, Adrenalin driver 32.0.31041.1004, the engine's bundled
amdhip64_7.dll, Strata 0.1.43.1, Swift 1.5 IQ3_XXS,layer_split 33,--spec 3 --spec-min-p 0.7 --mtp rt --pipeline-windows 2 --max-context 204800 --kv int8 --kv-resident 32768 --conversation-cache-mib 8192 --conversation-cache-slots 2.Symptom: the same line,
verify: the window never finished; its GPU waits were released but the GPU did not finish within 5 s (#267). In normal use it hit 19 times in about 2,750 requests (about 0.7 per 100), always with--pipeline-windows 2. The serial path'stimed out at layerline never appeared.Not the pre75 kernel:
pre75_attn()is true on HIP only forgfx103*unlessSTRATA_ATTN_PRE75=1. That variable is not set here, and gfx1100 gets no arch defaults. So the drafter runs the default attention kernel, and the hang still happens.6126f8dlooks like one trigger, not the only one.Where it happens: at the start of a request. In the soak below, each failing request took 33.5-33.9 s in total, which is the 20 s wait plus the 5 s release plus a few seconds. So the hang began within the request's first few seconds, while its prompt was being read. In normal use, the server's progress line once showed
reading the prompt: 241 of 248 tokenswhen the engine died, which is the--short-readtail of the prompt.A/B (same build, same day, same synthetic load): 5 conversations of 2K-50K tokens from this repo's sources, switching conversation on 60% of requests, 128-512 tokens generated per request.
Change from the config above | Requests | ROCm/legacy-rocm-build#267 fatals -- | -- | -- none (--short-read 64, the default) | 14 | 3 --conversation-cache-mib 0 (no park/restore) | 2 | 1 --short-read 0 | 100 | 0All three runs used
--vram-reserve-mib 1536instead of my earlier 200: 1426 MiB free at load, 1193 MiB at the lowest during capture, no LOW warning. Fatals continued with that much free VRAM, so memory pressure is not the cause here. With--short-read 0, decode averaged 73.3 tok/s over the 100 requests, against 77.2 tok/s over the 11 default-setting requests that finished before a fatal. That gap is within noise at that sample size. Under the soak, requests with at most 300 new prompt tokens read in 1.30 s on average (43 requests). In normal use with the default, they read in 1.43 s (632 requests), which is a different workload.Reading: with pipeline windows, the prompt's last ≤64 tokens go through the pipelined verify windows. On this box one of those windows sometimes never finishes. With them off, the decode windows, which are still pipelined, ran 100 requests without a hang. This may be the same queue stall you traced, reached through the short-read windows rather than the drafter's kernel. I can't confirm that without breadcrumbs.
Not tested:
STRATA_VERIFY_TRACE=1breadcrumbs. As far as I can read the code, the pipelineddone()path ends the engine at 20 s without callingdiag()/trace_dump(), so a stock build prints nothing for this path. I haven't built a patched engine.--pipeline-windows 1, MTP off (which turns pipelining off anyway), and small non-zero--short-readvalues.Could you try
</html>--short-read 0on the V620s with 6126f8d's kernel still on? That would show whether both reports are the same short-read path.@metzenwest commented on GitHub (Oct 13, 2026):
Thanks, this is a useful data point. I tested --short-read 0 on the V620s with 6126f8d’s kernel on (v0.1.43.1, the config that reproduces almost every time with STRATA_VERIFY_TRACE=1, otherwise the same flags as the issue). It still hangs on the 1st request, and so does the default. Both hangs are in pipelined decode: the engine logs pipelined decode: verify: the window never finished, ~25 decode windows complete first, and stage 1’s breadcrumbs stop at layer 30 between waitA (19) and VRAM hits (20). --pipeline-windows 1 (only the short reads pipelined) ran 12/12 single-turn and 24/24 multi-turn clean (18 of the follow-ups were 16-22 fresh tokens, so they went through the short-read windows). So on gfx1030 the short reads aren’t the trigger.
What did avoid it: GPU_MAX_HW_QUEUES=2, from the stream→queue mapping described in ROCm/legacy-rocm-build#2305. Same build and config: 116/116 requests clean (12 + an 80-request soak + 24 multi-turn), against a hang on request 1 without it. That fits the capture in the ROCm issue: at the hang, the drafter’s queue and the stage-1 verify queue are separate HQDs on separate MEC pipes, and both pipes are idle with packets pending. With 2 hardware queues, HIP’s round-robin puts the drafter’s cs_ on the verify stream’s queue, so the cross-queue hand-off that stalls never happens. Earlier counts: 4 and 6 queues hang, 8 doesn’t hang but loses ~40% decode, 16 is unusable (~95% slower).
6126f8d, STRATA_VERIFY_TRACE and stream priority all just change how often it happens.This might also explain your gfx1100 case: different timing, the same cross-queue drafter/verify hand-off. Could you try GPU_MAX_HW_QUEUES=2 with --short-read 64 on the 7900 XTs? An engine-side fix that doesn’t depend on the runtime’s mapping (the drafter on the verify window’s stream on HIP, or a stream creation order that pairs them, as ROCm/legacy-rocm-build#2305 suggests) would probably cover all three reports. I haven’t measured what 2 queues cost in decode speed yet.
You’re right that the pipelined done() timeout path doesn’t call diag()/trace_dump() in a stock build. I added that dump locally and can post the patch if you want breadcrumbs from your box.
@sky-is-green commented on GitHub (Oct 13, 2026):
One more gfx1100 report for the not-universal side. 2x RX 7900 XT, Linux, ROCm 7.2, engine 0.1.44 (plus a local branch that only adds artifact support, no pipeline changes),
--pipeline-windows 2 --spec 4, drafter on the last card via the gfx11 default. About 30 requests ran clean: 4K contexts, 128-token outputs from a fixed 4-request protocol, and one 400-token generation. TheSTRATA_MTP_STAGE0=1arm (drafter on the first card) ran clean as well.At the reported rate of about 0.7 failures per 100 requests that is one data point, not an absence claim. The conditions differ from the two reports so far (@bcrawford-cpm on Windows/gfx1100, @metzenwest's gfx1030 bisect): Linux with ROCm 7.2, short contexts, and the default
--short-read 64in use while the reported failure is at the short-read tail.@Niko1221 commented on GitHub (Oct 19, 2026):
Thanks for taking the time to report this.
We're resetting the tracker for 0.2.0-beta. There are more than 1,300 open issues and pull requests, too many for us to read properly, so we're closing everything that isn't being worked on right now. Closed here does not mean rejected.
To reopen it takes about two minutes:
/reopen. A check runs and either reopens the issue or lists what is still missing.The rules are in CONTRIBUTING.md.