Add web topology viewer with hot path visualization
- FastAPI backend (server.py) with REST API + WebSocket for event streaming - SVG-based topology viewer (index.html) with SIP/CUBE/PE drill-down views - Event logging infrastructure (event_log.py) generating events from real probe cases (H2D/D2H/PE-DMA) and bench workloads (QKV GEMM single/multi-PE) - Timeline replay engine with play/pause, speed control, and scrubbing - Workload selector dropdown grouped by category (Probe/Bench) - CLI entry points: kernbench web, ./kernbench wrapper scripts Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -28,6 +28,11 @@ def build_parser() -> argparse.ArgumentParser:
|
||||
probep.add_argument("--case", default="all", help="Case name or 'all' (default: all)")
|
||||
probep.set_defaults(_handler=cmd_probe)
|
||||
|
||||
webp = sub.add_parser("web", help="Launch topology viewer in browser")
|
||||
webp.add_argument("--port", type=int, default=8765, help="HTTP port (default: 8765)")
|
||||
webp.add_argument("--no-open", action="store_true", help="Don't auto-open browser")
|
||||
webp.set_defaults(_handler=cmd_web)
|
||||
|
||||
return p
|
||||
|
||||
|
||||
@@ -36,6 +41,12 @@ def engine_factory(topology: object, device: DeviceSelector) -> SimEngine:
|
||||
return GraphEngine(topo_obj)
|
||||
|
||||
|
||||
def cmd_web(args) -> int:
|
||||
from kernbench.web.server import serve
|
||||
serve(port=args.port, open_browser=not args.no_open)
|
||||
return 0
|
||||
|
||||
|
||||
def cmd_run(args) -> int:
|
||||
print("> Running benchmark with:", args)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user