From e6df5a2a1820b81bcee5ddd6bfa5863fca18ad46 Mon Sep 17 00:00:00 2001 From: Ian Wood Date: Mon, 28 Oct 2024 18:14:44 +0000 Subject: [PATCH] Run preprocessing before elementwise fusion Signed-off-by: Ian Wood --- compiler/src/iree/compiler/DispatchCreation/Passes.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compiler/src/iree/compiler/DispatchCreation/Passes.cpp b/compiler/src/iree/compiler/DispatchCreation/Passes.cpp index afee21cbbcd8..9f3887e55f2a 100644 --- a/compiler/src/iree/compiler/DispatchCreation/Passes.cpp +++ b/compiler/src/iree/compiler/DispatchCreation/Passes.cpp @@ -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{ @@ -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{