Skip to content

docs(hybrid): NPU and GPU run at the same time, measured — no hazard, ~13 % stream cost (engine#612 item 5) - #673

Merged
bong-water-water-bong merged 4 commits into
mainfrom
i612-fclk-docs
Oct 31, 2026
Merged

bong-water-water-bong merged 4 commits into
mainfrom
i612-fclk-docs

Conversation

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator

Closes item 5 of engine#612: the FCLK hazard question — can the NPU and the GPU run at the same time? —
answered by measurement, in the doc the route that needs it reads. Docs only, one file, no code and no
gpu-hold change.

What the section says

  • The hazard does not reproduce. 40 reps of the arena GU oracle (the b8 pre-blocked-B leader
    rebuilt from source each rep, byte-exact int32 on seeds 1–3 plus a median of 5 launches) in four
    cells — GPU idle/busy × FCLK auto/held at the top — 5 reps per cell over two independent passes,
    with HRX llama-bench pp512/tg128 looping through the busy cells (34–52 bench rows per cell) and
    FCLK level / Tctl / GPU busy% sampled at 1 Hz throughout.
GPU FCLK ms/launch, median of 5 (two passes) GB/s (two passes) byte-exact resets
idle auto 10.52 / 10.79 8.47 / 8.26 10/10 0
idle held 10.76 / 10.92 8.29 / 8.16 10/10 0
busy auto 12.04 / 12.04 7.40 / 7.40 10/10 0
busy held 10.85 / 12.01 8.22 / 7.42 10/10 0

160 byte-exact checks, all PASS, zero amdgpu GPU reset/MODE2/timeout lines, with the fabric
clock demonstrably changing level during NPU runs in the auto cells (18 one-second samples at level 7
against 50 at level 6 in one busy cell).

  • Versions the verdict is for: kernel 7.3.0-rc4-1bit-perfopt+, SMU firmware 0x0a640700
    (100.7.0), DMUB 0x09003F00, device 0x1586 (Radeon 8060S), BIOS 1.09 (2026-05-08).
  • The number to plan hybrid around: a GPU-busy NPU stream keeps ~87 % of its bandwidth —
    7.40 GB/s against 8.2–8.5 idle, 10.5–10.9 ms → 12.0 ms per launch, and 7.40 to two decimals in both
    passes. Budget the provider ~13 % below its solo figure while the decoder is working.
  • The retraction is in the doc, not just here. One pass had the FCLK hold removing that penalty
    (10.85 ms held vs 12.04 auto); the second had no difference (12.01 vs 12.04). It is inside the
    run-to-run spread, so holding the fabric clock is a preference, not a safety or bandwidth fix.
  • The fleet rule that follows (the orchestrator changed it on this evidence): NPU runs take the NPU
    device lock and nothing else, and arena scoring carries a "GPU busy" column instead of demanding an
    idle box.

Caveats stated in the section: pp512 is weight-streaming, not a decode loop or a render; each cell is
a couple of minutes of NPU time rather than a soak; one kernel/firmware pair. A long concurrent run
with a real prefill provider remains the last unmeasured thing on this route — and nothing needs to
serialise NPU behind GPU while waiting for it.

Runs: ~/lb/612-fclk-20261030T2249* (pass 1) and ~/lb/612-fclk-20261031T0012* (pass 2, inside the
granted NPU window); harness ~/lb/612-fclk-cell.sh + ~/lb/612-fclk-matrix.sh.

Refs #612, #656 (the disjoint-array-half follow-up, which is about throughput, not correctness).

…, ~13 % stream cost (engine#612 item 5)

The whole fleet serialised NPU work behind the GPU queue because of a
third-party report that concurrent GPU+NPU work can hang the box or corrupt
NPU results while the GPU fabric clock changes level. Measured on strixhalo, it
does not reproduce: 40 reps of the arena GU oracle (byte-exact int32 on seeds
1-3 plus a median of 5 launches) in four cells -- GPU idle/busy x FCLK
auto/held -- over two passes, with an HRX llama-bench pp512 loop running
throughout the busy cells and FCLK/Tctl sampled at 1 Hz.

160 byte-exact checks all PASS, zero amdgpu reset/MODE2/timeout lines, with the
clock changing level during the NPU runs in the auto cells. Kernel
7.3.0-rc4-1bit-perfopt+, SMU 0x0a640700 (100.7.0), DMUB 0x09003F00, device
0x1586, BIOS 1.09.

Two numbers to carry: a GPU-busy NPU stream keeps ~87 % of its bandwidth (7.40
GB/s against 8.2-8.5 idle, 10.5-10.9 -> 12.0 ms per launch, 7.40 to two
decimals in both passes) -- that is what the hybrid route has to plan for; and
holding FCLK at the top does not buy it back, retracting the claim one of the
two passes suggested. The doc states the fleet rule that follows: NPU runs take
the NPU device lock only, and arena scoring carries a GPU-busy column.

Refs #612.

@bong-water-water-bong bong-water-water-bong left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VERDICT: READY (posted as a comment: GitHub refuses --request-changes/--approve on a PR owned by the same account). Every number in the added section is in ~/briefs/TISSUES-612-STATE.md's pass-2 tables, and the FCLK-hold claim is presented as retracted, not as a result. Two nits at the end.

Numbers, doc ↔ state file (pass 1 / pass 2), all exact:

doc row state file (p1 / p2)
idle auto 10.52 / 10.79, 8.47 / 8.26 10.52 / 10.79, 8.47 / 8.26 (lines 634-635, 630-631)
idle held 10.76 / 10.92, 8.29 / 8.16 10.76 / 10.92, 8.29 / 8.16
busy auto 12.04 / 12.04, 7.40 / 7.40 12.04 / 12.04, 7.40 / 7.40
busy held 10.85 / 12.01, 8.22 / 7.42 10.85 / 12.01, 8.22 / 7.42 (the pass-1/pass-2 pair that motivates the retraction)

Also checked: 160 byte-exact checks = 4 per rep x 40 reps (the state file defines 4 per rep: seeds 1-3 plus the timed run, line 547), and each cell shows 5/5 PASS; 0 resets/MODE2; the FCLK sampling sentence ("18 one-second samples at level 7 against 50 at level 6 in one busy cell") is exactly the state file's 6/1850 x50, 7/2000 x18 for busy-auto p2; the hardware pair 7.3.0-rc4-1bit-perfopt+ / SMU 0x0a640700 (100.7.0) / DMUB 0x09003F00 / device 0x1586 / BIOS 1.09 (2026-05-08) matches the state file character for character.

"34-52 bench rows per busy cell" re-derived from the artifacts, since it is the one figure that quantifies "the GPU ran throughout": the bench logs under ~/lb/612-fclk-20261030T2249… and …20261031T0012… give 26 pp512 + 26 tg128 = 52 rows in each pass-1 busy cell (22:51:09–22:52:52) and 17 + 17 = 34 in each pass-2 busy cell (00:13:16–00:14:24), i.e. the doc's range is right for "bench rows" and the span covers each cell. (The state file's "52 pp512 rows" is the sloppier phrasing — 52 is the two tests together. Worth fixing there if it is ever quoted again.)

The retracted claim is not presented as a result. The dirty line is stated and then withdrawn in the same breath: "One pass had the hold removing the penalty (10.85 ms held against 12.04 auto); the second had no difference at all (12.01 against 12.04). The effect is inside the run-to-run spread", plus "not a safety fix and not a reliable bandwidth fix; it is a preference". The table does not cherry-pick either — it shows the busy/held pass-2 value 12.01, the one that kills the effect, next to the flattering 10.85. The paragraph that survives is the contention cost (~87 % of idle bandwidth, 7.40 to two decimals in both passes), which is what the state file's own verdict paragraph says (~11-14 %).

The fleet-policy sentence is not ahead of the ops doc. The section says NPU runs now take only the NPU device lock; ~/amd-oss/GPU-TOKEN.md:62 already reads "It does not serialise NPU work: that is ~/npu.lock, a flock, not this file", so the doc and the fleet rule agree.

Caveats are honest: the vendor report is "neither confirmed nor denied" for other firmware, the GPU load was weight-streaming pp512 rather than a decode loop or a render, each cell is a couple of minutes rather than a soak, and a long run with the real provider is called out as the last unmeasured thing.

Two nits:

  1. Cite the run directories, as the rest of this file does for its measured rows: the eight cells are on this box at ~/lb/612-fclk-20261030T2249* (pass 1) and ~/lb/612-fclk-20261031T0012* (pass 2) — four each.
  2. "8.2-8.5 GB/s idle" quietly rounds away 8.16 from the idle-held pass-2 cell; "8.2-8.5" is fine for the budget sentence, but if anyone re-derives the 13 % from the table they will use 8.16 and get 15 %. Saying "8.2-8.5 (one cell 8.16)" removes the surprise.

CodeQL on this head is SUCCESS (as are build and the four Analyze jobs); pr_agent red is the expected coder-llm-off noise, hw_gate skipped by design for a docs-only change.

@bong-water-water-bong bong-water-water-bong left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VERDICT: READY — stands at this head (7ae6892c3), unchanged since my review posted here. Nothing further from me; merge on CodeQL, as the orchestrator planned. (Confirming as a separate comment only because the merge gate is now my verdict on the current head, and the earlier one sits further up the thread.)

@bong-water-water-bong bong-water-water-bong added the tprs-ready TPRS: review verdict READY posted by the standing reviewer; merge gate satisfied label Oct 31, 2026

@bong-water-water-bong bong-water-water-bong left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VERDICT: READY — at head 7ae6892c3, the current head. Labelled tprs-ready so the gate has a queryable state, since a review of mine can only ever be COMMENTED on our own PRs (GitHub refuses --approve from the author). The review body from 00:51Z (re-confirmed 01:23Z) carries the evidence; this line exists so the gate does not have to parse that thread.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tprs-ready TPRS: review verdict READY posted by the standing reviewer; merge gate satisfied

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant