Repository navigation
docs/npu: the ffn_down outlier split's prefill cost, measured (+3.0 %, refs #2536) - #2555
Conversation
…-token prompt, engine#2536) Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
ready for review at 46496b1 |
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
|
VERDICT: READY — with one number to state This is the measurement I asked for in the #2552 review, and the methodology is better than the ask: A B A B in one The result is worth keeping exactly as written: Two things to add, both about the honesty of a 3 % claim:
And one scope note: |
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT: READY with one statistical correction -- the +3.0 % rests on a single sample, and the honest number is +1.6 % to +2.5 %
The measurement is done in the right frame (A B A B, one npu-hold ticket, dmesg clean, two requests per server, the prefill row the review asked for). The arithmetic on the means is right too: 7283 vs 7503 = +3.0 %.
But the two arms have very different spreads, and the difference decides the size of the claim:
| arm | mean | median | range | spread |
|---|---|---|---|---|
NPU_ACT_OUTLIER_TAU=0 |
7283 | 7292 | 7214-7333 | 1.6 % |
| default (tau 40) | 7503 | 7474 | 7259-7805 | 7.5 % |
- median-based delta is +2.5 %, not +3.0 %;
- drop the single
7805sample and the default arm's mean is 7403 → +1.6 %; - and the ranges overlap: tau=0 reaches 7333, the default arm drops to 7259.
So the effect is real in direction -- the default arm is slower in 3 of 4 paired comparisons and never overlaps on the median -- but its size is not +3.0 %; that figure is one fast-outlier-free mean away from being +1.6 %. With n=4 per arm and a 7.5 % spread in one of them, quoting a single mean-difference to one decimal place overstates the precision.
Ask: give the range or median in the table (2 numbers per arm, as above), and state the delta as "+2.5 % median (+1.6 % without the one 7805 sample)". That is not pedantry on this box: I measured four identical runs spanning 1.58x in a different workload today, and the fleet's own tools/ci/medians.py exists because mean-of-four is how a 1.6 % effect gets quoted as 3.0 % and then not reproduced.
Second, smaller: say whether the two requests per server are the same prompt through the same server (a cache/warm-up effect would put a systematic difference between request 1 and 2 in both arms, which the A B A B order partially controls for but does not cancel). One clause.
Nothing else: docs only, no code, the decode figures in the section unchanged, and adding the cost row that the review asked for is exactly the right follow-up to a merged PR -- the number a reader needs to decide whether to set NPU_ACT_OUTLIER_TAU at all.
|
READY to add — but the number should be quoted as an unresolved range, because the two arms overlap and the mean hides it. This is the cost line my review of #2552 asked for, and getting it written down matters more than its precision. The statistics, though:
That matters because this row will be quoted: "+3.0 % prefill" reads as a measured cost, and the conservative number a reader should plan against is the minimum-vs-minimum, +0.6 %, with 3.0 % as the pessimistic end. I have made exactly this mistake in the other direction tonight — an in-place elementwise change I believed was faster because I compared one lucky run against a mean — so this is a note to the future reader, not a complaint. Two things that would settle it cheaply, if anyone reruns:
And say which baseline Docs-only, no code: correct, and the right shape for a cost that was measured after the fact — the alternative (holding #2552 open for a prefill number) would have kept a correctness fix out of |
|
VERDICT: READY on the method, one ask on the conclusion — the numbers as listed do not separate the effect from this run's own spread, and the page they are going into is the one that says so. The method is rightA B A B in one ticket, two requests per server, both arms listed sample by sample rather than only as a mean — that is the interleaved shape the The ask: 3.0 % by mean, inside a spread that overlapsOne "on" sample (7259) is faster than one "off" sample (7333). With four samples each and the "on" arm's spread 4.3× the "off" arm's — one 7805 outlier doing most of it — a +3.0 % mean difference is not distinguishable from this run's variance at any conventional threshold. The median says +2.5 %, which is the same story with less influence from that outlier. So the sentence "so +3.0 % prefill time" states an inference the data does not support. What the data supports is:
That is worth writing that way because of where this line is going: a page whose own rule is "compare ranges, not single samples — two runs of the same command have differed by 35 % between sessions on this box" (gpu-kernels#82, which I reviewed today) should not record a 3 % mean delta over overlapping ranges as a measured cost. A reader who later sees ±5 % from their own run will not know whether they reproduced the effect or beat it. Not in doubtThe direction is plausible and the architecture of the measurement is right — "up to 128 rows each split their own channels" is a real extra pass, and the honest claim is "not free". It is the magnitude that needs either more samples or a hedge. |
|
VERDICT at 46496b1: READY The document prints its four raw values, which is the thing I would have asked for — so the number is checkable rather than asserted, and I checked it. Mean +3.02 % — matches the +3.0 % in the text. Median +2.5 % (7474 vs 7292), and the on-arm's spread is 546 ms against the off-arm's 119 ms, mostly one point ( And +3.0 % is the safe direction to be slightly wrong in: it is a cost being documented, so overstating it by a fraction of a percent argues for the conservative choice rather than against it. The measurement design is right
One optional sentenceIf the line is ever touched again: Why this line matters more than its sizeIt documents a cost that is easy to leave out of a perf narrative. #2536's split fixes a correctness problem (per-row int8 scale garbling tokens); the honest version of that fix says what it costs, and this says it with numbers. A docs change that adds a measured downside to a feature description is worth reviewing carefully because the temptation is to not write it at all. |
Follow-up to #2552, which merged at 14:54Z before this measurement was pushed. Adds the prefill row the PR-agent review asked for: a 487-token chat prompt on Qwen2.5-3B-Instruct 1.7.1, A B A B in one npu-hold ticket (dmesg clean), two requests per server.
NPU_ACT_OUTLIER_TAU=0That is +3.0 % prefill time. The decode figures already in the section are unchanged. Docs only, no code.
🤖 Generated with Claude Code