gqa(adr): ADR-0064/0065 review fixes — composite size cap, type-aware logical_bytes, R recalibration
ADR-0064 Revision 2 review fixes: - D7 NEW: composite size cap (MAX_COMPOSITE_LOGICAL_BYTES default 1024 bytes). Oversized recipes deterministically segmented into N CompositeCmds; each segment incurs its own dispatch cost. Models real HW limits (descriptor queue entry, scheduler parser buffer, command SRAM) and prevents the model from rewarding pathologically-large fused composites. - D2: type-aware extra-field byte counting (int/float=4, bool=1, tuple/list=1+4N, str=1) — replaces uniform 4 bytes per extra. - D3: recalibrated defaults to FIXED=40 cycles, R=0.0625 cycles/byte (16 B/cycle — typical on-die descriptor queue width); anchor stays at ~43 ns for typical 1-OpSpec composite. Clarified anchor description: DMA stages do not appear in logical_bytes (auto-inserted by PE_SCHEDULER from operand.space per ADR-0065 D4). - D4: removed clock_freq_ghz from pe_cost_model: override block; conversion uses the PE node's existing clock_freq_ghz attr. Added max_composite_logical_bytes knob. - Context: emphasized command-count reduction (FIXED) as the primary signal; byte term as secondary refinement. - Open review: added large-composite scheduler-cost stress test. - Test req: added composite-size-cap (#8) and R-sensitivity sweep (#9). ADR-0065 + DDD-0065 follow-on updates: - opt2 vs opt3 dispatch ratio updated 2.4× → ≈4.0× under new defaults (FIXED-dominated, reflecting the corrected framing). - Test req #9: decode opt2 composite fits within 1024-byte cap; no segmentation needed for the GQA workload. - DDD §6: TLContext lowering checks logical_bytes against cap (step 8). - DDD §11: performance model recomputed with new defaults + sensitivity table across R ∈ {0.25, 0.0625, 0.03125} confirming opt2 < opt3 holds. - DDD §9 P6 gate: ratio band 2.4×±10% → 4.0×±15%; sensitivity sweep added. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -338,9 +338,15 @@ input from #1's epilogue scratch — circular tile-loop dependency.
|
||||
6. **opt2 numeric parity with opt3.** In data mode, opt2's final
|
||||
`(m, l, O)` matches opt3's within fp tolerance.
|
||||
7. **opt2 dispatch ratio (after ADR-0064 Rev2).** opt3 vs opt2 per-tile
|
||||
PE_CPU dispatch cycles ratio ≈ 2.4× at default calibration.
|
||||
PE_CPU dispatch cycles ratio ≈ 4.0× at default calibration
|
||||
(FIXED=40 cycles, R=0.0625 cycles/byte). Ratio is FIXED-dominated,
|
||||
reflecting command-count reduction as the primary signal.
|
||||
8. **GEMM-count invariant.** A composite with two GEMM OpSpecs raises a
|
||||
validation error at TLContext emit.
|
||||
9. **Within composite size cap (ADR-0064 D7).** Decode opt2's `#2`
|
||||
composite (10 ops, ~310 logical bytes) fits comfortably under the
|
||||
default `MAX_COMPOSITE_LOGICAL_BYTES=1024` — no segmentation. The
|
||||
recipe lowering test asserts `cmd.logical_bytes < 1024`.
|
||||
|
||||
## Dependencies
|
||||
|
||||
|
||||
Reference in New Issue
Block a user