digraph ipu_stack_package_partition {
  graph [rankdir=LR, bgcolor="white", fontname="DejaVu Sans", fontsize=17,
         label="ipu_runtime — 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];
  run_entry [label="ipu_cli::main\nCommand::HostRun arm", shape=octagon, fillcolor="#d5f5e3", penwidth=1.4];
  subgraph cluster_primary { label="primary nodes"; color="#f7d8e3"; style="rounded";
    f2 [label="ipu_runtime::Runtime::host_session", shape=box, fillcolor="#f7d8e3", color="#238b45", tooltip="pub fn host_session(&self, application: &Application) -> Result<HostSession<'_>> — crates/ipu-runtime/src/lib.rs:43"];
    f1 [label="ipu_runtime::Runtime::load", shape=box, fillcolor="#f7d8e3", color="#238b45", tooltip="pub fn load( &self, application: &Application, bootloader: &[u8], final_mark: u32, ) -> Result<()> — crates/ipu-runtime/src/lib.rs:30"];
    f0 [label="ipu_runtime::Runtime::open", shape=box, fillcolor="#f7d8e3", color="#238b45", tooltip="pub fn open(device_path: &str, configuration: &[u8]) -> Result<Self> — crates/ipu-runtime/src/lib.rs:23"];
  }
  subgraph cluster_external { label="outgoing references — click to open target partition"; color="#d9d9d9"; style="rounded,dashed";
    xf6 [label="ipu_driver::Device::initialize", shape=box, fillcolor="#f5f5f5", color="#9aa5b1", style="rounded,filled,dashed", URL="ipu-driver.svg", target="_top", tooltip="open target partition"];
    xf4 [label="ipu_driver::Device::open", shape=box, fillcolor="#f5f5f5", color="#9aa5b1", style="rounded,filled,dashed", URL="ipu-driver.svg", target="_top", tooltip="open target partition"];
    xf7 [label="ipu_driver::Device::replay_configuration", shape=box, fillcolor="#f5f5f5", color="#9aa5b1", style="rounded,filled,dashed", URL="ipu-driver.svg", target="_top", tooltip="open target partition"];
    xf5 [label="ipu_driver::Device::write_config", shape=box, fillcolor="#f5f5f5", color="#9aa5b1", style="rounded,filled,dashed", URL="ipu-driver.svg", target="_top", tooltip="open target partition"];
    xf2 [label="ipu_driver::HostSession::new", shape=box, fillcolor="#f5f5f5", color="#9aa5b1", style="rounded,filled,dashed", URL="ipu-driver.svg", target="_top", tooltip="open target partition"];
    xf1 [label="ipu_driver::Loader::load", shape=box, fillcolor="#f5f5f5", color="#9aa5b1", style="rounded,filled,dashed", URL="ipu-driver.svg", target="_top", tooltip="open target partition"];
    xf0 [label="ipu_driver::Loader::new", shape=box, fillcolor="#f5f5f5", color="#9aa5b1", style="rounded,filled,dashed", URL="ipu-driver.svg", target="_top", tooltip="open target partition"];
    xf3 [label="ipu_driver::block_device_interrupt_signals", shape=box, fillcolor="#f5f5f5", color="#9aa5b1", style="rounded,filled,dashed", URL="ipu-driver.svg", target="_top", tooltip="open target partition"];
    xt2 [label="ipu_driver::Device\n«struct»", shape=ellipse, fillcolor="#f5f5f5", color="#9aa5b1", style="filled,dashed", URL="ipu-driver.svg", target="_top", tooltip="open defining partition"];
    xt1 [label="ipu_driver::HostSession\n«struct»", shape=ellipse, fillcolor="#f5f5f5", color="#9aa5b1", style="filled,dashed", URL="ipu-driver.svg", target="_top", tooltip="open defining partition"];
    xt0 [label="ipu_driver::Loader\n«struct»", shape=ellipse, fillcolor="#f5f5f5", color="#9aa5b1", style="filled,dashed", URL="ipu-driver.svg", target="_top", tooltip="open defining partition"];
    xt3 [label="ipu_package::Application\n«struct»", shape=ellipse, fillcolor="#f5f5f5", color="#9aa5b1", style="filled,dashed", URL="ipu-package.svg", target="_top", tooltip="open defining partition"];
  }
  run_entry -> f1 [color="#238b45", penwidth=1.4];
  run_entry -> f0 [color="#238b45", penwidth=1.4];
  run_entry -> f2 [color="#238b45", penwidth=1.4];
  f0 -> xf3 [color="#238b45", style="solid", tooltip="rustc MIR call edge"];
  f0 -> xf4 [color="#238b45", style="solid", tooltip="rustc MIR call edge"];
  f0 -> xf6 [color="#238b45", style="solid", tooltip="rustc MIR call edge"];
  f0 -> xf7 [color="#238b45", style="solid", tooltip="rustc MIR call edge"];
  f0 -> xt2 [style=dashed, color="#9aa5b1", arrowhead=none, constraint=false, tooltip="uses workspace type"];
  f1 -> xf0 [color="#238b45", style="solid", tooltip="rustc MIR call edge"];
  f1 -> xf1 [color="#238b45", style="solid", tooltip="rustc MIR call edge"];
  f1 -> xf5 [color="#238b45", style="solid", tooltip="rustc MIR call edge"];
  f1 -> xt0 [style=dashed, color="#9aa5b1", arrowhead=none, constraint=false, tooltip="uses workspace type"];
  f1 -> xt3 [style=dashed, color="#9aa5b1", arrowhead=none, constraint=false, tooltip="uses workspace type"];
  f2 -> xf2 [color="#238b45", style="solid", tooltip="rustc MIR call edge"];
  f2 -> xt1 [style=dashed, color="#9aa5b1", arrowhead=none, constraint=false, tooltip="uses workspace type"];
  f2 -> 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"];
}
