digraph ipu_stack_package_partition {
  graph [rankdir=LR, bgcolor="white", fontname="DejaVu Sans", fontsize=17,
         label="ipu_codegen::cost — package build/run detail", labelloc=t, labeljust=l, pad=0.2, nodesep=0.3, ranksep=0.75, newrank=true, overlap=false, splines=polyline, outputorder=edgesfirst];
  node [fontname="DejaVu Sans", fontsize=9, style="rounded,filled", color="#52606d", penwidth=0.8];
  edge [fontname="DejaVu Sans", fontsize=7, color="#52606d", arrowsize=0.55, penwidth=0.8];
  subgraph cluster_primary { label="primary nodes"; color="#d9e8fb"; style="rounded";
    f0 [label="ipu_codegen::cost::CostEstimate::exchange_row_bytes", shape=box, fillcolor="#d9e8fb", color="#2166ac", tooltip="pub const fn exchange_row_bytes(self) -> u64 — crates/ipu-codegen/src/cost.rs:168"];
    f2 [label="ipu_codegen::cost::CostEstimate::repeated", shape=box, fillcolor="#d9e8fb", color="#2166ac", tooltip="pub const fn repeated(self, count: u32) -> Self — crates/ipu-codegen/src/cost.rs:193"];
    f1 [label="ipu_codegen::cost::CostEstimate::sequence", shape=box, fillcolor="#d9e8fb", color="#2166ac", tooltip="pub const fn sequence(self, next: Self) -> Self — crates/ipu-codegen/src/cost.rs:171"];
    f3 [label="ipu_codegen::cost::ExchangeFootprint::estimated_row_bytes", shape=box, fillcolor="#d9e8fb", color="#2166ac", tooltip="pub const fn estimated_row_bytes(self) -> u64 — crates/ipu-codegen/src/cost.rs:233"];
    f4 [label="ipu_codegen::cost::MemoizedCostModel::new", shape=box, fillcolor="#d9e8fb", color="#2166ac", tooltip="pub(crate) fn new(inner: &'a C, spatial_capacity: u16) -> Self — crates/ipu-codegen/src/cost.rs:263"];
    f5 [label="ipu_codegen::cost::row_major_pack_cycles", shape=box, fillcolor="#d9e8fb", color="#2166ac", tooltip="pub(crate) fn row_major_pack_cycles(tensor: &TensorType, elements: u64) -> u64 — crates/ipu-codegen/src/cost.rs:569"];
    t0 [label="ipu_codegen::cost::CostEstimate\n«struct»", shape=ellipse, style="filled,dashed", fillcolor="#d9e8fb", color="#7b8794", tooltip="crates/ipu-codegen/src/cost.rs:155"];
    t2 [label="ipu_codegen::cost::CostModel\n«trait»", shape=ellipse, style="filled,dashed", fillcolor="#d9e8fb", color="#7b8794", tooltip="crates/ipu-codegen/src/cost.rs:22"];
    t1 [label="ipu_codegen::cost::ExchangeFootprint\n«struct»", shape=ellipse, style="filled,dashed", fillcolor="#d9e8fb", color="#7b8794", tooltip="crates/ipu-codegen/src/cost.rs:162"];
    t4 [label="ipu_codegen::cost::Ipu21CostModel\n«struct»", shape=ellipse, style="filled,dashed", fillcolor="#d9e8fb", color="#7b8794", tooltip="crates/ipu-codegen/src/cost.rs:385"];
    t3 [label="ipu_codegen::cost::MemoizedCostModel\n«struct»", shape=ellipse, style="filled,dashed", fillcolor="#d9e8fb", color="#7b8794", tooltip="crates/ipu-codegen/src/cost.rs:252"];
  }
  subgraph cluster_external { label="outgoing references — click to open target partition"; color="#d9d9d9"; style="rounded,dashed";
    xt2 [label="ipu_codegen::layout::AmpOrder\n«enum»", shape=ellipse, fillcolor="#f5f5f5", color="#9aa5b1", style="filled,dashed", URL="ipu-codegen-layout.svg", target="_top", tooltip="open defining partition"];
    xt0 [label="ipu_codegen::layout::BlockMajorOrder\n«enum»", shape=ellipse, fillcolor="#f5f5f5", color="#9aa5b1", style="filled,dashed", URL="ipu-codegen-layout.svg", target="_top", tooltip="open defining partition"];
    xt1 [label="ipu_codegen::layout::ElementOrder\n«enum»", shape=ellipse, fillcolor="#f5f5f5", color="#9aa5b1", style="filled,dashed", URL="ipu-codegen-layout.svg", target="_top", tooltip="open defining partition"];
    xt3 [label="ipu_codegen::layout::TensorType\n«struct»", shape=ellipse, fillcolor="#f5f5f5", color="#9aa5b1", style="filled,dashed", URL="ipu-codegen-layout.svg", target="_top", tooltip="open defining partition"];
  }
  f0 -> f3 [color="#2166ac", style="solid", tooltip="rustc MIR call edge"];
  f1 -> t1 [style=dashed, color="#9aa5b1", arrowhead=none, constraint=false, tooltip="uses workspace type"];
  f2 -> t1 [style=dashed, color="#9aa5b1", arrowhead=none, constraint=false, tooltip="uses workspace type"];
  f5 -> xt0 [style=dashed, color="#9aa5b1", arrowhead=none, constraint=false, tooltip="uses workspace type"];
  f5 -> xt1 [style=dashed, color="#9aa5b1", arrowhead=none, constraint=false, tooltip="uses workspace type"];
  f5 -> xt2 [style=dashed, color="#9aa5b1", arrowhead=none, constraint=false, tooltip="uses workspace type"];
  f5 -> xt3 [style=dashed, color="#9aa5b1", arrowhead=none, constraint=false, tooltip="uses workspace type"];
  legend [shape=note, style="filled", fillcolor="#ffffff", color="#9aa5b1", fontsize=8,
          label="Solid: MIR-resolved call   Dotted: source fallback\nDashed, no arrow: uses type   Dashed node: link to another partition\nBlue: build   Green: run   Purple: shared"];
}
