From c36d506cd36ceb262ebda3c933a80c8aa7bbcc80 Mon Sep 17 00:00:00 2001 From: Ean Garvey Date: Fri, 20 Oct 2023 11:45:02 -0700 Subject: [PATCH] (DNM) Comment out RaiseSpecialOps --- .../LLVMCPU/LLVMCPULowerExecutableTarget.cpp | 6 +++--- .../iree/compiler/Codegen/LLVMCPU/Passes.cpp | 19 ++++--------------- .../iree/compiler/Codegen/LLVMCPU/Passes.h | 3 +-- .../compiler/GlobalOptimization/Passes.cpp | 2 +- 4 files changed, 9 insertions(+), 21 deletions(-) diff --git a/compiler/src/iree/compiler/Codegen/LLVMCPU/LLVMCPULowerExecutableTarget.cpp b/compiler/src/iree/compiler/Codegen/LLVMCPU/LLVMCPULowerExecutableTarget.cpp index 22e2a01751ca9..6fec09ebd3ccb 100644 --- a/compiler/src/iree/compiler/Codegen/LLVMCPU/LLVMCPULowerExecutableTarget.cpp +++ b/compiler/src/iree/compiler/Codegen/LLVMCPU/LLVMCPULowerExecutableTarget.cpp @@ -237,9 +237,8 @@ void LLVMCPULowerExecutableTargetPass::runOnOperation() { case IREE::Codegen::DispatchLoweringPassPipeline::AccelMatmulExpert: { TilingConfig tilingConfig = getTilingConfigForPipeline(moduleOp); - addAccelMatmulExpertPassPipeline(executableLoweringPipeline, - tilingConfig, - enableAccelMicrokernels); + addAccelMatmulExpertPassPipeline(pipeline, + tilingConfig); break; } } @@ -248,6 +247,7 @@ void LLVMCPULowerExecutableTargetPass::runOnOperation() { return signalPassFailure(); } } +} std::unique_ptr> createLLVMCPULowerExecutableTargetPass() { diff --git a/compiler/src/iree/compiler/Codegen/LLVMCPU/Passes.cpp b/compiler/src/iree/compiler/Codegen/LLVMCPU/Passes.cpp index ecd27ae33f806..689a3501f8a74 100644 --- a/compiler/src/iree/compiler/Codegen/LLVMCPU/Passes.cpp +++ b/compiler/src/iree/compiler/Codegen/LLVMCPU/Passes.cpp @@ -568,29 +568,18 @@ void addMmt4dTilingExpertPassPipeline(OpPassManager &passManager, } void addAccelMatmulExpertPassPipeline(OpPassManager &passManager, - TilingConfig &tilingConfig, - bool enableAccelMicrokernels) { + TilingConfig &tilingConfig) { addTileAndDistributePasses(passManager); OpPassManager &nestedModulePM = passManager.nest(); - if (enableAccelMicrokernels) { - nestedModulePM.addPass(createLLVMCPULowerToAccelUKernelsPass()); - } else { - nestedModulePM.addNestedPass(createLLVMCPUTileAndFusePass( - static_cast(tilingConfig.getVectorCommonParallelLevel()))); - nestedModulePM.addNestedPass(createLLVMCPUTilePass( - static_cast(tilingConfig.getVectorReductionLevel()))); - nestedModulePM.addNestedPass( - createGenericVectorizationPass()); - nestedModulePM.addNestedPass( - createHoistRedundantVectorTransfersPass()); - } + + nestedModulePM.addPass(createLLVMCPULowerToAccelUKernelsPass()); nestedModulePM.addNestedPass(createCanonicalizerPass()); nestedModulePM.addNestedPass(createCSEPass()); - addBufferizePasses(nestedModulePM); + addCPUBufferizePasses(nestedModulePM); } void addCPUDataTilingPipeline(OpPassManager &passManager, diff --git a/compiler/src/iree/compiler/Codegen/LLVMCPU/Passes.h b/compiler/src/iree/compiler/Codegen/LLVMCPU/Passes.h index 1a9d659cc522c..92456b46cce31 100644 --- a/compiler/src/iree/compiler/Codegen/LLVMCPU/Passes.h +++ b/compiler/src/iree/compiler/Codegen/LLVMCPU/Passes.h @@ -175,8 +175,7 @@ void addMmt4dTilingExpertPassPipeline(OpPassManager &passManager, bool enableMicrokernels); void addAccelMatmulExpertPassPipeline(OpPassManager &passManager, - TilingConfig &tilingConfig, - bool enableAccelMicrokernels); + TilingConfig &tilingConfig); void addMultiTilingExpertPassPipeline( OpPassManager &passManager, TilingConfig &tilingConfig, bool enablePeeling, diff --git a/compiler/src/iree/compiler/GlobalOptimization/Passes.cpp b/compiler/src/iree/compiler/GlobalOptimization/Passes.cpp index f49aa0ce69117..fbd279c19d5be 100644 --- a/compiler/src/iree/compiler/GlobalOptimization/Passes.cpp +++ b/compiler/src/iree/compiler/GlobalOptimization/Passes.cpp @@ -73,7 +73,7 @@ void buildGlobalOptimizationPassPipeline( // RaiseSpecialOps, by virtue of implementing various peephole // optimizations, is sensitive to surrounding IR structure. Thus we run // this pass both before unit dim folding + consteval, as well as after. - .addPass(IREE::Flow::createRaiseSpecialOps) + // .addPass(IREE::Flow::createRaiseSpecialOps) .addPass(IREE::Flow::createFoldUnitExtentDimsPass) .addPass([&]() { return createFuseDequantizationMatmulPass(