Skip to main content

write_greedy_program

Function write_greedy_program 

Source
pub fn write_greedy_program(
    machine: &Machine,
    map: &PhysicalMap,
    compaction: &Compaction,
    set: &ColumnSet,
    weights: &mut dyn WeightSource,
    dir: &Path,
) -> Result<EngineProgram>
Expand description

write_hybrid_program with a greedy head: the head’s stream entry asks the streaming unit for each row’s arg-max of its logits rather than the logits, and the store is laid greedy (super::machine::StoreLayout::greedy), so a row’s read-back is one beat however wide the vocabulary and the store holds many rows. An error when the head’s matrix is not one the unit streams.