ling32 sycl: KDA chunk scan default back to the validated scan (STRATA_L32_KDA_SEQ=0); the split scan (4 / 8) is opt-in until its long-prompt deviation is fixed

On the B70, a 4096-token prompt (first tokens of long_16k) teacher-forced against the long_16k_fp64 golden: the split scan gives top-1 99.878 %, mean KL 2.7e-4, 127 positions above KL 1e-3 starting at position 2717; the old scan with the same MLA gives top-1 100 %, mean KL 2.2e-7, none above 1e-3. The register note of STRATA_L32_KDA_SEQ is updated (opt-in).
This commit is contained in:
Niko1221 committed 2026-12-03 05:28:57 +01:00
1 parent d5f9032da2
commit fe5c6b02f0
3 files changed
+6 -6

No files matched your search

+3 -3
View File
@@ -10,7 +10,7 @@ debugging and are kept in `terminal/data/settings-register.json`.
A number or a word is set like any environment variable, for example `STRATA_KVA=1`. In the Terminal, `strata launch --set NAME=value`
puts it in the model's run configuration.
## Switches you can turn on (470)
## Switches you can turn on (471)
Off unless you set them. The last column says where each one is described.
@@ -276,6 +276,7 @@ Off unless you set them. The last column says where each one is described.
| `STRATA_KV_HOST_REGISTER` | on / off | NVIDIA and AMD | [DETAILS.md](DETAILS.md) |
| `STRATA_KV_PREFETCH` | number | NVIDIA and AMD, Intel Arc | [KV_PREFETCH.md](KV_PREFETCH.md), [README.md](bench-results/README.md), [README.md](bench-results/2026-10-06-community-rtx4090-opt-ins/README.md) |
| `STRATA_KV_ROT` | on / off | NVIDIA and AMD, Intel Arc | [DETAILS.md](DETAILS.md), [SPLIT_SERVE.md](SPLIT_SERVE.md) |
| `STRATA_L32_KDA_SEQ` | number | Intel Arc | - |
| `STRATA_L32_MTP_ONLINE` | on / off | NVIDIA and AMD | - |
| `STRATA_L32_SEGMENTED` | on / off | NVIDIA and AMD | - |
| `STRATA_L3_PF` | on / off | NVIDIA and AMD | [DETAILS.md](DETAILS.md) |
@@ -487,7 +488,7 @@ Off unless you set them. The last column says where each one is described.
| `STRATA_WATCHDOG_S` | text | NVIDIA and AMD, Intel Arc | [DETAILS.md](DETAILS.md) |
| `STRATA_WDDM_BUDGET` | number | AMD, Intel Arc | [AMD_HIP.md](AMD_HIP.md) |
## Switches that go back to earlier behaviour (188)
## Switches that go back to earlier behaviour (187)
These behaviours are on by default. Setting the switch returns the earlier behaviour; the notes in the register say which
version made it the default.
@@ -589,7 +590,6 @@ version made it the default.
| `STRATA_L32_BIGSLOTS` | on / off | NVIDIA and AMD | - | - |
| `STRATA_L32_BUFFERED` | on / off | NVIDIA and AMD | - | - |
| `STRATA_L32_GATE_ROWS` | on / off | NVIDIA and AMD | - | - |
| `STRATA_L32_KDA_SEQ` | number | Intel Arc | - | - |
| `STRATA_L32_LAZY_KV` | on / off | NVIDIA and AMD | - | - |
| `STRATA_L32_MLA_EXPANDED` | on / off | NVIDIA and AMD | - | - |
| `STRATA_L32_MLA_EXP_MODE` | number | Intel Arc | - | - |
+1 -1
View File
@@ -557,7 +557,7 @@ void kda_step(float* S, const float* qn, const float* kn, const float* vc, const
const size_t need = static_cast<size_t>(nch) * H * (hd == 64 ? kda_chunk_scr_floats<64, kChunk>() : kda_chunk_scr_floats<128, kChunk>());
if (need > scratch_floats) { std::fprintf(stderr, "ling32: KDA chunk scratch too small\n"); std::abort(); }
static const int env_mode = std::getenv("STRATA_L32_KDA_SEQ") ? std::atoi(std::getenv("STRATA_L32_KDA_SEQ")) : -1;
if (g_sy_kda_seq_mode < 0) g_sy_kda_seq_mode = env_mode >= 0 ? env_mode : 8;
if (g_sy_kda_seq_mode < 0) g_sy_kda_seq_mode = env_mode >= 0 ? env_mode : 0; // default 0 (the validated one-column-per-lane scan): the split scan (4 / 8) deviates from the float64 golden on long prompts (a 4096-token prompt, from position 2717 on: KL 2.7e-4, 127 positions above 1e-3), opt-in with STRATA_L32_KDA_SEQ=4 / 8 until fixed
const int mode = g_sy_kda_seq_mode; // 0: the one-column-per-lane scan (launch_chunk_seq), 4 / 8: the scan split over the value columns with 4 / 8 key-row groups (launch_chunk_seq2) + the norm kernel
if (hd == 128) {
launch_chunk_pre<128, kChunk>(qn, kn, f_raw, fs, beta_raw, A_log, dt_bias, lower_bound, N, H, scratch, s);
+2 -2
View File
@@ -34673,9 +34673,9 @@
"since": null,
"last_commit": "e8b28c7588",
"last_date": "2026-12-03",
"status": "rollback",
"status": "opt-in",
"owner": "L32-SY-MLA",
"note": "SYCL KDA chunk scan of prefill batches (N > 16): 0 = the old one-column-per-lane scan, 4 or 8 = the scan split over the value columns with 4 / 8 key-row groups (default 8).",
"note": "SYCL: KDA chunk scan mode. Default 0 = the validated one-column-per-lane scan; 4 / 8 = the scan split over the value columns (about 13x faster on the B70) but it deviates from the float64 golden on long prompts (4096 tokens, from position 2717), so it is opt-in until fixed.",
"retire_after": "",
"retired_in": ""
},