b6eb97c49a
Step 1-2: Backup existing code - builtin/ → builtin_legacy/ (unchanged backup) - custom/pe_accel/ → custom/pe_accel_legacy/ (unchanged backup) Step 3-4: New pipeline types and tiling - pe_types.py: StageType, Stage, TilePlan, PipelinePlan, PipelineContext, TileToken - tiling.py: generate_gemm_plan, generate_math_plan (ported from pe_accel) Step 5: Component implementations (ADR-0021 D4-D6) - PE_SCHEDULER: _feed_loop (singleton FIFO feeder) + plan generation - PE_FETCH_STORE: new component — TCM ↔ Register File - PE_GEMM: TileToken pipeline + legacy PeInternalTxn dual-mode - PE_MATH: TileToken pipeline + legacy dual-mode - PE_DMA: TileToken pipeline + legacy + fabric Transaction triple-mode - PE_TCM: TcmRequest handler with dual-channel BW serialization Step 6: Infrastructure - topology.yaml: pe_fetch_store component + chaining edges - components.yaml: pe_fetch_store_v1 registration - builder.py: PE_COMP_OFFSETS, _add_pe_internal_edges, PE view positions - Tests: node/edge counts, PE component sets updated All components handle both TileToken (pipeline) and PeInternalTxn (legacy). Token self-routing: components read next stage from token.plan, chain via out_port. 366 tests passing. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
52 lines
2.6 KiB
YAML
52 lines
2.6 KiB
YAML
# Component implementation registry.
|
|
# Maps impl names (used in topology.yaml) to Python class paths.
|
|
# Format: impl_name: module.path:ClassName
|
|
#
|
|
# ── Adding custom components ──────────────────────────────────────────
|
|
#
|
|
# 1. Create your implementation in:
|
|
# src/kernbench/components/custom/<your_component>.py
|
|
#
|
|
# Your class must inherit from ComponentBase (or PeEngineBase for PE engines).
|
|
#
|
|
# 2. Register it below under "Custom" with a unique impl name:
|
|
# my_pe_cpu_v2: kernbench.components.custom.my_pe_cpu:MyPeCpuComponent
|
|
#
|
|
# 3. Reference it in topology.yaml:
|
|
# pe_cpu: { kind: pe_cpu, impl: my_pe_cpu_v2, attrs: { ... } }
|
|
#
|
|
# 4. Add unit tests in:
|
|
# tests/custom/test_<your_component>.py
|
|
#
|
|
# External packages also work — use the full module path:
|
|
# fast_gemm_v1: my_team.accel.fast_gemm:FastGemmComponent
|
|
# ──────────────────────────────────────────────────────────────────────
|
|
|
|
components:
|
|
# Infrastructure
|
|
forwarding_v1: kernbench.components.builtin.forwarding:TransitComponent
|
|
switch_v1: kernbench.components.builtin.forwarding:TransitComponent
|
|
noc_v1: kernbench.components.builtin.forwarding:TransitComponent
|
|
ucie_v1: kernbench.components.builtin.forwarding:TransitComponent
|
|
# IO / Host interface
|
|
pcie_ep_v1: kernbench.components.builtin.pcie_ep:PcieEpComponent
|
|
io_cpu_v1: kernbench.components.builtin.io_cpu:IoCpuComponent
|
|
|
|
# Cube-level
|
|
m_cpu_v1: kernbench.components.builtin.m_cpu:MCpuComponent
|
|
hbm_ctrl_v1: kernbench.components.builtin.hbm_ctrl:HbmCtrlComponent
|
|
sram_v1: kernbench.components.builtin.sram:SramComponent
|
|
|
|
# PE-level
|
|
pe_cpu_v1: kernbench.components.builtin.pe_cpu:PeCpuComponent
|
|
pe_scheduler_v1: kernbench.components.builtin.pe_scheduler:PeSchedulerComponent
|
|
pe_dma_v1: kernbench.components.builtin.pe_dma:PeDmaComponent
|
|
pe_gemm_v1: kernbench.components.builtin.pe_gemm:PeGemmComponent
|
|
pe_math_v1: kernbench.components.builtin.pe_math:PeMathComponent
|
|
pe_fetch_store_v1: kernbench.components.builtin.pe_fetch_store:PeFetchStoreComponent
|
|
pe_mmu_v1: kernbench.components.builtin.pe_mmu:PeMmuComponent
|
|
pe_tcm_v1: kernbench.components.builtin.pe_tcm:PeTcmComponent
|
|
|
|
# Custom — add your implementations here
|
|
pe_scheduler_v2: kernbench.components.custom.pe_accel.scheduler:SchedulerV2Component
|