Skip to main content

compile_program_to_spatial

Function compile_program_to_spatial 

Source
pub fn compile_program_to_spatial(
    source: &str,
    target: &SpatialTarget,
) -> Result<ProgramLowering, SpatialReject>
Expand description

English → the WHOLE tensor program as sections of one spatial program.

Err only when there is no tensor program to speak of (the source does not parse, or no recognizer sees an op anywhere in it). Everything else comes back as a ProgramLowering whose counts are the truth, whether or not it carries a program.