mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #3664] [Engine] mtp graph capture OOM exits the engine (reported as "no error") with STRATA_QSA_SPLIT_ATTN + --batch-mtp + a fresh long prompt #1514
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#1514
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 @Adam34332 on GitHub (Oct 21, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/3664
Area
[Engine] (speed, kernels, models, the server and API)
Desktop app, Terminal or source?
Source (START-HERE.bat, setup.sh or a build)
What happened
With
STRATA_QSA_SPLIT_ATTN=1and--batch-mtp, when a fresh long prompt (no prompt-cache reuse; past the resident KV window - we tested 155K-176K tokens) arrives while several slots are decoding, the engine exits with status 1 and this log line:The stock engine crashes in this scenario 5 out of 5 runs. Expected: the opt-in switches are documented as measured hints, so this should degrade (disable the switch for the session, print a WARNING) instead of exiting - and the error message should show the real error, not "no error".
Smallest steps or command that reproduce it
--batch 6 --batch-mtp,STRATA_QSA_SPLIT_ATTN=1(plus any of the other opt-ins - they do not matter).mtp: round capture: no error.Binary search over 10 rounds:
STRATA_QSA_SPLIT_ATTNalone fails (5/5); any combination of the other 7 switches passes;STRATA_PROMPT_ATTN_IMMAalone passes; zero opt-ins +--batch-mtp+ a fresh 155K prompt passes (peer mode is not a factor).Reproduction status
Reproduced locally
Strata version
engine 0.1.45, built from source (CUDA, archs 86;89) - upstream commit
477ac13cGraphics card, memory and system
RTX 4090 48 GB (primary, expert cache ~98% of VRAM by design) + RTX A4000 16 GB (expert-cache peer via
--peer-device) · 128 GB RAM · LinuxModel, size and settings
Qwen3.8-Flash-Next IQ3_S (GSQ-RCO pack) · 262144 context ·
--batch 6 --batch-mtp --kv int8 --kv-resident 16384· pictures on (on the peer card) · opt-ins:STRATA_QSA_SPLIT_ATTN=1plus 7 others (STRATA_ATTN_DAILY,STRATA_EXPDEC,STRATA_B6_MMVQ_ROWS,STRATA_PROMPT_ATTN_IMMA,STRATA_HC_REQ8,STRATA_HC_UPMIX,STRATA_QSA_ROWS)Logs
Stock engine (the swallowed error):
After fixing the reporting, the real error:
Analysis: two bugs
Bug 1 -
finish_capture()reports the wrong error.src/core/mtp.cpp:ceholds the result ofcudaStreamEndCapture(a success), not ofcudaGraphInstantiate. When instantiate fails withcudaErrorMemoryAllocation, the message therefore printsno error.Bug 2 - no graceful degradation on instantiate OOM. At that moment the primary card's VRAM is intentionally near-full (the expert cache by design holds almost everything), and the fresh long prompt simultaneously needs KV writes, prefill buffers, and a new slot drafter's graph captures. For reference,
instantiate_evictinginverify.cpp(#997) already frees-and-retries for the verify graphs; the MTP drafter path has no equivalent.Our patch (below, against 0.1.45 /
477ac13c)Three small changes in
src/core/mtp.cpp+include/strata/core/mtp.hpp, in the spirit of #997:finish_capture()keeps the realcudaGraphInstantiateresult and reportsvram freealongside it (fixes Bug 1);We also raised
--vram-reserve-mibfrom 713 to 1280 on this box.After the patch: the killer scenario (cold engine, 6 concurrent generations, then a fresh 161K-token prompt) passes 8/8, zero engine exits since, aggregate throughput unchanged (conc6 ~= 195-200 tok/s with
--batch-mtpkept on).Question: is
--peer-devicea maintained path going forward?docs/MULTI_GPU.mdrefers to the--peer-device/ helper expert caches as "the older helper-GPU caches" (seedocs/SECOND_GPU.md). Is that path still maintained? It works very well for us on heterogeneous cards - the 4090 runs the model while the A4000 holds the experts the primary cannot fit (23929/24576 routed experts on-card across the two), with decode about 1.55x our single-card split setup - and we would like to keep relying on it. If it is maintained, we may report peer-specific findings separately.Patch (git format, 2 files)
@github-actions[bot] commented on GitHub (Oct 21, 2026):
Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing:
Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment
/reopen.Details: CONTRIBUTING.md
@github-actions[bot] commented on GitHub (Oct 21, 2026):
Thanks, this follows the format now.
@Niko1221 commented on GitHub (Nov 5, 2026):
Thanks for taking the time to report this.
Strata has changed a lot since this was opened, and 0.2.11 is out now, so many older reports no longer apply. We're closing issues older than a week that have had no new reports in the last week. 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.