ADR housekeeping: category prefixes, lifecycle folders, retroactive 0034-0037

Filename + lifecycle:
- ADR rename to ADR-NNNN-<cat>-title.md with 8 3-letter category prefixes
  (dev / mem / lat / prog / algo / par / api / ver). Numbers stay immutable.
- ADR Lifecycle split into 3 folders, documented in CLAUDE.md Part 2:
  docs/adr/ (Accepted), docs/adr-proposed/ (Proposed/Stub/Draft),
  docs/adr-history/ (Superseded/Merged). Status field gains "Draft" for
  retroactive docs pending verification.

Merges (one ADR per topic, no change-history annotations):
- ADR-0017 absorbs ADR-0019 (Cube NOC + per-PE HBM connectivity, 10 D-items)
- ADR-0014 absorbs ADR-0021 (PE pipeline execution model, 8 D-items incl.
  TileToken self-routing and multi-op composite epilogue scope)
- ADR-0023 absorbs docs/ipcq-dma-codesign-hw.md as new "HW Realization
  Notes (Informative)" section (D16-D23 + Open HW Questions). codesign-hw.md
  deleted; ADR-0019/0021 moved to adr-history with one-line stub status

Retroactive documentation (G4 closures, code-verified):
- ADR-0037 forwarding component (TransitComponent: first-flit overhead,
  serial worker, path-based routing, single impl/multiple names)
- ADR-0036 IO_CPU component (target_start_ns global barrier stamping,
  per-cube fan-out, response aggregation)
- ADR-0035 M_CPU & M_CPU.DMA component (3 fan-out paths, DMA Resources,
  target_start_ns passthrough)
- ADR-0034 HBM controller internal design (per-PC state, address-based
  selection, flit-aware per-flit commit, async finalize, command-only
  fallback path)

Content updates:
- ADR-0010 expanded to full CLI surface (run/probe/web), retitled
  "Command Line Interface and Execution Semantics"
- ADR-0007 D2 rewritten to current state; ADR-0015 supersession notes pruned
- ADR-0005 wrapped in Decision header with D1-D5; ADR-0022 metadata
  block replaced with standard Status header
- ADR-0024 trimmed to rank=SIP launcher essentials (D1-D4);
  ADR-0027 cleaned of supersession history
- ADR-0033 D6 cleanup: address-based PC selection moved out of future-work
  (now documented in ADR-0034 D3); related D1/D3 wording realigned
- Cross-references back-filled in 5 ADRs (G3 gaps closed)

Onboarding docs split:
- docs/onboarding/ created
- moved: hw-architecture-overview.md, latency-model.md, di-presentation.md,
  ccl-author-guide{,.en}.md
- references updated in README, ADR-0023{,.en}, src/kernbench/ccl/__init__.py

Source / test / yaml: ADR-NNNN cross-references in docstrings and YAML
comments updated after the merges (ADR-0021->0014 D6, ADR-0019->0017 D8).
No behavior change.

Tooling:
- tools/verify_adr_lang_pairs.py + tests/test_verify_adr_lang_pairs.py
  (ADR EN/KO pair invariant checker)
- .claude/commands/report.md tracked (/report slash command)
- .gitignore: allow .claude/commands/*.md while keeping settings files ignored

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-20 01:15:55 -07:00
parent 22fd0d2b9d
commit 687c98086d
97 changed files with 3286 additions and 3766 deletions
+9 -16
View File
@@ -1,18 +1,13 @@
"""Tests for ADR-0019 D1/D4 per-PE HBM partitioning.
"""Tests for ADR-0017 D4/D7 per-PE HBM partitioning.
Restores the architectural property that was lost in commit 5917b34
(2026-04-04 "Replace xbar/bridge/single-NOC with explicit router mesh"),
which over-consolidated 8 per-slice HBM CTRL nodes into one cube-wide
HBM CTRL connected to every router. ADR-0019 D1/D4 specifies:
ADR-0017 D4/D7 specifies:
- Each PE owns 8 of the cube's 64 pseudo-channels (PE_X → PCs 8X..8X+7).
- HBM CTRL is split per-PE: ``hbm_ctrl.pe{X}`` is reachable ONLY through
PE_X's attaching router. Accessing PE_Y's slice from PE_X requires
mesh routing to r_Y_attach before entering hbm_ctrl.pe{Y}.
These tests are written BEFORE the production change and are expected
to FAIL on current code (HBM CTRL is a single ``hbm_ctrl`` node attached
to all routers). Phase 2 must make them PASS without weakening
These tests enforce that property without weakening
assertions.
"""
from __future__ import annotations
@@ -66,16 +61,16 @@ def test_topology_has_8_hbm_ctrl_per_cube():
for pe in range(8):
nid = f"sip0.cube0.hbm_ctrl.pe{pe}"
assert nid in graph.nodes, (
f"Expected per-PE HBM CTRL node {nid!r} (ADR-0019 D1)"
f"Expected per-PE HBM CTRL node {nid!r} (ADR-0017 D4)"
)
node = graph.nodes[nid]
assert int(node.attrs.get("num_pcs", 0)) == 8, (
f"{nid} must have num_pcs=8; got {node.attrs.get('num_pcs')}"
)
# Legacy single hbm_ctrl must not exist
# Cube-wide single hbm_ctrl must not exist
assert "sip0.cube0.hbm_ctrl" not in graph.nodes, (
"Legacy single sip0.cube0.hbm_ctrl must be removed in favor of "
"per-PE hbm_ctrl.pe{X} (ADR-0019 D1)"
"Cube-wide single sip0.cube0.hbm_ctrl must not exist; only "
"per-PE hbm_ctrl.pe{X} (ADR-0017 D4)"
)
@@ -199,10 +194,8 @@ def test_probe_cli_intra_cube_cases_are_monotonic():
"""Probe CLI cases must show monotonic latency:
pe-local-hbm < pe-same-half-hbm < pe-cross-half-hbm.
Prior to per-PE partitioning these three return identical latency
because all roads lead to the same hbm_ctrl. With ADR-0019 D4
restored, same-half (pe0→pe1) is 1 mesh hop further than local,
and cross-half (pe0→pe4) is several hops further.
Per ADR-0017 D7, same-half (pe0→pe1) is 1 mesh hop further than
local, and cross-half (pe0→pe4) is several hops further.
"""
graph = _graph()
spec = graph.spec