Hoist a batch input only where the compiler proves it cannot vary per lane

This commit is contained in:
Dennis Kobert
2026-08-25 20:09:12 +00:00
parent 95bbeb6634
commit d452ac0de1
8 changed files with 145 additions and 40 deletions

View File

@@ -300,6 +300,10 @@ pub struct RecordLayout {
pub layout: Layout,
pub frame_bytes: usize,
pub plan: Vec<(usize, usize, usize)>,
/// Inputs whose value cannot change with the innermost index, as a bitmask
/// over input positions. Empty is the safe default: an uninstalled layout
/// rebinds every input per lane.
pub lane_invariant: u32,
}
/// its registry entry so the compiler can fold each wire's layout without
@@ -400,7 +404,12 @@ impl LayoutMeta {
}
_ => Vec::new(),
};
RecordLayout { layout, frame_bytes, plan }
RecordLayout {
layout,
frame_bytes,
plan,
lane_invariant: 0,
}
}
}

View File

@@ -273,6 +273,7 @@ mod tests {
frame_bytes: layout.frame_bytes(),
plan: Vec::new(),
layout: layout.clone(),
lane_invariant: u32::MAX,
});
RecordExtract::new(graph, &layout)
}