Currently, the innerParallel and non innerParallel strategies use two different ways to fix for where the extra loop is inserted and where the extra dimension for the intermediate result is inserted - innerParallel adds the extra (parallel) loop right after the pre-existing reduction loop, whereas non innerParallel adds the reduction loop in the successor to the index supplied by control, and the parallel loop in the index supplied by the control. The semantics of the index supplied by the control is supposed to only control where the extra tensor dimension is inserted in the intermediate tensor. Conflating this index with where the reduction (and parallel) loops are inserted leads to more complex (and confusing) logic overall. This differential removes conflating the two uses of the index, and keeps the reduction and parallel loops in the same vicinity and uses the supplied index to only determine the position of the extra tensor dimension. It also simplifies the code by merging the two strategies in a lot more places.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
vmurali retitled this revision from [mlir] Simplifying the SplitReduction logic that uses the control to get the dimension where the extra parallel dimension is inserted to [mlir][linalg] Simplifying the SplitReduction logic that uses the control to get the dimension where the extra parallel dimension is inserted.Nov 4 2022, 9:23 PM
This revision is now accepted and ready to land.Nov 17 2022, 1:38 PM