Skip to content

Commit

Permalink
[mlir][vector] Populate sink patterns in apply_patterns.vector.reduct…
Browse files Browse the repository at this point in the history
…ion_to_contract (llvm#104754)

This restores the functionality to before:
llvm@42944da
This fixes a buildbot failure:
https://lab.llvm.org/buildbot/#/builders/143/builds/1487
  • Loading branch information
MacDue authored Aug 19, 2024
1 parent cde806b commit 74a512d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ def ApplyFoldElementwiseToVectorPatternsOp : Op<Transform_Dialect,
"apply_patterns.vector.elementwise_to_vector",
[DeclareOpInterfaceMethods<PatternDescriptorOpInterface>]> {
let description = [{
Collect a set of patterns that fold elementwise op on vectors to the vector
Collect a set of patterns that fold elementwise op on vectors to the vector
dialect.
}];

Expand All @@ -426,8 +426,9 @@ def ApplyVectorReductionToContractPatternsOp : Op<Transform_Dialect,
- CombineContractBroadcast
- CombineContractABTranspose
- CombineContractResultTranspose
- ReorderCastOpsOnBroadcast
- ReorderElementwiseOpsOnTranspose
- ReorderElementwiseOpsOnBroadcast
- ReorderCastOpsOnBroadcast

These patterns have the effect of rewriting a vector.multi_reduce into a
vector.contract.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ void transform::ApplyFoldElementwiseToVectorPatternsOp::populatePatterns(
void transform::ApplyVectorReductionToContractPatternsOp::populatePatterns(
RewritePatternSet &patterns) {
vector::populateVectorReductionToContractPatterns(patterns);
vector::populateSinkVectorOpsPatterns(patterns);
}

void transform::ApplyLowerCreateMaskPatternsOp::populatePatterns(
Expand Down

0 comments on commit 74a512d

Please sign in to comment.