Skip to content

Commit

Permalink
Run preprocessing before elementwise fusion
Browse files Browse the repository at this point in the history
Signed-off-by: Ian Wood <ianwood2024@u.northwestern.edu>
  • Loading branch information
IanWood1 committed Oct 28, 2024
1 parent 9731fed commit e6df5a2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions compiler/src/iree/compiler/DispatchCreation/Passes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ void addDispatchRegionCreationPreprocessingPasses(OpPassManager &passManager) {
// 1. Do some simple elementwise op fusion. This could be skipped,
// but could reduce the surface area of ops to handle later.
FunctionLikeNest(passManager)
.addPass(DispatchCreation::createFusionPreprocessingPass)
.addPass([]() {
return DispatchCreation::createElementwiseOpFusionPass(
ElementwiseOpFusionPassOptions{
Expand All @@ -148,6 +149,7 @@ void addDispatchRegionCreationPreprocessingPasses(OpPassManager &passManager) {

// 3. Perform elementwise operation fusion again (now with higher
// dimensionality).
.addPass(DispatchCreation::createFusionPreprocessingPass)
.addPass([]() {
return DispatchCreation::createElementwiseOpFusionPass(
ElementwiseOpFusionPassOptions{
Expand Down

0 comments on commit e6df5a2

Please sign in to comment.