Skip to content

Commit

Permalink
(DNM) Comment out RaiseSpecialOps
Browse files Browse the repository at this point in the history
  • Loading branch information
monorimet committed Nov 16, 2023
1 parent 326100b commit c36d506
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,8 @@ void LLVMCPULowerExecutableTargetPass::runOnOperation() {

case IREE::Codegen::DispatchLoweringPassPipeline::AccelMatmulExpert: {
TilingConfig tilingConfig = getTilingConfigForPipeline(moduleOp);
addAccelMatmulExpertPassPipeline(executableLoweringPipeline,
tilingConfig,
enableAccelMicrokernels);
addAccelMatmulExpertPassPipeline(pipeline,
tilingConfig);
break;
}
}
Expand All @@ -248,6 +247,7 @@ void LLVMCPULowerExecutableTargetPass::runOnOperation() {
return signalPassFailure();
}
}
}

std::unique_ptr<OperationPass<IREE::HAL::ExecutableVariantOp>>
createLLVMCPULowerExecutableTargetPass() {
Expand Down
19 changes: 4 additions & 15 deletions compiler/src/iree/compiler/Codegen/LLVMCPU/Passes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -568,29 +568,18 @@ void addMmt4dTilingExpertPassPipeline(OpPassManager &passManager,
}

void addAccelMatmulExpertPassPipeline(OpPassManager &passManager,
TilingConfig &tilingConfig,
bool enableAccelMicrokernels) {
TilingConfig &tilingConfig) {
addTileAndDistributePasses(passManager);

OpPassManager &nestedModulePM = passManager.nest<ModuleOp>();

if (enableAccelMicrokernels) {
nestedModulePM.addPass(createLLVMCPULowerToAccelUKernelsPass());
} else {
nestedModulePM.addNestedPass<func::FuncOp>(createLLVMCPUTileAndFusePass(
static_cast<int64_t>(tilingConfig.getVectorCommonParallelLevel())));
nestedModulePM.addNestedPass<func::FuncOp>(createLLVMCPUTilePass(
static_cast<int64_t>(tilingConfig.getVectorReductionLevel())));
nestedModulePM.addNestedPass<func::FuncOp>(
createGenericVectorizationPass());
nestedModulePM.addNestedPass<func::FuncOp>(
createHoistRedundantVectorTransfersPass());
}

nestedModulePM.addPass(createLLVMCPULowerToAccelUKernelsPass());

nestedModulePM.addNestedPass<func::FuncOp>(createCanonicalizerPass());
nestedModulePM.addNestedPass<func::FuncOp>(createCSEPass());

addBufferizePasses(nestedModulePM);
addCPUBufferizePasses(nestedModulePM);
}

void addCPUDataTilingPipeline(OpPassManager &passManager,
Expand Down
3 changes: 1 addition & 2 deletions compiler/src/iree/compiler/Codegen/LLVMCPU/Passes.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion compiler/src/iree/compiler/GlobalOptimization/Passes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit c36d506

Please sign in to comment.