pub fn emit_spatial_segment(
p: &SpatialProgram,
target: &SpatialTarget,
sections: Range<usize>,
values: &BTreeMap<TensorId, Value>,
rel_tol: f64,
flavor: SpatialFlavor,
) -> Result<String, SpatialLowerError>Expand description
A run of consecutive sections of a composed program, printed as ITS OWN app — the unit PIR can map, since PIR
writes an accelerator as one JVM class and a whole composed program is past what the JVM allows one. The app
holds the tensors the segment’s stages touch, each filled with its value at the segment’s ENTRY; runs the
sections in order; and checks every tensor they store against its value at the segment’s EXIT — exactly for an
integer tensor, within rel_tol · max|value| for a float one.
values is every tensor at the program’s end (crate::spatial::eval::eval_choreography_every_tensor). A
composed program stores each tensor in one section at most, so a tensor stored before the segment enters with
that value, and any other enters with its fill.