Repository navigation
docs(hetero-prefill): the split's verdict depends on the iGPU's measured state (post-reset re-measurement) - #777
Conversation
…red state, not just on the NPU Re-measured the item-2 numbers on the boot after the 2026-11-01 11:13 GPU reset. M <= 2048 reproduces within 3 %; every M=16384 iGPU row is 1.4-3.3x slower (40.7 -> 12.4 TFLOP/s for the 4B up_gate), with a hard knee between M=2048 and M=4096. Ruled out: the library (four libggml-hrx builds agree to 0.5 %) and clocks (2895 MHz, 72-78 C). Cause unproven; effect measured and reproducible. At that 8:1 iGPU:NPU ratio the M-split does beat the iGPU alone, at the balance point rather than at M-256: 1.098x (4B up_gate), 1.111x (4B down), 1.128x (0.6B up_gate). One formula explains both boots -- balance iGPU per-row against NPU per-tile: m~15800 / 1.036x on the pre-reset boot, m~14600 / 1.10-1.13x on this one. So the split's ceiling is a ratio question, not an NPU-quality question, and the ratio is not a constant of this SoC. The verdict does not change: 59.8 ms of split on the degraded boot is still 3x slower than 20.0 ms of iGPU-only on the healthy one. A 10 % win taken from a 3.3x loss is not a reason to build a split dispatcher.
PR Reviewer Guide 🔍(Review updated until commit 911a55c)Here are some key observations to aid the review process:
|
|
@pi-prs for review: doc-only, +40 lines, no numbers removed. It is the post-reboot re-measurement of #755 (merged): the large-M iGPU rows in that doc are 1.4-3.3x faster than this boot measures, the split's ceiling is a function of the iGPU:NPU ratio (1.036x pre-reset vs 1.10-1.13x measured now, both from one balance formula), and the verdict is unchanged for the reason that matters - a split on a degraded boot is still 3x slower than the iGPU alone on a healthy one. Also updated #754 with the measured answer to its own acceptance bar (T=512 buys +2 %, and drains nothing). |
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT: READY
Build is green now, and the content is the honest half of a measurement story rather than a new claim.
Every number traces to the lane's own record (~/briefs/TMOSAIC-STATE.md, the 2026-11-01 entries) and the
TFLOP-s cells re-derive from rows×K×N×2 on this box:
- pre/post-reset table: 2.880 ms / 35.4 TFLOP-s vs 2.80 / 36.4 (2048·2560·9728·2 = 0.102 TFLOP → 35.4 ✓); 67.510 / 12.1
vs 21.21 / 38.5 (0.816 TFLOP → 12.1 ✓); 12.390 / 8.3 vs 8.58 / 11.9 and 9.71 / 10.6 for the 0.6B shapes ✓; - "M ≤ 2048 reproduces within 3 %" is exact at its own boundary: 2.80 → 2.88 = +2.9 %;
- the knee row (M=2048 → 36.9, M=4096 → 12.5) is
TMOSAIC-STATE.md:331-332verbatim; - the balance table is
splitbal-*.tsvas the state file quotes it: 4B up_gate 65.705 ms alone, split 59.842 ms at
m=14848 / 6 tiles = 1.098x; 4B down 67.660 → 60.886 at m=14592 / 7 = 1.111x; 0.6B up_gate 12.730 → 11.287 at
m=14592 / 7 = 1.128x; and "amdxdna errors 0 before and 0 after" is that entry's own line; - the closing arithmetic checks: 65.71 / 1.098 = 59.85 ms of split against 20.0 ms of iGPU-only on the healthy boot is
the ~3x, and the m≈15800 / 1.036x ceiling is the state file's model prediction.
What makes this worth merging is the framing, not the numbers: the earlier "the split never wins" verdict is
labelled as conditional on the iGPU's state, the cause of the degradation is stated as unproven ("four different
libggml-hrx builds agree to 0.5 %", clocks flat at 2895 MHz), and the conclusion is that a 10 % win taken from a 3.3x
loss is not a reason to build a split dispatcher — the opposite of a number being dressed up. It also says plainly what
to re-run before anyone quotes a ceiling from the document.
Nits, neither blocking: the table has no run-directory citations (the rest of the file cites ~/lb/... for its
measured rows — splitbal-*.tsv and the sweep-*.tsv pair would pin it); and the state file's note that the q4_1
M=16384 row in the 06:00 TSV is a no-op (unsupported node, "0.01 ms / 90000 TFLOP-s") is worth one line here too,
because anyone re-reading that TSV will otherwise trust that cell.
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT: READY
Confirmation at c99ae316 after update-branch (main's #768 squash merged in; author commit c466d01 unchanged, so the
post-reset re-measurement section is identical to what I verified: the pre/post-reset rows, the 36.9/12.5 knee, the
splitbal-*.tsv balance table at 1.098x / 1.111x / 1.128x, and every TFLOP-s cell re-derived from rows×K×N×2). Build
green. tprs-ready stays.
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT: READY
Confirmation at 5a9af188 after update-branch: their own files are byte-identical to the head I verdicted — verified with
git diff --stat <previous head> 5a9af188 -- <this PR's paths> → empty, the merge brought #768's and #775's squashes
(7f4e98a, e55096b) and nothing else. Content as reviewed (hetero-prefill), build green. tprs-ready stays.
|
Cross-reference, since the doc's large-M rows are the reason this PR exists: the 3.3x gap between the pre-reset and post-reset iGPU numbers is not this boot's state, it is a build regression, isolated and filed as #782. The packaged |
…82), not boot state The re-measurement section described the 3.3x gap as cause-unknown with the box's GTT occupancy as context. That was wrong: the gap is inside libggml-hrx. Crossed arms (today's host lib with the rc-2026-10-31c code objects = slow; the rc-2026-10-31c host lib with today's code objects = fast, same dispatch, same 335-kernel corpus) put the boundary in the host library, and both sides are on llama.cpp pin 4a58da9b0, so it is build configuration rather than source. Filed as engine#782. Same boot, rc-2026-10-31c libs: 18.6 ms / 43.95 TFLOP-s at M=16384, i.e. the pre-reset numbers reproduce exactly and only current main is slow. Also records the dispatcher rule behind the M=2048 knee: the Q4_K x4 prefill path is capped at 2048 tokens and Q4_K cannot use the split-tail relaxation. The verdict paragraph is unchanged - a split ceiling follows whatever the iGPU is doing.
|
Persistent review updated to latest commit 24f918e |
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT: READY
This is new content, not a rebase: the branch gained 20 lines that turn "the knee is measured" into "the knee is a
dispatch rule, and the 12.4 TFLOP-s figure is a build regression". I checked the mechanism against the code and the
issue.
The dispatch claim is exact. common.mul_mat.q4_k_q8_1_x4_prefill's matcher
(ggml/src/ggml-hrx/dispatch_registration/common/dispatch-mul-mat.cpp:799-801) declines unless
256 <= token_count <= 2048 and the count is 256-aligned (or the split-tail relaxation applies) — so every M above 2048
rides a different kernel, exactly as the paragraph says. The Q5_K/IQ4_XS sibling taking kMulMatQ5KIQ4XSQ8_1X4Wmma… at
line 788 is the same shape, which is why the wording is about Q4_K specifically rather than prefill in general.
The regression claim is filed, not just asserted: engine#782 exists, is open, and its title is the claim
("Q4_K prefill at M>2048 is 3.5x slower than the rc-2026-10-31c binaries; the gap is inside libggml-hrx (same llama.cpp
pin, same dispatch)"). The cross-library arms the paragraph describes (slow libggml-hrx driving the old libhrx/loomc and
vice versa, 335 code objects in all four) are the right instrument for that question, and the conclusion — configuration,
not source, since both sides sit on pin 4a58da9b0 — is the one the crossing supports.
And the honesty is the point: the paragraph now says the split's ceiling follows whatever the iGPU is currently
doing, 3.5x below the release candidate on the same hardware, rather than leaving the reader with a 1.098x that would
evaporate under the next good build. That is a stronger version of the reason I labelled the first revision.
The numbers still trace to TMOSAIC-STATE.md (2.880/35.4, 67.510/12.1, the 36.9/12.5 knee, the balance table
1.098x / 1.111x / 1.128x) and the TFLOP-s cells re-derive from rows×K×N×2. tprs-ready stays.
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT: READY
Confirmation at d0f53f24 after the waiter's rebase onto main (90c998a = #776 merged): this PR's own paths are
byte-identical to the head I verdicted — git diff --stat <previous head> d0f53f24 -- <its paths> → empty. Content as
reviewed, build green. tprs-ready stays.
|
Persistent review updated to latest commit a8ed9cb |
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT: READY
Confirmation at 911a55ccc9a24114bf041d5d08ba7e6d80609964, update-branched and green, with the content unchanged since I reviewed it
(git diff --stat 24f918e4 911a55ccc9a24114bf041d5d08ba7e6d80609964 -- docs/hetero-prefill.md → empty). So everything in that review stands: the knee is the
dispatch rule (verified at dispatch-mul-mat.cpp:799-801, 256 <= token_count <= 2048 and 256-aligned or split-tail) and
the 12.4 TFLOP-s figure is the build regression filed as engine#782; the pre/post-reset rows, the 36.9/12.5 knee and the
balance table still trace to TMOSAIC-STATE.md and re-derive.
tprs-ready stays.
|
Persistent review updated to latest commit 911a55c |
Follow-up to #755 (merged). Doc-only, no engine code.
Why: #755's numbers were taken on one boot (2026-11-01 06:00-06:40 AST, before the 11:13 GPU reset). The box
was rebooted at ~12:04 and the orchestrator gave the GPU all-clear at 12:13, so I re-ran the same harness, the same
NPU kernel sets and the same shapes. The iGPU rows at M=16384 do not reproduce: all of them are 1.4-3.3x slower,
with a hard knee between M=2048 and M=4096 and a linear regime above it.
Ruled out by measurement, not assumption: the library (same binary against four different
libggml-hrxbuilds,including pi-release's frozen HW-gate
build-54625e8745and the packaged release image: 65.499-65.846 ms, 0.5 %spread) and clocks (2895 MHz,
auto, Tctl 72-78 C, thermal guard never froze a scope). The environment doesdiffer - two live HRX serves resident, GTT 33-35 GB of 128 GB, 182 free 2 MiB blocks - so the cause is recorded as
unproven. This is an observation for whoever owns the large-prefill path (
#680is the fault-at-the-ceiling issue;this is a throughput knees at a third of the ceiling, no faults logged).
What it changes: at that 8:1 iGPU:NPU ratio the M-split does win, at the balance point instead of at M-256:
1.098x (4B up_gate, m=14848), 1.111x (4B down, m=14592), 1.128x (0.6B up_gate, m=14592),
amdxdnaerrors 0before and after. One formula explains both boots - balance the iGPU's per-row time against the NPU's
per-256-row-tile time: m
15800 / 1.036x pre-reset, m14600 / 1.10-1.13x post-reset. So the ceiling on a split is aquestion of the ratio, and the ratio is not a constant of this SoC.
What it does not change: the verdict. 59.8 ms of split on the degraded boot is still 3x slower than 20.0 ms of
iGPU-only on the healthy one. A 10 % win taken from a 3.3x loss is not a reason to build a split dispatcher, so
#754 stays blocked for the same reason and now has a sharper acceptance bar (a ratio, not an NPU absolute).
cc @pi-prs for review; the owner merges. Raw data and the three scripts behind every row are in
~/mosaic-bench(
recheck-*.tsv,mcurve.log,splitbal-*.tsv,cmp-libs.sh).