Rename impl names: add builtin. prefix for clear provenance

- components.yaml: all builtin impls use builtin.xxx naming
- topology.yaml: all impl references updated to builtin.xxx
- builder.py: hardcoded ucie impl → builtin.ucie
- Tests: all impl string references updated

Convention: builtin.<name> for built-in, custom.<name> for user-defined.
382 tests passing.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-09 00:16:24 -07:00
parent 1d95df4bee
commit 81ce55571d
7 changed files with 87 additions and 82 deletions
+13 -13
View File
@@ -65,15 +65,15 @@ def _hbm_pa(sip: int = 0, cube: int = 0, pe_id: int = 0) -> int:
def test_pe_registry_resolves_all():
"""All 6 PE component impl strings must resolve to their specific classes."""
expected = {
"pe_cpu_v1": PeCpuComponent,
"pe_scheduler_v1": PeSchedulerComponent,
"pe_dma_v1": PeDmaComponent,
"pe_gemm_v1": PeGemmComponent,
"pe_math_v1": PeMathComponent,
"pe_tcm_v1": PeTcmComponent,
"builtin.pe_cpu": PeCpuComponent,
"builtin.pe_scheduler": PeSchedulerComponent,
"builtin.pe_dma": PeDmaComponent,
"builtin.pe_gemm": PeGemmComponent,
"builtin.pe_math": PeMathComponent,
"builtin.pe_tcm": PeTcmComponent,
}
for impl, cls in expected.items():
node = Node(id=f"test.{impl}", kind=impl.replace("_v1", ""),
node = Node(id=f"test.{impl}", kind=impl.replace("", ""),
impl=impl, pos_mm=None, attrs={})
comp = ComponentRegistry.create(node)
assert isinstance(comp, cls), f"{impl} resolved to {type(comp)}, expected {cls}"
@@ -90,7 +90,7 @@ def test_pe_dma_dual_channel_concurrent():
"""
env = simpy.Environment()
node = Node(id="sip0.cube0.pe0.pe_dma", kind="pe_dma",
impl="pe_dma_v1", pos_mm=None,
impl="builtin.pe_dma", pos_mm=None,
attrs={"rd_engines": 1, "wr_engines": 1})
comp = PeDmaComponent(node)
@@ -151,7 +151,7 @@ def test_pe_dma_same_channel_serializes():
"""Two READ operations on the same PE_DMA must serialize (capacity=1)."""
env = simpy.Environment()
node = Node(id="sip0.cube0.pe0.pe_dma", kind="pe_dma",
impl="pe_dma_v1", pos_mm=None,
impl="builtin.pe_dma", pos_mm=None,
attrs={"rd_engines": 1, "wr_engines": 1})
comp = PeDmaComponent(node)
@@ -219,11 +219,11 @@ def test_pe_accel_shared_slot():
pe_prefix = "sip0.cube0.pe0"
gemm_node = Node(
id=f"{pe_prefix}.pe_gemm", kind="pe_gemm", impl="pe_gemm_v1",
id=f"{pe_prefix}.pe_gemm", kind="pe_gemm", impl="builtin.pe_gemm",
pos_mm=None, attrs={"overhead_ns": 10.0, "shared_resource": "accel_slot"},
)
math_node = Node(
id=f"{pe_prefix}.pe_math", kind="pe_math", impl="pe_math_v1",
id=f"{pe_prefix}.pe_math", kind="pe_math", impl="builtin.pe_math",
pos_mm=None, attrs={"overhead_ns": 10.0, "shared_resource": "accel_slot"},
)
gemm = PeGemmComponent(gemm_node, ctx)
@@ -302,7 +302,7 @@ def test_pe_gemm_handles_pe_internal_txn():
pe_prefix = "sip0.cube0.pe0"
gemm_node = Node(
id=f"{pe_prefix}.pe_gemm", kind="pe_gemm", impl="pe_gemm_v1",
id=f"{pe_prefix}.pe_gemm", kind="pe_gemm", impl="builtin.pe_gemm",
pos_mm=None, attrs={"overhead_ns": 5.0, "shared_resource": "accel_slot"},
)
gemm = PeGemmComponent(gemm_node, ctx)
@@ -343,7 +343,7 @@ def test_pe_math_handles_pe_internal_txn():
pe_prefix = "sip0.cube0.pe0"
math_node = Node(
id=f"{pe_prefix}.pe_math", kind="pe_math", impl="pe_math_v1",
id=f"{pe_prefix}.pe_math", kind="pe_math", impl="builtin.pe_math",
pos_mm=None, attrs={"overhead_ns": 3.0, "shared_resource": "accel_slot"},
)
math_comp = PeMathComponent(math_node, ctx)