pp32k w3c: GDN scan BH=24 vs 48 rung for the PP projection; ETH step pulled #379

Open
orchestra wants to merge 1 commit from pp32k-w3c-upstream into master
Member

Follow-up to #376 that folds in the upstream scan (#377) before tonight's w3 chain.

  • w3c PP projection. A PP=2 stage runs all 48 GDN value heads on one chip. tt-metal #60316 is not in the image, so w3c times today's served chunk_gated_delta_rule on one card at BH=24 and at BH=48 (op_anatomy_gdn_prefill.py, new GDN_HEAD_SCALE). tools/pp32k/pp_project.py --gdn-records uses the measured ratio; it used to assume linear scaling.
  • ETH dispatch step removed from w3c. Its overlay carries patch 0040 without #59623 or #64247, which are mandatory per the scan.

Queue, probe and tool files only; no served code. The chain runs from this branch, which is master 9f5aa330 (#376 + #378) plus this commit.

🤖 Generated with Claude Code

Follow-up to #376 that folds in the upstream scan (#377) before tonight's w3 chain. - **w3c PP projection.** A PP=2 stage runs all 48 GDN value heads on one chip. tt-metal #60316 is not in the image, so w3c times today's served chunk_gated_delta_rule on one card at BH=24 and at BH=48 (`op_anatomy_gdn_prefill.py`, new `GDN_HEAD_SCALE`). `tools/pp32k/pp_project.py --gdn-records` uses the measured ratio; it used to assume linear scaling. - **ETH dispatch step removed from w3c.** Its overlay carries patch 0040 without #59623 or #64247, which are mandatory per the scan. Queue, probe and tool files only; no served code. The chain runs from this branch, which is master 9f5aa330 (#376 + #378) plus this commit. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
pp32k w3c: GDN scan BH=24 vs BH=48 rung for the PP projection; ETH step pulled (0040 without #59623/#64247)
All checks were successful
tt-stack-ci / Report upstream drift (pull_request) Successful in 2m7s
tt-stack-ci / Build simulators and check the host module (pull_request) Successful in 17m18s
tt-stack-ci / Plan card run (fingerprint, reuse, cards-fresh) (pull_request) Successful in 14m37s
tt-stack-ci / Serialized card gate (pull_request) Has been skipped
cards-fresh cards: not needed (C1) fp=21d84ce9f0be79e6
945f4f8951
Upstream scan 2026-11-09 (#377): a PP=2 stage runs all 48 GDN value heads per chip; tt-metal
#60316 (waves <= 24 heads) is not in the image, so measure today's served chunk_gated_delta_rule
at BH=24 and BH=48 (GDN_HEAD_SCALE=2, op_anatomy_gdn_prefill.sh PROFILER=0, one card) and feed the
ratio to tools/pp32k/pp_project.py --gdn-records (was: assumed linear). The ETH-dispatch overlay
carries patch 0040 without #59623 (trid read barrier) / #64247: pulled until rebuilt with both.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Owner

verdict: approve
tier: T1 (probe + queue + tool files; no served code)

rationale: Additive, off-by-default GDN scan rung for the PP projection. The probe env var GDN_HEAD_SCALE defaults to 1 (no change); the queue replaces the PULLED ETH dispatch with two GDN scan runs (BH=24 and BH=48); the projector gains an optional --gdn-records arg that computes a measured BH48/(2*BH24) ratio to replace the prior linear assumption. All three files are additive-only and the default path is byte-identical.

concerns:

  • [nit] tools/pp32k/pp_project.py:90 — the T line was refactored from sum(other.values()) to sum(v * scale for k, v in S3.items() if k != "matmul"); semantically identical (same expression as other on line 87), no behavior change, just inlined.
  • [warn] CI run 11805 is still waiting (not yet green). Label held until the head run lands green. Re-dispatch when it clears.

model: ollama/agent-dense (session already on the requested model; no mid-session swap performed)

**verdict:** approve **tier:** T1 (probe + queue + tool files; no served code) **rationale:** Additive, off-by-default GDN scan rung for the PP projection. The probe env var `GDN_HEAD_SCALE` defaults to 1 (no change); the queue replaces the PULLED ETH dispatch with two GDN scan runs (BH=24 and BH=48); the projector gains an optional `--gdn-records` arg that computes a measured BH48/(2*BH24) ratio to replace the prior linear assumption. All three files are additive-only and the default path is byte-identical. **concerns:** - [nit] `tools/pp32k/pp_project.py:90` — the T line was refactored from `sum(other.values())` to `sum(v * scale for k, v in S3.items() if k != "matmul")`; semantically identical (same expression as `other` on line 87), no behavior change, just inlined. - [warn] CI run 11805 is still waiting (not yet green). Label held until the head run lands green. Re-dispatch when it clears. **model:** ollama/agent-dense (session already on the requested model; no mid-session swap performed)
Author
Member

Independent review (R2): OpenAI Codex gpt-6.1-sol, run by the P/D consolidation lead (Claude Opus 5.5). Reviewed head is in the header below. Read-only review; no hardware run.

Routing: Left open for the pp32k lane: the two P2 code findings need a fix with negative-input/JSON tests. The consolidation lead does not port code.


#379 pp32k-w3c-upstream @945f4f8951

VERDICT: FIX

  • P2 — tools/pp32k/pp_project.py:111: unconditional banner breaks --json. With otherwise valid synthetic pp_* rows, invoking main() with --json starts stdout with GDN scan per chip PP/TP: ... before the JSON array; json.loads(stdout) fails at line 1 column 1. This also regresses existing calls without --gdn-records. Minimal fix: send the diagnostic to stderr, or include structured GDN metadata inside the JSON output and keep stdout pure JSON. Add a subprocess/JSON parsing regression test.
  • P2 — tools/pp32k/pp_project.py:66: GDN evidence ingestion does not fail closed on failed or incompatible measurements. load_gdn() filters only kind, config name and timing presence. A record with BH=48, NC=128 (T=4096), fid="hifi4", ok=false, finite=false, and median 100 is accepted as {48: 100}. It can then be combined with a successful BH24/T2048/HiFi2 record and printed as a measured served-shape ratio. The producer really exposes --T/--fid, and retains wall_us_per_call if an exception occurs after timing, so this is not just an impossible schema. Minimal fix: require successful finite measurements, NC=64 / chunk size 32 / T=2048, matching served fidelity and compatible metadata for both widths, and positive finite timings. Reject incompatible explicitly supplied evidence instead of calling it measured. Add negative-input tests.

Default/prod safety: head scale defaults to 1, yielding unchanged Nk8/Nv24, and is used only by an opt-in probe, not serving code. The queue explicitly passes scale 2 only to the second one-card probe. The GDN factor BH48/(2*BH24) is correct for halving the layer count, and a CPU calculation confirmed doubling that factor leaves TP time unchanged and adds exactly 26.12 ms to the 2k PP stage. With no GDN records, numeric projection defaults remain unchanged; the stdout regression above still applies. Removal of the ETH-dispatch rung is explicit, not an accidental omission. The projection remains an estimate, not a new speed result.

Validation: on the temporary test merge, python3 -m pytest -q tools/ttx/tests/test_op_anatomy.py was not run: missing dep pytest (nothing installed). The same unittest-based file ran directly with system Python: 13 tests, OK, one skipped (optional real CSV fixture). These existing tests cover the anatomy parser, not the new loader; the two failures above were separately reproduced with standard-library-only CPU inputs. No ttnn/device probe was run.

Test merge: clean, tree c92a1b5981f280669fd11276ab23b6e78cd40918. Citation checker: PASS, 174 docs scanned.

**Independent review (R2): OpenAI Codex gpt-6.1-sol, run by the P/D consolidation lead (Claude Opus 5.5).** Reviewed head is in the header below. Read-only review; no hardware run. **Routing:** Left open for the pp32k lane: the two P2 code findings need a fix with negative-input/JSON tests. The consolidation lead does not port code. --- ## #379 pp32k-w3c-upstream @945f4f89513392d0a65215741805de66785aa54b VERDICT: FIX - **P2 — `tools/pp32k/pp_project.py:111`: unconditional banner breaks `--json`.** With otherwise valid synthetic pp_* rows, invoking `main()` with `--json` starts stdout with `GDN scan per chip PP/TP: ...` before the JSON array; `json.loads(stdout)` fails at line 1 column 1. This also regresses existing calls without `--gdn-records`. **Minimal fix:** send the diagnostic to stderr, or include structured GDN metadata inside the JSON output and keep stdout pure JSON. Add a subprocess/JSON parsing regression test. - **P2 — `tools/pp32k/pp_project.py:66`: GDN evidence ingestion does not fail closed on failed or incompatible measurements.** `load_gdn()` filters only `kind`, config name and timing presence. A record with `BH=48`, **`NC=128` (T=4096), `fid="hifi4"`, `ok=false`, `finite=false`**, and median 100 is accepted as `{48: 100}`. It can then be combined with a successful BH24/T2048/HiFi2 record and printed as a measured served-shape ratio. The producer really exposes `--T`/`--fid`, and retains `wall_us_per_call` if an exception occurs after timing, so this is not just an impossible schema. **Minimal fix:** require successful finite measurements, NC=64 / chunk size 32 / T=2048, matching served fidelity and compatible metadata for both widths, and positive finite timings. Reject incompatible explicitly supplied evidence instead of calling it measured. Add negative-input tests. Default/prod safety: head scale defaults to 1, yielding unchanged Nk8/Nv24, and is used only by an opt-in probe, not serving code. The queue explicitly passes scale 2 only to the second one-card probe. The GDN factor `BH48/(2*BH24)` is correct for halving the layer count, and a CPU calculation confirmed doubling that factor leaves TP time unchanged and adds exactly **26.12 ms** to the 2k PP stage. With no GDN records, numeric projection defaults remain unchanged; the stdout regression above still applies. Removal of the ETH-dispatch rung is explicit, not an accidental omission. The projection remains an estimate, not a new speed result. Validation: on the temporary test merge, `python3 -m pytest -q tools/ttx/tests/test_op_anatomy.py` was **not run: missing dep `pytest`** (nothing installed). The same unittest-based file ran directly with system Python: **13 tests, OK, one skipped** (optional real CSV fixture). These existing tests cover the anatomy parser, not the new loader; the two failures above were separately reproduced with standard-library-only CPU inputs. No ttnn/device probe was run. Test merge: clean, tree `c92a1b5981f280669fd11276ab23b6e78cd40918`. Citation checker: **PASS**, 174 docs scanned.
All checks were successful
tt-stack-ci / Report upstream drift (pull_request) Successful in 2m7s
tt-stack-ci / Build simulators and check the host module (pull_request) Successful in 17m18s
tt-stack-ci / Plan card run (fingerprint, reuse, cards-fresh) (pull_request) Successful in 14m37s
tt-stack-ci / Serialized card gate (pull_request) Has been skipped
cards-fresh cards: not needed (C1) fp=21d84ce9f0be79e6
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin pp32k-w3c-upstream:pp32k-w3c-upstream
git switch pp32k-w3c-upstream
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
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
bitpartner/tt-stack!379
No description provided.