Skip to content

Commit

Permalink
[Codegen] Add vector transfer + slice foldings in GenericVectorization
Browse files Browse the repository at this point in the history
Signed-off-by: Max Dawkins <[email protected]>
  • Loading branch information
Max191 committed Jun 7, 2024
1 parent ae04c67 commit 810abaa
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions compiler/src/iree/compiler/Codegen/Common/GenericVectorization.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,16 @@ void GenericVectorizationPass::runOnOperation() {
vectorizeGatherAccesses);
};

{
RewritePatternSet transferSliceFoldingPatterns(funcOp.getContext());
tensor::populateFoldTensorSubsetIntoVectorTransferPatterns(
transferSliceFoldingPatterns);
if (failed(applyPatternsAndFoldGreedily(funcOp,
std::move(transferSliceFoldingPatterns)))) {
return signalPassFailure();
}
}

{
// Canonicalize mask related ops before we lower them.
RewritePatternSet maskCanonPatterns(funcOp.getContext());
Expand Down

0 comments on commit 810abaa

Please sign in to comment.