Skip to content

Commit

Permalink
Drop unit dims
Browse files Browse the repository at this point in the history
  • Loading branch information
Jerry Wu committed Aug 23, 2023
1 parent aec0744 commit 9cc4914
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions compiler/src/iree/compiler/Codegen/LLVMCPU/Passes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -507,8 +507,16 @@ void addMultiTilingExpertPassPipeline(
nestedModulePM.addNestedPass<func::FuncOp>(createCSEPass());
}

// Eliminate redundant transfer_read/write to avoid stack allocations.
nestedModulePM.addNestedPass<func::FuncOp>(
createOptimizeVectorTransferPass(/*flatten=*/false));

addBufferizePasses(nestedModulePM);

// Perform memref-based transfer_read/write optimizations.
nestedModulePM.addNestedPass<func::FuncOp>(
createOptimizeVectorTransferPass(/*flatten=*/false));

// Run IREE specific passes before vector lowering expert.
nestedModulePM.addNestedPass<func::FuncOp>(
createRemoveSingleIterationLoopPass());
Expand Down Expand Up @@ -655,8 +663,16 @@ void addCPUDataTilingPipeline(OpPassManager &passManager,
nestedModulePM.addNestedPass<func::FuncOp>(createCSEPass());
}

// Eliminate redundant transfer_read/write to avoid stack allocations.
nestedModulePM.addNestedPass<func::FuncOp>(
createOptimizeVectorTransferPass(/*flatten=*/false));

addBufferizePasses(nestedModulePM);

// Perform memref-based transfer_read/write optimizations.
nestedModulePM.addNestedPass<func::FuncOp>(
createOptimizeVectorTransferPass(/*flatten=*/false));

{
LLVMCPUVectorLoweringPassOptions options;
options.splitVectorTransfersTo = "linalg-copy";
Expand Down

0 comments on commit 9cc4914

Please sign in to comment.