Skip to content

Commit f7e164b

Browse files
committed
revert unintended change
1 parent 459bcb4 commit f7e164b

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

mlir/test/lib/Dialect/Linalg/TestLinalgElementwiseFusion.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -151,14 +151,9 @@ struct TestLinalgElementwiseFusion
151151
MLIRContext *context = &this->getContext();
152152
func::FuncOp funcOp = this->getOperation();
153153

154-
auto controlFn = [](OpOperand *operand) {
155-
auto owner = cast<linalg::LinalgOp>(operand->getOwner());
156-
auto producer = cast<linalg::LinalgOp>(operand->get().getDefiningOp());
157-
return (linalg::isElementwise(owner) && linalg::isElementwise(producer)) && (!isa<linalg::BroadcastOp>(producer) && !isa<linalg::BroadcastOp>(owner));
158-
};
159154
if (fuseGenericOps) {
160155
RewritePatternSet fusionPatterns(context);
161-
// auto controlFn = [](OpOperand *operand) { return true; };
156+
auto controlFn = [](OpOperand *operand) { return true; };
162157
linalg::populateElementwiseOpsFusionPatterns(fusionPatterns, controlFn);
163158
if (failed(applyPatternsGreedily(funcOp.getBody(),
164159
std::move(fusionPatterns))))

0 commit comments

Comments
 (0)