digraph ipu_stack_package_partition {
  graph [rankdir=LR, bgcolor="white", fontname="DejaVu Sans", fontsize=17,
         label="ipu_codegen::storage — 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::storage::amp_matrix_index", shape=box, fillcolor="#d9e8fb", color="#2166ac", tooltip="fn amp_matrix_index( role: AmpOrder, precision: Precision, rows: u32, columns: u32, row: u32, column: u32, ) -> StorageResult<u32> — crates/ipu-codegen/src/storage.rs:273"];
    f11 [label="ipu_codegen::storage::amp_micro_dimension", shape=box, fillcolor="#d9e8fb", color="#2166ac", tooltip="fn amp_micro_dimension(precision: Precision) -> u32 — crates/ipu-codegen/src/storage.rs:755"];
    f6 [label="ipu_codegen::storage::block_major_matrix_index", shape=box, fillcolor="#d9e8fb", color="#2166ac", tooltip="fn block_major_matrix_index( order: BlockMajorOrder, precision: Precision, rows: u32, columns: u32, row: u32, column: u32, ) -> StorageResult<u32> — crates/ipu-codegen/src/storage.rs:344"];
    f7 [label="ipu_codegen::storage::block_major_panel_spans", shape=box, fillcolor="#d9e8fb", color="#2166ac", tooltip="fn block_major_panel_spans( shard: &LowShard, view: &ShardView, ) -> StorageResult<Option<Vec<ByteSpan>>> — crates/ipu-codegen/src/storage.rs:400"];
    f10 [label="ipu_codegen::storage::decode_row_major", shape=box, fillcolor="#d9e8fb", color="#2166ac", tooltip="fn decode_row_major(widths: &[u32], mut linear: u64, output: &mut [u32]) — crates/ipu-codegen/src/storage.rs:618"];
    f2 [label="ipu_codegen::storage::encode_row_major", shape=box, fillcolor="#d9e8fb", color="#2166ac", tooltip="fn encode_row_major(widths: &[u32], coordinates: &[u32]) -> StorageResult<u64> — crates/ipu-codegen/src/storage.rs:258"];
    f0 [label="ipu_codegen::storage::logical_view_byte_spans", shape=box, fillcolor="#d9e8fb", color="#2166ac", tooltip="/// Converts a semantic view into physical spans ordered by canonical logical /// coordinates. Zipping spans from two layouts therefore describes a layout /// conversion without materializing an intermediate packed buffer. pub fn logical_view_byte_spans(shard: &LowShard, view: &ShardView) -> StorageResult<Vec<ByteSpan>> — crates/ipu-codegen/src/storage.rs:118"];
    f1 [label="ipu_codegen::storage::physical_index", shape=box, fillcolor="#d9e8fb", color="#2166ac", tooltip="fn physical_index(shard: &LowShard, widths: &[u32], coordinates: &[u32]) -> StorageResult<u64> — crates/ipu-codegen/src/storage.rs:173"];
    f4 [label="ipu_codegen::storage::right_matrix_index", shape=box, fillcolor="#d9e8fb", color="#2166ac", tooltip="fn right_matrix_index( precision: Precision, rows: u32, columns: u32, row: u32, column: u32, ) -> StorageResult<u32> — crates/ipu-codegen/src/storage.rs:319"];
    f5 [label="ipu_codegen::storage::shard_storage_bytes", shape=box, fillcolor="#d9e8fb", color="#2166ac", tooltip="/// Returns the physical allocation size of a shard. pub fn shard_storage_bytes(shard: &LowShard) -> StorageResult<u32> — crates/ipu-codegen/src/storage.rs:31"];
    f9 [label="ipu_codegen::storage::validate_view", shape=box, fillcolor="#d9e8fb", color="#2166ac", tooltip="fn validate_view(shard: &LowShard, view: &ShardView) -> StorageResult<()> — crates/ipu-codegen/src/storage.rs:507"];
    f8 [label="ipu_codegen::storage::view_byte_spans", shape=box, fillcolor="#d9e8fb", color="#2166ac", tooltip="/// Converts a rectangular semantic view into coalesced physical byte spans. /// /// Block-major matrices and transposed AMP operands are packed independently /// for each outer matrix. AMP left and output operands flatten their outer /// axes into the row dimension, which lets one tile-kernel invocation process /// activation batches with shared weights. pub fn view_byte_spans(shard: &LowShard, view: &ShardView) -> StorageResult<Vec<ByteSpan>> — crates/ipu-codegen/src/storage.rs:46"];
    t2 [label="ipu_codegen::storage::ByteSpan\n«struct»", shape=ellipse, style="filled,dashed", fillcolor="#d9e8fb", color="#7b8794", tooltip="crates/ipu-codegen/src/storage.rs:8"];
    t0 [label="ipu_codegen::storage::StorageError\n«enum»", shape=ellipse, style="filled,dashed", fillcolor="#d9e8fb", color="#7b8794", tooltip="crates/ipu-codegen/src/storage.rs:15"];
    t1 [label="ipu_codegen::storage::StorageResult\n«type»", shape=ellipse, style="filled,dashed", fillcolor="#d9e8fb", color="#7b8794", tooltip="crates/ipu-codegen/src/storage.rs:29"];
  }
  subgraph cluster_external { label="outgoing references — click to open target partition"; color="#d9d9d9"; style="rounded,dashed";
    xf0 [label="ipu_codegen::layout::TensorRegion::deref", shape=box, fillcolor="#f5f5f5", color="#9aa5b1", style="rounded,filled,dashed", URL="ipu-codegen-layout.svg", target="_top", tooltip="open target partition"];
    xf1 [label="ipu_codegen::operator::Precision::bytes", shape=box, fillcolor="#f5f5f5", color="#9aa5b1", style="rounded,filled,dashed", URL="ipu-codegen-operator.svg", target="_top", tooltip="open target partition"];
    xt3 [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"];
    xt1 [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"];
    xt2 [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"];
    xt0 [label="ipu_codegen::layout::TensorAxis\n«enum»", shape=ellipse, fillcolor="#f5f5f5", color="#9aa5b1", style="filled,dashed", URL="ipu-codegen-layout.svg", target="_top", tooltip="open defining partition"];
    xt4 [label="ipu_codegen::low::LowShard\n«struct»", shape=ellipse, fillcolor="#f5f5f5", color="#9aa5b1", style="filled,dashed", URL="ipu-codegen-low-part-2.svg", target="_top", tooltip="open defining partition"];
    xt5 [label="ipu_codegen::low::ShardView\n«struct»", shape=ellipse, fillcolor="#f5f5f5", color="#9aa5b1", style="filled,dashed", URL="ipu-codegen-low-part-2.svg", target="_top", tooltip="open defining partition"];
    xt6 [label="ipu_codegen::operator::Precision\n«enum»", shape=ellipse, fillcolor="#f5f5f5", color="#9aa5b1", style="filled,dashed", URL="ipu-codegen-operator.svg", target="_top", tooltip="open defining partition"];
  }
  f0 -> xf0 [color="#2166ac", style="solid", tooltip="rustc MIR call edge"];
  f0 -> xf1 [color="#2166ac", style="solid", tooltip="rustc MIR call edge"];
  f0 -> f1 [color="#2166ac", style="solid", tooltip="rustc MIR call edge"];
  f0 -> f9 [color="#2166ac", style="solid", tooltip="rustc MIR call edge"];
  f0 -> f10 [color="#2166ac", style="solid", tooltip="rustc MIR call edge"];
  f0 -> xt4 [style=dashed, color="#9aa5b1", arrowhead=none, constraint=false, tooltip="uses workspace type"];
  f0 -> xt5 [style=dashed, color="#9aa5b1", arrowhead=none, constraint=false, tooltip="uses workspace type"];
  f0 -> t0 [style=dashed, color="#9aa5b1", arrowhead=none, constraint=false, tooltip="uses workspace type"];
  f0 -> t1 [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"];
  f1 -> f2 [color="#2166ac", style="solid", tooltip="rustc MIR call edge"];
  f1 -> f3 [color="#2166ac", style="solid", tooltip="rustc MIR call edge"];
  f1 -> f4 [color="#2166ac", style="solid", tooltip="rustc MIR call edge"];
  f1 -> f6 [color="#2166ac", style="solid", tooltip="rustc MIR call edge"];
  f1 -> xt2 [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"];
  f1 -> xt4 [style=dashed, color="#9aa5b1", arrowhead=none, constraint=false, tooltip="uses workspace type"];
  f1 -> t0 [style=dashed, color="#9aa5b1", arrowhead=none, constraint=false, tooltip="uses workspace type"];
  f1 -> t1 [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"];
  f2 -> t1 [style=dashed, color="#9aa5b1", arrowhead=none, constraint=false, tooltip="uses workspace type"];
  f3 -> f4 [color="#2166ac", style="solid", tooltip="rustc MIR call edge"];
  f3 -> f11 [color="#2166ac", style="solid", tooltip="rustc MIR call edge"];
  f3 -> xt3 [style=dashed, color="#9aa5b1", arrowhead=none, constraint=false, tooltip="uses workspace type"];
  f3 -> xt6 [style=dashed, color="#9aa5b1", arrowhead=none, constraint=false, tooltip="uses workspace type"];
  f3 -> t0 [style=dashed, color="#9aa5b1", arrowhead=none, constraint=false, tooltip="uses workspace type"];
  f3 -> t1 [style=dashed, color="#9aa5b1", arrowhead=none, constraint=false, tooltip="uses workspace type"];
  f4 -> f11 [color="#2166ac", style="solid", tooltip="rustc MIR call edge"];
  f4 -> xt6 [style=dashed, color="#9aa5b1", arrowhead=none, constraint=false, tooltip="uses workspace type"];
  f4 -> t0 [style=dashed, color="#9aa5b1", arrowhead=none, constraint=false, tooltip="uses workspace type"];
  f4 -> t1 [style=dashed, color="#9aa5b1", arrowhead=none, constraint=false, tooltip="uses workspace type"];
  f5 -> xf0 [color="#2166ac", style="solid", tooltip="rustc MIR call edge"];
  f5 -> xf1 [color="#2166ac", style="solid", tooltip="rustc MIR call edge"];
  f5 -> xt4 [style=dashed, color="#9aa5b1", arrowhead=none, constraint=false, tooltip="uses workspace type"];
  f5 -> t0 [style=dashed, color="#9aa5b1", arrowhead=none, constraint=false, tooltip="uses workspace type"];
  f5 -> t1 [style=dashed, color="#9aa5b1", arrowhead=none, constraint=false, tooltip="uses workspace type"];
  f6 -> f11 [color="#2166ac", style="solid", tooltip="rustc MIR call edge"];
  f6 -> xt1 [style=dashed, color="#9aa5b1", arrowhead=none, constraint=false, tooltip="uses workspace type"];
  f6 -> xt6 [style=dashed, color="#9aa5b1", arrowhead=none, constraint=false, tooltip="uses workspace type"];
  f6 -> t0 [style=dashed, color="#9aa5b1", arrowhead=none, constraint=false, tooltip="uses workspace type"];
  f6 -> t1 [style=dashed, color="#9aa5b1", arrowhead=none, constraint=false, tooltip="uses workspace type"];
  f7 -> xf0 [color="#2166ac", style="solid", tooltip="rustc MIR call edge"];
  f7 -> xf1 [color="#2166ac", style="solid", tooltip="rustc MIR call edge"];
  f7 -> xt0 [style=dashed, color="#9aa5b1", arrowhead=none, constraint=false, tooltip="uses workspace type"];
  f7 -> xt1 [style=dashed, color="#9aa5b1", arrowhead=none, constraint=false, tooltip="uses workspace type"];
  f7 -> xt2 [style=dashed, color="#9aa5b1", arrowhead=none, constraint=false, tooltip="uses workspace type"];
  f7 -> xt4 [style=dashed, color="#9aa5b1", arrowhead=none, constraint=false, tooltip="uses workspace type"];
  f7 -> xt5 [style=dashed, color="#9aa5b1", arrowhead=none, constraint=false, tooltip="uses workspace type"];
  f7 -> t0 [style=dashed, color="#9aa5b1", arrowhead=none, constraint=false, tooltip="uses workspace type"];
  f7 -> t1 [style=dashed, color="#9aa5b1", arrowhead=none, constraint=false, tooltip="uses workspace type"];
  f7 -> t2 [style=dashed, color="#9aa5b1", arrowhead=none, constraint=false, tooltip="uses workspace type"];
  f8 -> xf0 [color="#2166ac", style="solid", tooltip="rustc MIR call edge"];
  f8 -> xf1 [color="#2166ac", style="solid", tooltip="rustc MIR call edge"];
  f8 -> f1 [color="#2166ac", style="solid", tooltip="rustc MIR call edge"];
  f8 -> f5 [color="#2166ac", style="solid", tooltip="rustc MIR call edge"];
  f8 -> f7 [color="#2166ac", style="solid", tooltip="rustc MIR call edge"];
  f8 -> f9 [color="#2166ac", style="solid", tooltip="rustc MIR call edge"];
  f8 -> f10 [color="#2166ac", style="solid", tooltip="rustc MIR call edge"];
  f8 -> xt4 [style=dashed, color="#9aa5b1", arrowhead=none, constraint=false, tooltip="uses workspace type"];
  f8 -> xt5 [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"];
  f8 -> t1 [style=dashed, color="#9aa5b1", arrowhead=none, constraint=false, tooltip="uses workspace type"];
  f8 -> t2 [style=dashed, color="#9aa5b1", arrowhead=none, constraint=false, tooltip="uses workspace type"];
  f9 -> xf0 [color="#2166ac", style="solid", tooltip="rustc MIR call edge"];
  f9 -> xt4 [style=dashed, color="#9aa5b1", arrowhead=none, constraint=false, tooltip="uses workspace type"];
  f9 -> xt5 [style=dashed, color="#9aa5b1", arrowhead=none, constraint=false, tooltip="uses workspace type"];
  f9 -> t0 [style=dashed, color="#9aa5b1", arrowhead=none, constraint=false, tooltip="uses workspace type"];
  f9 -> t1 [style=dashed, color="#9aa5b1", arrowhead=none, constraint=false, tooltip="uses workspace type"];
  f11 -> xt6 [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"];
}
