This is an archive of the discontinued LLVM Phabricator instance.

[mlir][linalg] Changing the positions of introduced parallel loop in SplitReduction
ClosedPublic

Authored by vmurali on Nov 29 2022, 6:21 PM.

Details

Summary

An ideal SplitReduction interface will contain two controls instead of a single insertSplitDimension control: one for specifying the position of the inserted parallel dimension in the tensor, and one for specifying the position of the inserted parallel loop among the loops in linalg. Unfortunately, SplitReduction currently has only one control and we use it to infer information pertaining to both the controls. This differential fixes the implementation to explicitly use two controls, while the interface still has only one control for both.

Performance-wise, it is desirable to have two two variations of SplitReduction (innerParallel, and non-innerParallel) use different heuristics for the position where loop dimensions are inserted: for innerParallel it has to be right after the reduce loop and for non-innerParallel, it has to be the place where the tensor dimension for the intermediate tensor is introduced. (Loop order was changed previously in https://reviews.llvm.org/D137478).

Diff Detail

Event Timeline

vmurali created this revision.Nov 29 2022, 6:21 PM
vmurali requested review of this revision.Nov 29 2022, 6:21 PM
vmurali updated this revision to Diff 478791.Nov 29 2022, 7:52 PM
vmurali edited the summary of this revision. (Show Details)
ThomasRaoux accepted this revision.Nov 29 2022, 7:55 PM
This revision is now accepted and ready to land.Nov 29 2022, 7:55 PM
This revision was landed with ongoing or failed builds.Nov 29 2022, 8:07 PM
This revision was automatically updated to reflect the committed changes.
vmurali edited the summary of this revision. (Show Details)Nov 29 2022, 9:29 PM
vmurali retitled this revision from [mlir][linalg] Changing the positions of introduced parallel loop in SplitReduction to be consistent with IREE's downstream passes to [mlir][linalg] Changing the positions of introduced parallel loop in SplitReduction.
vmurali edited the summary of this revision. (Show Details)Nov 30 2022, 11:24 AM
vmurali edited the summary of this revision. (Show Details)Nov 30 2022, 11:24 AM
vmurali edited the summary of this revision. (Show Details)
vmurali edited the summary of this revision. (Show Details)