[GH-ISSUE #1926] MI50 (gfx906) against v0.1.42: four doc-level notes (decode-half defaults, IO_PREFETCH, ROUTE_TAIL_SKIP wording, dump-logits) #762

Closed
opened 2026-11-04 01:45:39 +07:00 by bsakaguchi · 3 comments
Owner

Originally created by @phoenixclyde on GitHub (Oct 11, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/1926

Context: one Radeon Instinct MI50 32GB (gfx906), engine 0.1.42, a native UD-IQ4_XS pack, --kv k8v4, single GPU.
Everything below was measured on that box; every comparison was single-variable (the two configs differ only in the
config env block, the engine args are asserted byte-identical), interleaved, and read from the engine's own
"256 generated in N ms" line. Raw data and the exact commands are available on request.

  1. arch_defaults.cpp: the decode half of the gfx1151 table does not transfer to gfx906

arch_default_env() returns the table only for gfx12 (prompt half) and gfx1151; on gfx906 it returns the empty table
and nothing is auto-enabled. That part is clear. What we measured is the value of one entry on gfx906:

STRATA_Q8_PACKED=1 (the packed Q8_0 decode layout, annotated "+2.3% (S26)" in the table), A baseline vs Q,
ABBA x5 interleaved, L=16384, max_tokens=256, decode ms/step:
all 10 points: A 23.436 Q 23.805 (+1.57%)
warm 8 (first run of a block dropped) A 22.656 Q 23.286 (+2.78%)
Arm-internal spread: A 6.6%, Q 18.8%, so the delta is inside the spread => we read it as no gain.
Cost: +1,912.5 MiB VRAM ("native dense: STRATA_Q8_PACKED=1 packed 84 Q8_0 matrices for decode (+1912.5 MiB)").
Correctness: bit-identical outputs in all 5 launches (same fixed-prompt md5), i.e. lossless as documented.

The table's own gfx12 comment already says "the decode half measured slower on that card, so it stays out"; gfx906 is
a third card with the same outcome. Suggestion: state "decode half = not universal" in the table comment or the docs,
so MI50 and other users do not copy it.

  1. STRATA_IO_PREFETCH: on a large-RAM host it is a no-op

Host: 128 GiB RAM, --resident-budget-gib 76. The switch is taken (it is in the engine's /proc environ, and the
start line says "file tier io prefetch ON ... 8 I/O threads"), but the per-request line is

io prefetch: 0 read ahead (0.0 MB by pread), 0 used, 0 unused, 0 skipped (cached), 0 dropped

in 4/4 readings, and the same request reports "the OS read 998.5 MB from storage ... for 42282.7 MB of expert reads;
page cache held 78191.7 MB at the read". The switch is on, there is just nothing to prefetch.
Suggestion: one line in the notes that the benefit requires the experts to be not resident in RAM.

  1. STRATA_ROUTE_TAIL_SKIP: "off ... on AMD and Intel" does not match a gfx906 build here

On our gfx906 build:

  • the start line prints STRATA_ROUTE_TAIL_SKIP=7 is ON (default) in 12/12 starts;
  • the running counter prints route tail skip: <N> missed experts skipped (<M> entries) since the start, N reaching
    672,855.
    Mechanism: generate.cpp guards that default with #if !defined(STRATA_USE_HIP). In this build STRATA_USE_HIP is
    defined only on the INTERFACE target strata_hip_runtime, which the main engine target does not link, so the CUDA
    branch is compiled in and the default applies. CMakeLists.txt sets STRATA_HIP_GFX906=1 globally, and its option
    text reads "Build the CUDA targets for AMD gfx906 through HIP (wave64 compat layer)".

So the sentence is correct for a HIP-target build and incorrect for ours; would you like it checked / reworded?
(The practical consequence for us is that our answers differ slightly from the exact 0.1.41 ones; setting
STRATA_ROUTE_TAIL_SKIP=0 restores them, which matches the documented explicit override.)

  1. --dump-logits and native packs

generate.cpp comments "A native pack never runs the per-token loop --dump-logits reads", so on a native pack the
flag returns nothing. Suggest one line in its help text.

Originally created by @phoenixclyde on GitHub (Oct 11, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/1926 Context: one Radeon Instinct MI50 32GB (gfx906), engine 0.1.42, a native UD-IQ4_XS pack, --kv k8v4, single GPU. Everything below was measured on that box; every comparison was single-variable (the two configs differ only in the config `env` block, the engine `args` are asserted byte-identical), interleaved, and read from the engine's own "256 generated in N ms" line. Raw data and the exact commands are available on request. 1) `arch_defaults.cpp`: the decode half of the gfx1151 table does not transfer to gfx906 ---------------------------------------------------------------------------------------- `arch_default_env()` returns the table only for gfx12 (prompt half) and gfx1151; on gfx906 it returns the empty table and nothing is auto-enabled. That part is clear. What we measured is the value of one entry on gfx906: `STRATA_Q8_PACKED=1` (the packed Q8_0 decode layout, annotated "+2.3% (S26)" in the table), A baseline vs Q, ABBA x5 interleaved, L=16384, max_tokens=256, decode ms/step: all 10 points: A 23.436 Q 23.805 (+1.57%) warm 8 (first run of a block dropped) A 22.656 Q 23.286 (+2.78%) Arm-internal spread: A 6.6%, Q 18.8%, so the delta is inside the spread => we read it as no gain. Cost: +1,912.5 MiB VRAM ("native dense: STRATA_Q8_PACKED=1 packed 84 Q8_0 matrices for decode (+1912.5 MiB)"). Correctness: bit-identical outputs in all 5 launches (same fixed-prompt md5), i.e. lossless as documented. The table's own gfx12 comment already says "the decode half measured slower on that card, so it stays out"; gfx906 is a third card with the same outcome. Suggestion: state "decode half = not universal" in the table comment or the docs, so MI50 and other users do not copy it. 2) `STRATA_IO_PREFETCH`: on a large-RAM host it is a no-op ---------------------------------------------------------- Host: 128 GiB RAM, `--resident-budget-gib 76`. The switch is taken (it is in the engine's /proc environ, and the start line says "file tier io prefetch ON ... 8 I/O threads"), but the per-request line is `io prefetch: 0 read ahead (0.0 MB by pread), 0 used, 0 unused, 0 skipped (cached), 0 dropped` in 4/4 readings, and the same request reports "the OS read 998.5 MB from storage ... for 42282.7 MB of expert reads; page cache held 78191.7 MB at the read". The switch is on, there is just nothing to prefetch. Suggestion: one line in the notes that the benefit requires the experts to be *not* resident in RAM. 3) `STRATA_ROUTE_TAIL_SKIP`: "off ... on AMD and Intel" does not match a gfx906 build here -------------------------------------------------------------------------------------------- On our gfx906 build: - the start line prints `STRATA_ROUTE_TAIL_SKIP=7 is ON (default)` in 12/12 starts; - the running counter prints `route tail skip: <N> missed experts skipped (<M> entries) since the start`, N reaching 672,855. Mechanism: `generate.cpp` guards that default with `#if !defined(STRATA_USE_HIP)`. In this build `STRATA_USE_HIP` is defined only on the INTERFACE target `strata_hip_runtime`, which the main engine target does not link, so the CUDA branch is compiled in and the default applies. `CMakeLists.txt` sets `STRATA_HIP_GFX906=1` globally, and its option text reads "Build the CUDA targets for AMD gfx906 through HIP (wave64 compat layer)". So the sentence is correct for a HIP-target build and incorrect for ours; would you like it checked / reworded? (The practical consequence for us is that our answers differ slightly from the exact 0.1.41 ones; setting `STRATA_ROUTE_TAIL_SKIP=0` restores them, which matches the documented explicit override.) 4) `--dump-logits` and native packs ----------------------------------- `generate.cpp` comments "A native pack never runs the per-token loop `--dump-logits` reads", so on a native pack the flag returns nothing. Suggest one line in its help text.
Author
Owner

@Boundlessmolson commented on GitHub (Oct 16, 2026):

Adding a data point from the Metal engine (296b59d, 0.1.44.1-metal, M5 Max 36 GB, Q2_0 native pack): --dump-logits produces a 0-byte file as described here, but stdout still prints

logits dumped            /tmp/p1-dump.bin

generate.cpp:14171 prints that line whenever the FILE* is open, including when no row was written. Since #561 made an empty file the signal for "this mode never dumps", the success line contradicts it. Two small options: skip that line (or print a warning) when zero rows were written, or refuse --dump-logits at startup with a native pack and point to STRATA_LOGPOS, which worked for me as an alternative.

For context: I've been checking the Metal engine against logits from the CUDA engine (H100, greedy, --spec 0). Via STRATA_LOGPOS it agrees within numerical noise: 479 of 492 positions pick the same token, the other 13 are near-ties, and mean NLL over a 306-token prompt is within 0.15% of CUDA's. Happy to share the fixtures.

<!-- gh-comment-id:6205011717 --> @Boundlessmolson commented on GitHub (Oct 16, 2026): Adding a data point from the Metal engine (296b59d, 0.1.44.1-metal, M5 Max 36 GB, Q2_0 native pack): `--dump-logits` produces a 0-byte file as described here, but stdout still prints ``` logits dumped /tmp/p1-dump.bin ``` `generate.cpp:14171` prints that line whenever the `FILE*` is open, including when no row was written. Since #561 made an empty file the signal for "this mode never dumps", the success line contradicts it. Two small options: skip that line (or print a warning) when zero rows were written, or refuse `--dump-logits` at startup with a native pack and point to `STRATA_LOGPOS`, which worked for me as an alternative. For context: I've been checking the Metal engine against logits from the CUDA engine (H100, greedy, `--spec 0`). Via `STRATA_LOGPOS` it agrees within numerical noise: 479 of 492 positions pick the same token, the other 13 are near-ties, and mean NLL over a 306-token prompt is within 0.15% of CUDA's. Happy to share the fixtures.
Author
Owner

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

  1. Re-test on 0.2.0-beta. 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:6270702662 --> @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: 1. Re-test on 0.2.0-beta. 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).
Author
Owner

@satwareAG-ironMike commented on GitHub (Oct 28, 2026):

Field confirmation of point 4 (--dump-logits and native packs) on engine 0.1.52, CUDA sm_86, IQ3_XXS GSQ-RCO native pack, 2026-10-28:

  • strata generate ... --tokens-file <130k.ids> --max-new 1 --dump-logits out.bin prints logits dumped out.bin but writes a 0-byte file, both with --prefill auto and with --prefill 1 (the study-style per-token attempt). Measured at stride 1 and stride 64; identical outcome. This matches the generate.cpp comment ("a native pack never reaches the per-token dump site") - no data loss, just the documented gap.
  • Concrete impact: a downstream KV-quality gate (128K KVA on/off parity, teacher-forced KL + top-1, method of bench/results/2026-09-27-cache-parity) cannot execute on a native pack. We substituted the fact-recall quality gate (6/6 exact needle recall over 6 cold 122K-token prompts on the live STRATA_KVA=1 config).
  • The help-text suggestion from this issue's point 4 would have saved the probe: a line on --dump-logits ("no rows on native packs") plus an early FATAL-style refusal when --dump-logits is combined with a native pack would turn a silent 0-byte file into an upfront error.
  • For context, Niko1221/Strata#729 reports a teacher-forced KLD compare on a native IQ3_S pack at up to 240K, but its tooling was never published, so we could not reuse the method.
<!-- gh-comment-id:6482780286 --> @satwareAG-ironMike commented on GitHub (Oct 28, 2026): Field confirmation of point 4 (`--dump-logits` and native packs) on engine 0.1.52, CUDA sm_86, IQ3_XXS GSQ-RCO native pack, 2026-10-28: - `strata generate ... --tokens-file <130k.ids> --max-new 1 --dump-logits out.bin` prints `logits dumped out.bin` but writes a 0-byte file, both with `--prefill auto` and with `--prefill 1` (the study-style per-token attempt). Measured at stride 1 and stride 64; identical outcome. This matches the `generate.cpp` comment ("a native pack never reaches the per-token dump site") - no data loss, just the documented gap. - Concrete impact: a downstream KV-quality gate (128K KVA on/off parity, teacher-forced KL + top-1, method of bench/results/2026-09-27-cache-parity) cannot execute on a native pack. We substituted the fact-recall quality gate (6/6 exact needle recall over 6 cold 122K-token prompts on the live STRATA_KVA=1 config). - The help-text suggestion from this issue's point 4 would have saved the probe: a line on `--dump-logits` ("no rows on native packs") plus an early `FATAL`-style refusal when `--dump-logits` is combined with a native pack would turn a silent 0-byte file into an upfront error. - For context, Niko1221/Strata#729 reports a teacher-forced KLD compare on a native IQ3_S pack at up to 240K, but its tooling was never published, so we could not reuse the method.
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#762
No description provided.