[GH-ISSUE #4393] [Engine] STRATA_KVA=1 silently disables the 0.2.7 layer-major prefill on a layer split — where KVA can never run anyway #1950

Closed
opened 2026-11-04 01:55:32 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @TheHubUser4860938 on GitHub (Oct 28, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/4393

Problem: 0.2.7 made the layer-major prefill walk the DEFAULT for a CUDA layer split. But lm_prepare declines the walk on kva_config().on alone (src/prefill/prefill.cpp:5961: if (kva_config().on) { why = "STRATA_KVA is on"; return 0; }) — it never consults kva_engine().blocked, which generate.cpp:6189-6190 sets to "a layer split across GPUs" (or "batch slots (--batch)") precisely because KVA cannot run there. KVA's own per-read decline path honors blocked (include/strata/prefill/kva.hpp:114). So on a split, a provably inert KVA still refuses the walk — every prompt, forever — and the log line "layer-major declined: STRATA_KVA is on" implies an active KVA.

Environment:
Strata Version: 0.2.7 (source checkout at tag v0.2.7, commit 5e8a4cca; the file discussed is byte-identical to the tag)
OS: Linux x86-64
Reported from the Strata-Mnemosyne fork's merged tree; the offending code is upstream's own.

Reproduce: STRATA_KVA=1 (the app's "Faster long prompts" switch, the Terminal's Advanced row) + a two-card layer split, long prompt. Expected: the walk runs (KVA is blocked on a split, so nothing is lost); actual: chunk-major prefill, losing the gain the walk brings (the 37e4832a measurements: 2.8x at 8K, 4.8-5.7x at 20-32K on two RTX A4000). No wrong numbers — a silent performance loss. STRATA_DEFAULTS=026 does not help; the trigger is the user turning KVA ON.

Suggested one-line fix: decline on kva_config().on && kva_engine().blocked.empty().

Reproduction status: unconfirmed static analysis (engine not rebuilt in this window; both guard sites read end to end). What would verify: one first-token timing, KVA on/off, on a two-card split.

Originally created by @TheHubUser4860938 on GitHub (Oct 28, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/4393 Problem: 0.2.7 made the layer-major prefill walk the DEFAULT for a CUDA layer split. But `lm_prepare` declines the walk on `kva_config().on` alone (src/prefill/prefill.cpp:5961: `if (kva_config().on) { why = "STRATA_KVA is on"; return 0; }`) — it never consults `kva_engine().blocked`, which generate.cpp:6189-6190 sets to "a layer split across GPUs" (or "batch slots (--batch)") precisely because KVA cannot run there. KVA's own per-read decline path honors blocked (include/strata/prefill/kva.hpp:114). So on a split, a provably inert KVA still refuses the walk — every prompt, forever — and the log line "layer-major declined: STRATA_KVA is on" implies an active KVA. Environment: **Strata Version:** 0.2.7 (source checkout at tag v0.2.7, commit 5e8a4cca; the file discussed is byte-identical to the tag) **OS:** Linux x86-64 Reported from the Strata-Mnemosyne fork's merged tree; the offending code is upstream's own. Reproduce: `STRATA_KVA=1` (the app's "Faster long prompts" switch, the Terminal's Advanced row) + a two-card layer split, long prompt. Expected: the walk runs (KVA is blocked on a split, so nothing is lost); actual: chunk-major prefill, losing the gain the walk brings (the 37e4832a measurements: 2.8x at 8K, 4.8-5.7x at 20-32K on two RTX A4000). No wrong numbers — a silent performance loss. STRATA_DEFAULTS=026 does not help; the trigger is the user turning KVA ON. Suggested one-line fix: decline on `kva_config().on && kva_engine().blocked.empty()`. Reproduction status: unconfirmed static analysis (engine not rebuilt in this window; both guard sites read end to end). What would verify: one first-token timing, KVA on/off, on a two-card split.
Author
Owner

@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:

  1. Re-test on 0.2.11. It may already be fixed. Write down what you see.
  2. Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other].
  3. Fill in the parts of the issue form: what happened, the Strata version, your graphics card, memory and system.
  4. Comment /reopen. A check runs and either reopens the issue or lists what is still missing.

The rules are in CONTRIBUTING.md.

<!-- gh-comment-id:6660377094 --> @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: 1. Re-test on 0.2.11. It may already be fixed. Write down what you see. 2. Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other]. 3. Fill in the parts of the issue form: what happened, the Strata version, your graphics card, memory and system. 4. Comment `/reopen`. A check runs and either reopens the issue or lists what is still missing. The rules are in [CONTRIBUTING.md](https://github.com/Niko1221/Strata/blob/main/CONTRIBUTING.md).
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#1950
No description provided.