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
+11 -13
View File
@@ -356,7 +356,7 @@ def _instantiate_cube(
) -> None:
"""Add all cube-internal nodes and edges, including PE instances.
Topology: explicit router mesh from cube_mesh.yaml (ADR-0019).
Topology: explicit router mesh from cube_mesh.yaml (ADR-0017 D1).
Each router is a separate SimPy node. Components attach to routers
based on cube_mesh.yaml attachment lists.
"""
@@ -367,10 +367,10 @@ def _instantiate_cube(
clinks = cube["links"]
mm = cube["memory_map"]
# ── Mode branch (ADR-0019) ──
# ── Mode branch (ADR-0017 D8) ──
mode = mm.get("hbm_mapping_mode", "n_to_one")
if mode == "one_to_one":
raise NotImplementedError("1:1 mode: ADR-0019 D3")
raise NotImplementedError("1:1 mode: ADR-0017 D8")
# ── UCIe ports + connection nodes ──
ucie_cfg = cube["ucie"]
@@ -404,11 +404,10 @@ def _instantiate_cube(
label=name.upper().replace("_", " "),
)
# ── Per-PE HBM controller (ADR-0019 D1/D4) ──
# ── Per-PE HBM controller (ADR-0017 D4) ──
# Each PE owns one slice of the cube's HBM. The slice has its own
# set of pseudo-channels and is reachable ONLY through that PE's
# attaching router (see cube_mesh.yaml ``peX.hbm`` attach lists).
# Restored after the ADR-0019 over-consolidation in commit 5917b34.
hbm_spec = cube["components"]["hbm_ctrl"]
hbm_lx, hbm_ly = local_pos["hbm_ctrl"]
_hbm_total_bw = float(cube["links"].get("hbm_to_router_bw_gbs", 256.0))
@@ -425,7 +424,7 @@ def _instantiate_cube(
label=f"HBM CTRL pe{pe_idx}",
)
# ── Router mesh from cube_mesh.yaml (ADR-0019 D3) ──
# ── Router mesh from cube_mesh.yaml (ADR-0017 D1) ──
routers = mesh_data["routers"]
router_spec = cube["components"]["noc_router"]
router_bw = clinks.get("router_link_bw_gbs", 256.0)
@@ -573,7 +572,7 @@ def _instantiate_cube(
))
elif item.endswith(".hbm"):
# peX.hbm: router rXcY owns the entry to hbm_ctrl.peX.
# (ADR-0019 D1/D4 — per-PE HBM partitioning.)
# (ADR-0017 D4 — per-PE HBM partitioning.)
pe_prefix = item.rsplit(".", 1)[0]
pe_idx = int(pe_prefix.replace("pe", ""))
pe_hbm_id = f"{cp}.hbm_ctrl.pe{pe_idx}"
@@ -645,13 +644,12 @@ def _instantiate_cube(
))
# NOTE: HBM↔router edges are created in the per-router attach loop
# above (peX.hbm items map router → hbm_ctrl.peX). Removed the
# legacy "all routers → single hbm_ctrl" loop that bypassed the
# ADR-0019 D4 per-PE partition.
# above (peX.hbm items map router → hbm_ctrl.peX). See ADR-0017 D4
# for the per-PE partition contract.
def _add_pe_internal_edges(edges: list[Edge], pp: str, pe_links: dict) -> None:
"""Add PE-internal edges for a single PE instance (ADR-0021)."""
"""Add PE-internal edges for a single PE instance (ADR-0014 D8)."""
edges.append(Edge(
src=f"{pp}.pe_cpu", dst=f"{pp}.pe_scheduler",
distance_mm=pe_links["pe_cpu_to_scheduler_mm"],
@@ -685,7 +683,7 @@ def _add_pe_internal_edges(edges: list[Edge], pp: str, pe_links: dict) -> None:
kind="pe_internal",
))
# Fetch/Store → TCM (ADR-0021 D5)
# Fetch/Store → TCM (ADR-0014 D5)
if "fetch_store_to_tcm_mm" in pe_links:
edges.append(Edge(
src=f"{pp}.pe_fetch_store", dst=f"{pp}.pe_tcm",
@@ -694,7 +692,7 @@ def _add_pe_internal_edges(edges: list[Edge], pp: str, pe_links: dict) -> None:
kind="pe_internal",
))
# Chaining edges (ADR-0021 D4 — token self-routing)
# Chaining edges (ADR-0014 D6 — token self-routing)
chaining = [
("pe_dma", "pe_fetch_store", "dma_to_fetch_store_mm"),
("pe_fetch_store", "pe_gemm", "fetch_store_to_gemm_mm"),