pub struct Skip {
pub select_branches: bool,
pub masked_scatters: bool,
pub scalarize: bool,
pub passthrough: bool,
pub fusion: bool,
pub views: bool,
pub in_place: bool,
}Expand description
Passes of optimize that can be skipped (ablation). Skipping a pass
keeps the values of the function; only the generated code changes.
Fields§
§select_branches: boolThe conversion of selects on a scalar predicate into conditionals.
masked_scatters: boolThe rewriting of scatter chains into masked selects.
scalarize: boolThe splitting of small arrays into scalars.
passthrough: boolThe hoisting of outputs that every branch passes through unchanged.
fusion: boolThe emitter’s fusion of elementwise operations into their consumers (every elementwise result is then built as an array).
views: boolThe emitter’s views: data movement read from its sources instead of built, and windows that are references instead of copies.
in_place: boolThe emitter’s in-place updates: arrays updated in place when nothing reads them afterwards, and outputs computed directly into the state (every update then copies its array).
Implementations§
Source§impl Skip
impl Skip
Sourcepub fn parse(list: &str) -> Self
pub fn parse(list: &str) -> Self
Parses a comma-separated list of selects, scatters, scalars,
passthrough, all (these four passes), fusion, views and
inplace (unknown names are ignored).
§Examples
use ruxla_codegen::opt::Skip;
let s = Skip::parse("selects, scalars");
assert!(s.select_branches && s.scalarize && !s.masked_scatters);