[PR #3245] [Engine] log which batch-row switches are on at start-up #4523

Open
opened 2026-11-07 15:36:41 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/3245
Author: @yi-sudo
Created: 10/19/2026
Status: 🔄 Open

Base: main ← Head: batch-switches-log


📝 Commits (1)

  • 0f31ba6 Batch decode: log which batch-row switches are on at start-up

📊 Changes

2 files changed (+27 additions, -15 deletions)

View changed files

📝 docs/BATCHING.md (+6 -0)
📝 src/core/verify.cpp (+21 -15)

📄 Description

Problem and result

STRATA_BATCH_ATTN_ROWS and STRATA_BATCH_GDN_GROUPS (merged from #2234 in f629fb0) are silent: nothing in the engine log says whether they were picked up, and attention quietly keeps its per-row launches when a slot's KV streams. In #2234 you mentioned a start-up line showing which switches are on and when they fall back would be welcome; this adds it.

Off (the default), nothing is printed and the engine runs exactly as before. With either switch on, the verifier prints one line after its existing batch windows of up to N sequences line (once per stage of a layer split):

strata verify: batch rows in one launch: attention on (STRATA_BATCH_ATTN_ROWS), GDN on (STRATA_BATCH_GDN_GROUPS); the KV streams (--kv-resident), so attention keeps one launch per row

The last clause appears only when attention is on and a slot streams its KV (kv_mode == 1).

https://github.com/Niko1221/Strata/pull/2234#issuecomment-6231123506

Approach

  • The two env reads moved from three function-local statics in src/core/verify.cpp to two file-scope constants next to the other batch switches (g_batch_self_commit, g_qsa_slots). The parsing is the same as before: set and atoi != 0.
  • Verifier::init_slots prints the line, so it sits with the existing batch-window line and can check each slot's QSA kv_mode.
  • docs/BATCHING.md: one paragraph with the example line.
  • The SYCL tree has its own verify.cpp without these switches, so it is untouched.

Validation

Passed:

  • CUDA build: cmake --build build at 0f31ba6e (on upstream e88ee39d), Ubuntu, CUDA 13.0, sm_120. 462/462 targets, no errors and no new warnings in verify.cpp.
  • ./build/batch_rows_parity: all bitwise.
  • ctest in build: everything passed except expert_parity, which needs pack/full/experts.bin, a pack I don't have locally.
  • HIP build of the strata target: ROCm 7.10 pip SDK (rocm[libraries,devel]==7.10.0a20251120), -DCMAKE_HIP_ARCHITECTURES=gfx1201. 157/157 targets with no errors. Compile only; I have no AMD GPU.
  • Engine start with both switches unset, on an RTX PRO 6000 Blackwell (IQ3_S, --parallel 4): the log shows only the existing batch windows of up to 4 sequences line and no new line.

Failed:

  • none observed

Not run:

  • Engine start with a switch set. The line is not checked on hardware, but the arithmetic paths are unchanged from #2234.
  • HIP and SYCL execution (no hardware). SYCL build not run because its sources are not touched.

Limits

  • The message only reports what was configured. It does not count how many windows actually used the batched path.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/3245 **Author:** [@yi-sudo](https://github.com/yi-sudo) **Created:** 10/19/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `batch-switches-log` --- ### 📝 Commits (1) - [`0f31ba6`](https://github.com/Niko1221/Strata/commit/0f31ba6ead27ca32f8a9fbe93893a35393983c3f) Batch decode: log which batch-row switches are on at start-up ### 📊 Changes **2 files changed** (+27 additions, -15 deletions) <details> <summary>View changed files</summary> 📝 `docs/BATCHING.md` (+6 -0) 📝 `src/core/verify.cpp` (+21 -15) </details> ### 📄 Description ## Problem and result `STRATA_BATCH_ATTN_ROWS` and `STRATA_BATCH_GDN_GROUPS` (merged from #2234 in f629fb0) are silent: nothing in the engine log says whether they were picked up, and attention quietly keeps its per-row launches when a slot's KV streams. In #2234 you mentioned a start-up line showing which switches are on and when they fall back would be welcome; this adds it. Off (the default), nothing is printed and the engine runs exactly as before. With either switch on, the verifier prints one line after its existing `batch windows of up to N sequences` line (once per stage of a layer split): ``` strata verify: batch rows in one launch: attention on (STRATA_BATCH_ATTN_ROWS), GDN on (STRATA_BATCH_GDN_GROUPS); the KV streams (--kv-resident), so attention keeps one launch per row ``` The last clause appears only when attention is on and a slot streams its KV (`kv_mode == 1`). ## Related discussion https://github.com/Niko1221/Strata/pull/2234#issuecomment-6231123506 ## Approach - The two env reads moved from three function-local statics in `src/core/verify.cpp` to two file-scope constants next to the other batch switches (`g_batch_self_commit`, `g_qsa_slots`). The parsing is the same as before: set and `atoi != 0`. - `Verifier::init_slots` prints the line, so it sits with the existing batch-window line and can check each slot's QSA `kv_mode`. - `docs/BATCHING.md`: one paragraph with the example line. - The SYCL tree has its own `verify.cpp` without these switches, so it is untouched. ## Validation **Passed:** - CUDA build: `cmake --build build` at 0f31ba6e (on upstream e88ee39d), Ubuntu, CUDA 13.0, sm_120. 462/462 targets, no errors and no new warnings in `verify.cpp`. - `./build/batch_rows_parity`: all bitwise. - `ctest` in `build`: everything passed except `expert_parity`, which needs `pack/full/experts.bin`, a pack I don't have locally. - HIP build of the `strata` target: ROCm 7.10 pip SDK (`rocm[libraries,devel]==7.10.0a20251120`), `-DCMAKE_HIP_ARCHITECTURES=gfx1201`. 157/157 targets with no errors. Compile only; I have no AMD GPU. - Engine start with both switches unset, on an RTX PRO 6000 Blackwell (IQ3_S, `--parallel 4`): the log shows only the existing `batch windows of up to 4 sequences` line and no new line. **Failed:** - none observed **Not run:** - Engine start with a switch set. The line is not checked on hardware, but the arithmetic paths are unchanged from #2234. - HIP and SYCL execution (no hardware). SYCL build not run because its sources are not touched. ## Limits - The message only reports what was configured. It does not count how many windows actually used the batched path. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
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#4523
No description provided.