digraph ipu_stack_package_partition {
  graph [rankdir=LR, bgcolor="white", fontname="DejaVu Sans", fontsize=17,
         label="ipu_codegen::metrics — 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";
    f3 [label="ipu_codegen::metrics::MemoryEstimate::peaks", shape=box, fillcolor="#d9e8fb", color="#2166ac", tooltip="pub(crate) fn peaks(self, exchange_rows: u64) -> MemoryPeaks — crates/ipu-codegen/src/metrics.rs:151"];
    f0 [label="ipu_codegen::metrics::MemoryPeaks::aligned_interleaved_bytes", shape=box, fillcolor="#d9e8fb", color="#2166ac", tooltip="fn aligned_interleaved_bytes(self, constraints: HardwareMemoryConstraints) -> u64 — crates/ipu-codegen/src/metrics.rs:104"];
    f2 [label="ipu_codegen::metrics::MemoryPeaks::conservative_tensor_usage", shape=box, fillcolor="#d9e8fb", color="#2166ac", tooltip="pub(crate) fn conservative_tensor_usage(self) -> MemoryUsage — crates/ipu-codegen/src/metrics.rs:129"];
    f9 [label="ipu_codegen::metrics::MemoryPeaks::fits_with_budget", shape=box, fillcolor="#d9e8fb", color="#2166ac", tooltip="pub fn fits_with_budget( self, constraints: HardwareMemoryConstraints, reserved_standard_bytes: u64, tile_memory_budget_bytes: u64, ) -> bool — crates/ipu-codegen/src/metrics.rs:87"];
    f8 [label="ipu_codegen::metrics::MemoryPeaks::observe", shape=box, fillcolor="#d9e8fb", color="#2166ac", tooltip="pub(crate) fn observe( &mut self, usage: MemoryUsage, maximum_standard_allocation: u64, constraints: HardwareMemoryConstraints, ) — crates/ipu-codegen/src/metrics.rs:59"];
    f1 [label="ipu_codegen::metrics::MemoryPeaks::standard_contiguous_overflow_with_reservation", shape=box, fillcolor="#d9e8fb", color="#2166ac", tooltip="pub fn standard_contiguous_overflow_with_reservation( self, constraints: HardwareMemoryConstraints, reserved_standard_bytes: u64, ) -> u64 — crates/ipu-codegen/src/metrics.rs:110"];
    f6 [label="ipu_codegen::metrics::MemoryUsage::add_class", shape=box, fillcolor="#d9e8fb", color="#2166ac", tooltip="pub(crate) fn add_class(&mut self, class: MemoryClass, bytes: u64) — crates/ipu-codegen/src/metrics.rs:20"];
    f7 [label="ipu_codegen::metrics::MemoryUsage::saturating_add", shape=box, fillcolor="#d9e8fb", color="#2166ac", tooltip="pub(crate) fn saturating_add(self, other: Self) -> Self — crates/ipu-codegen/src/metrics.rs:28"];
    f4 [label="ipu_codegen::metrics::MemoryUsage::total", shape=box, fillcolor="#d9e8fb", color="#2166ac", tooltip="pub const fn total(self) -> u64 — crates/ipu-codegen/src/metrics.rs:17"];
    f5 [label="ipu_codegen::metrics::PlanMetrics::dominates", shape=box, fillcolor="#d9e8fb", color="#2166ac", tooltip="pub(crate) fn dominates(self, other: Self) -> bool — crates/ipu-codegen/src/metrics.rs:184"];
    t1 [label="ipu_codegen::metrics::MemoryEstimate\n«struct»", shape=ellipse, style="filled,dashed", fillcolor="#d9e8fb", color="#7b8794", tooltip="crates/ipu-codegen/src/metrics.rs:141"];
    t4 [label="ipu_codegen::metrics::MemoryPeaks\n«struct»", shape=ellipse, style="filled,dashed", fillcolor="#d9e8fb", color="#7b8794", tooltip="crates/ipu-codegen/src/metrics.rs:46"];
    t0 [label="ipu_codegen::metrics::MemoryUsage\n«struct»", shape=ellipse, style="filled,dashed", fillcolor="#d9e8fb", color="#7b8794", tooltip="crates/ipu-codegen/src/metrics.rs:11"];
    t2 [label="ipu_codegen::metrics::OperationMetrics\n«type»", shape=ellipse, style="filled,dashed", fillcolor="#d9e8fb", color="#7b8794", tooltip="crates/ipu-codegen/src/metrics.rs:168"];
    t3 [label="ipu_codegen::metrics::RegionMetrics\n«type»", shape=ellipse, style="filled,dashed", fillcolor="#d9e8fb", color="#7b8794", tooltip="crates/ipu-codegen/src/metrics.rs:170"];
  }
  subgraph cluster_external { label="outgoing references — click to open target partition"; color="#d9d9d9"; style="rounded,dashed";
    xt0 [label="ipu_codegen::config::HardwareMemoryConstraints\n«struct»", shape=ellipse, fillcolor="#f5f5f5", color="#9aa5b1", style="filled,dashed", URL="ipu-codegen-config.svg", target="_top", tooltip="open defining partition"];
    xt1 [label="ipu_codegen::layout::MemoryClass\n«enum»", shape=ellipse, fillcolor="#f5f5f5", color="#9aa5b1", style="filled,dashed", URL="ipu-codegen-layout.svg", target="_top", tooltip="open defining partition"];
  }
  f0 -> xt0 [style=dashed, color="#9aa5b1", arrowhead=none, constraint=false, tooltip="uses workspace type"];
  f1 -> xt0 [style=dashed, color="#9aa5b1", arrowhead=none, constraint=false, tooltip="uses workspace type"];
  f2 -> t0 [style=dashed, color="#9aa5b1", arrowhead=none, constraint=false, tooltip="uses workspace type"];
  f3 -> f4 [color="#2166ac", style="solid", tooltip="rustc MIR call edge"];
  f3 -> t4 [style=dashed, color="#9aa5b1", arrowhead=none, constraint=false, tooltip="uses workspace type"];
  f6 -> xt1 [style=dashed, color="#9aa5b1", arrowhead=none, constraint=false, tooltip="uses workspace type"];
  f8 -> f4 [color="#2166ac", style="solid", tooltip="rustc MIR call edge"];
  f8 -> xt0 [style=dashed, color="#9aa5b1", arrowhead=none, constraint=false, tooltip="uses workspace type"];
  f8 -> t0 [style=dashed, color="#9aa5b1", arrowhead=none, constraint=false, tooltip="uses workspace type"];
  f9 -> f0 [color="#2166ac", style="solid", tooltip="rustc MIR call edge"];
  f9 -> f1 [color="#2166ac", style="solid", tooltip="rustc MIR call edge"];
  f9 -> xt0 [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"];
}
