Skip to content

Commit d2fa5b5

Browse files
physicsrobclaude
andcommitted
optimization_guide: flag missing graph-stats, fix walkthrough citation
The doc's primary diagnostic (`make graph-stats`) is referenced six times throughout but the Make target was removed in Step E (it shipped with the DOOM renderer). The principles in the doc are general — they apply to any compiled graph — but the operational instructions point at deleted tooling. Two changes: - Added a top-of-doc note explaining that `make graph-stats` references describe a removed diagnostic, with a pointer to where the original implementation lives. The DOOM-anchored worked examples in the body are now flagged as illustrative — they preserve the original numbers that informed each rule of thumb. - Section § 11 'Correctness checks after structural changes' cited `make walkthrough` (removed) and 'the relevant test file under tests/doom/' (deleted directory) as the authoritative multi-position check. Replaced with `make test`, which is the actual surviving authoritative check. The body's `make graph-stats` mentions are intentionally left in place — they describe a real diagnostic concept ('per-annotation costs and layer counts'), and the top-of-doc note now scopes them as historical references rather than actionable instructions. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent b8a44cc commit d2fa5b5

1 file changed

Lines changed: 11 additions & 7 deletions

File tree

optimization_guide.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,15 @@ compiler are small and readable (`torchwright/compiler/forward/`);
66
read the source when a detail matters.
77

88
This guide is deliberately light on specific numbers — the graph and
9-
compiler evolve, and quantitative snapshots go stale. Run
10-
`make graph-stats` for current per-annotation costs, layer counts,
11-
and critical-path targets; this doc is for the concepts behind those
12-
numbers.
9+
compiler evolve, and quantitative snapshots go stale. References below
10+
to `make graph-stats` describe a per-annotation/per-stage diagnostic
11+
that was removed from this repo in Step E (it shipped together with
12+
the DOOM renderer and now lives in the sibling `torchwright_doom`
13+
repo). The principles still apply to any compiled graph; replicate
14+
the diagnostic from the verbose `compile_headless` output, or pull the
15+
original implementation from the sibling repo if you need it. The
16+
DOOM-anchored worked examples in this doc are illustrative — they
17+
preserve the original numbers that informed each rule of thumb.
1318

1419
---
1520

@@ -580,9 +585,8 @@ layers indicate a wide intermediate living too long.
580585
`torchwright/debug/probe.py` runs the compiled module side-by-side
581586
with a recursive oracle evaluator for a single position and reports
582587
the first divergence. Run it after any graph restructuring. For
583-
multi-position / autoregressive behaviour, the golden-frame test
584-
(`make walkthrough`) or the relevant test file under `tests/doom/`
585-
is the authoritative check.
588+
multi-position / autoregressive behaviour, the test suite (`make
589+
test`) is the authoritative check.
586590

587591
### Attribute layer count to a subsystem
588592

0 commit comments

Comments
 (0)