Skip to main content

emit_spatial_program

Function emit_spatial_program 

Source
pub fn emit_spatial_program(
    p: &SpatialProgram,
    target: &SpatialTarget,
    gold: Option<&str>,
) -> Result<String, SpatialLowerError>
Expand description

Emit the Spatial regression app (@spatial class Logos_<name> extends SpatialTest) for a verified spatial program: every tensor a DRAM[T] filled from its recorded fill, every buffer an SRAM[T]/FIFO[T], every stage one controller, and the host checking the output tensor’s checksum against gold — the VM’s answer when the caller has it (Show checksum of the output), the spatial oracle’s (eval_choreography) otherwise. target is the descriptor the program was compiled for (its name is recorded in the header). The harness’s PASS: true (Logos_<name>) line is what the toolchain ledger parses.