Index
LogicFuseMerger
¶
Bases: LoopOrderedForm, LogicLoader
Pass a program in LoopOrderedForm to ctx, after merging its sibling Fuse nodes, as merge_sibling_fuses does, wherever the merged program is still in LoopOrderedForm, whose Fuse nodes may only run statements together when running them for each value of the field in turn means the same.
Source code in src/finch/autoschedule/fuse_merger/fuse_merger.py
merge_fuses(first, second)
¶
A Fuse which runs the bodies of first and second, in order, for each value of the field of first, which renames the field of second, or None if their fields read different tensors or positions, or the field of first already occurs in second.
Source code in src/finch/autoschedule/fuse_merger/fuse_merger.py
merge_sibling_fuses(prgm, legal)
¶
Merge Fuse nodes of the same Plan of prgm, which have the same enclosing Fuse nodes and whose fields read the same tensors in the same positions, one pair at a time, as long as legal accepts the merged program, until no pair merges. A merge runs the bodies of both for each value of one field, so a single pass over the tensors they read serves both. The pair needn't be adjacent, as sibling_merges moves the statements between them.