digraph ipu_stack_package_partition {
  graph [rankdir=LR, bgcolor="white", fontname="DejaVu Sans", fontsize=17,
         label="ipu_codegen::memory — 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::memory::TileMemoryMap::allocate", shape=box, fillcolor="#d9e8fb", color="#2166ac", tooltip="pub(crate) fn allocate( &mut self, request: MemoryRequest, ) -> Result<MemoryAllocation, MemoryLayoutError> — crates/ipu-codegen/src/memory.rs:118"];
    f1 [label="ipu_codegen::memory::TileMemoryMap::free_ranges", shape=box, fillcolor="#d9e8fb", color="#2166ac", tooltip="pub(crate) fn free_ranges(&self, bounds: AddressRegion) -> Vec<AddressRegion> — crates/ipu-codegen/src/memory.rs:164"];
    f4 [label="ipu_codegen::memory::TileMemoryMap::new", shape=box, fillcolor="#d9e8fb", color="#2166ac", tooltip="pub(crate) fn new() -> Self — crates/ipu-codegen/src/memory.rs:71"];
    f2 [label="ipu_codegen::memory::TileMemoryMap::next_free", shape=box, fillcolor="#d9e8fb", color="#2166ac", tooltip="pub(crate) fn next_free( &self, start: u32, bounds: AddressRegion, alignment: u32, name: &'static str, ) -> Result<u32, MemoryLayoutError> — crates/ipu-codegen/src/memory.rs:175"];
    f5 [label="ipu_codegen::memory::TileMemoryMap::reserve", shape=box, fillcolor="#d9e8fb", color="#2166ac", tooltip="pub(crate) fn reserve( &mut self, name: &'static str, range: AddressRegion, ) -> Result<MemoryAllocation, MemoryLayoutError> — crates/ipu-codegen/src/memory.rs:82"];
    f3 [label="ipu_codegen::memory::align_up", shape=box, fillcolor="#d9e8fb", color="#2166ac", tooltip="fn align_up(value: u32, alignment: u32, name: &'static str) -> Result<u32, MemoryLayoutError> — crates/ipu-codegen/src/memory.rs:195"];
    t0 [label="ipu_codegen::memory::MemoryAllocation\n«struct»", shape=ellipse, style="filled,dashed", fillcolor="#d9e8fb", color="#7b8794", tooltip="crates/ipu-codegen/src/memory.rs:32"];
    t3 [label="ipu_codegen::memory::MemoryLayoutError\n«enum»", shape=ellipse, style="filled,dashed", fillcolor="#d9e8fb", color="#7b8794", tooltip="crates/ipu-codegen/src/memory.rs:57"];
    t2 [label="ipu_codegen::memory::MemoryRequest\n«struct»", shape=ellipse, style="filled,dashed", fillcolor="#d9e8fb", color="#7b8794", tooltip="crates/ipu-codegen/src/memory.rs:45"];
    t1 [label="ipu_codegen::memory::TileMemoryMap\n«struct»", shape=ellipse, style="filled,dashed", fillcolor="#d9e8fb", color="#7b8794", tooltip="crates/ipu-codegen/src/memory.rs:39"];
  }
  subgraph cluster_external { label="outgoing references — click to open target partition"; color="#d9d9d9"; style="rounded,dashed";
    xf0 [label="ipu_codegen::host::collect", shape=box, fillcolor="#f5f5f5", color="#9aa5b1", style="rounded,filled,dashed", URL="ipu-codegen-host.svg", target="_top", tooltip="open target partition"];
    xf1 [label="ipu_package::AddressRegion::new", shape=box, fillcolor="#f5f5f5", color="#9aa5b1", style="rounded,filled,dashed", URL="ipu-package.svg", target="_top", tooltip="open target partition"];
    xt0 [label="ipu_package::AddressRegion\n«struct»", shape=ellipse, fillcolor="#f5f5f5", color="#9aa5b1", style="filled,dashed", URL="ipu-package.svg", target="_top", tooltip="open defining partition"];
  }
  f0 -> f3 [color="#2166ac", style="dotted", tooltip="source fallback (conservative)"];
  f0 -> f5 [color="#2166ac", style="dotted", tooltip="source fallback (conservative)"];
  f0 -> xf1 [color="#2166ac", style="dotted", tooltip="source fallback (conservative)"];
  f0 -> t0 [style=dashed, color="#9aa5b1", arrowhead=none, constraint=false, tooltip="uses workspace type"];
  f0 -> t2 [style=dashed, color="#9aa5b1", arrowhead=none, constraint=false, tooltip="uses workspace type"];
  f0 -> t3 [style=dashed, color="#9aa5b1", arrowhead=none, constraint=false, tooltip="uses workspace type"];
  f0 -> xt0 [style=dashed, color="#9aa5b1", arrowhead=none, constraint=false, tooltip="uses workspace type"];
  f1 -> xf1 [color="#2166ac", style="solid", tooltip="rustc MIR call edge"];
  f1 -> xt0 [style=dashed, color="#9aa5b1", arrowhead=none, constraint=false, tooltip="uses workspace type"];
  f2 -> f1 [color="#2166ac", style="solid", tooltip="rustc MIR call edge"];
  f2 -> f3 [color="#2166ac", style="solid", tooltip="rustc MIR call edge"];
  f2 -> t3 [style=dashed, color="#9aa5b1", arrowhead=none, constraint=false, tooltip="uses workspace type"];
  f2 -> xt0 [style=dashed, color="#9aa5b1", arrowhead=none, constraint=false, tooltip="uses workspace type"];
  f3 -> t3 [style=dashed, color="#9aa5b1", arrowhead=none, constraint=false, tooltip="uses workspace type"];
  f4 -> xf0 [color="#2166ac", style="dotted", tooltip="source fallback (conservative)"];
  f4 -> xf1 [color="#2166ac", style="dotted", tooltip="source fallback (conservative)"];
  f4 -> xt0 [style=dashed, color="#9aa5b1", arrowhead=none, constraint=false, tooltip="uses workspace type"];
  f5 -> xf1 [color="#2166ac", style="solid", tooltip="rustc MIR call edge"];
  f5 -> t0 [style=dashed, color="#9aa5b1", arrowhead=none, constraint=false, tooltip="uses workspace type"];
  f5 -> t3 [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"];
  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"];
}
