diff --git a/docs/diagrams/cube_view.svg b/docs/diagrams/cube_view.svg index 15c6b9f..605bf3b 100644 --- a/docs/diagrams/cube_view.svg +++ b/docs/diagrams/cube_view.svg @@ -241,62 +241,62 @@ 256GB/s 256GB/s - - UCIe-W - - c0 - - - c1 - - - c2 - - - c3 - - - UCIe-N - - c0 - - - c1 - - - c2 - - - c3 - - - UCIe-E - - c0 - - - c1 - - - c2 - - - c3 - - - UCIe-S - - c0 - - - c1 - - - c2 - - - c3 - + + UCIe-W + + c0 + + + c1 + + + c2 + + + c3 + + + UCIe-N + + c0 + + + c1 + + + c2 + + + c3 + + + UCIe-E + + c0 + + + c1 + + + c2 + + + c3 + + + UCIe-S + + c0 + + + c1 + + + c2 + + + c3 + PE Router diff --git a/src/kernbench/topology/visualizer.py b/src/kernbench/topology/visualizer.py index 8d21ff0..622c3fa 100644 --- a/src/kernbench/topology/visualizer.py +++ b/src/kernbench/topology/visualizer.py @@ -724,13 +724,15 @@ def _render_cube_view_svg(view: ViewGraph, spec: dict) -> str: ) # ── UCIe port components (position/size from topology.yaml) ── - # ucie_mm.size = 2.0mm, positions from _cube_local_positions + # ucie_mm.size = 2.0mm, positions at cube edges (flush) ucie_size_mm = cube.get("geometry", {}).get("ucie_mm", {}).get("size", 2.0) + uh_half = ucie_size_mm * 0.3 # half-height for edge placement + uw_half = ucie_size_mm * 0.5 ucie_positions = { - "N": (cube_w / 2, ucie_size_mm / 2), # top center - "S": (cube_w / 2, cube_h - ucie_size_mm / 2), # bottom center - "W": (ucie_size_mm / 2, cube_h / 2), # left center - "E": (cube_w - ucie_size_mm / 2, cube_h / 2), # right center + "N": (cube_w / 2, uh_half), # flush top edge + "S": (cube_w / 2, cube_h - uh_half), # flush bottom edge + "W": (uh_half, cube_h / 2), # flush left edge + "E": (cube_w - uh_half, cube_h / 2), # flush right edge } # Collect UCIe connections per direction