benches: package as kernbench.benches, add @bench registry + list subcommand
Move benches/ -> src/kernbench/benches/ and src/kernbench/cli/probe.py -> src/kernbench/probes/probe.py. Each bench self-registers via @bench(name=..., description=...); kernbench list enumerates benches with auto-assigned indices, --bench accepts kebab-case name or numeric index. Audit at package-import time fails if any non-underscore module forgets the decorator. ADR-0010 (EN + KO) updated to reflect the new resolver path, list subcommand, and probes package separation. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
+2
-2
@@ -263,7 +263,7 @@ def test_pe_cross_cube_best_worst():
|
||||
|
||||
def test_probe_timestamp_trace():
|
||||
"""_hop_timestamps must return monotonically increasing cumulative timestamps."""
|
||||
from kernbench.cli.probe import _hop_timestamps, _build_edge_map
|
||||
from kernbench.probes.probe import _hop_timestamps, _build_edge_map
|
||||
graph = _graph()
|
||||
edge_map = _build_edge_map(graph)
|
||||
resolver = AddressResolver(graph)
|
||||
@@ -341,7 +341,7 @@ def test_hbm_efficiency_applied():
|
||||
|
||||
def test_probe_sweep_saturation():
|
||||
"""Utilization at 1MB must exceed utilization at 4KB for pe-local-hbm."""
|
||||
from kernbench.cli.probe import _sweep_util
|
||||
from kernbench.probes.probe import _sweep_util
|
||||
# pe-local-hbm: ovhd=2ns (router), wire~0.03ns, bn from topology
|
||||
bn = _hbm_effective_bw()
|
||||
u = _sweep_util(2.0, 0.03, bn)
|
||||
|
||||
Reference in New Issue
Block a user