off_grid_tasklet
ExtractOffGridTasklet
Bases: ScheduleNodeVisitor
Gather all off-grid nodes and store them at the top of the Schedule Tree like a C style declarative process.
Dev note: this pass functions because we keep the nodes in order the entire time, keeping any dependency on each other correct.
We move tasklet if all its writes have been SSA properly.
The pass will not apply within cartesian blocks.
InlineOffGridTasklet
Bases: ScheduleNodeVisitor
Move the off-grid tasklet as-close-as possible to their first usage but outside of any grid tight loop, e.g. C++ optimization style.
Dev note: movement need to be made in reverse order so we can keep any dependency on each other tasklet correct e.g. in
B needs to be move first againstmap_i then, A in before B
OffGridTransientScalarSSA
Bases: ScheduleNodeVisitor
Transform all off-grid transient scalar through SSA without Phi functions, e.g.
becomes but when we have we do keepA throughout (this is solvable by introducing a phi function for D =tasklet(phi(A)))
which would capture the control flow above and replicate it.
Because we do not address the Phi function problem this pass will not yield a perfect SSA IR for
transient scalars. Use OffGridTransientScalarWriteCounter afterward to map results.
The pass will not apply SSA within cartesian blocks, but will keep read renaming going.