From 880f603239831d4af92d14d37081559a7fea2546 Mon Sep 17 00:00:00 2001 From: Nicolas Vasilache Date: Thu, 29 Oct 2020 06:09:17 -0700 Subject: [PATCH] Drop OperationFolder usage with Linalg fusion. PiperOrigin-RevId: 339653466 --- lib/Dialect/mhlo/transforms/lhlo_fuse_linalg.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/Dialect/mhlo/transforms/lhlo_fuse_linalg.cc b/lib/Dialect/mhlo/transforms/lhlo_fuse_linalg.cc index da76093..610b562 100644 --- a/lib/Dialect/mhlo/transforms/lhlo_fuse_linalg.cc +++ b/lib/Dialect/mhlo/transforms/lhlo_fuse_linalg.cc @@ -26,7 +26,6 @@ limitations under the License. #include "mlir/Dialect/StandardOps/IR/Ops.h" #include "mlir/Interfaces/ViewLikeInterface.h" #include "mlir/Pass/Pass.h" -#include "mlir/Transforms/FoldUtils.h" #include "mlir/Transforms/GreedyPatternRewriteDriver.h" namespace mlir { @@ -95,7 +94,6 @@ class LhloFuseLinalgPass } MLIRContext* ctx = func.getContext(); OpBuilder b(func); - OperationFolder folder(ctx); func.walk([&](linalg::GenericOp generic_op) { SmallVector tile_sizes(tile_sizes_.begin(), tile_sizes_.end()); @@ -122,7 +120,7 @@ class LhloFuseLinalgPass for (unsigned id = 0, e = LinalgOp(op).getNumInputs(); id < e; ++id) { linalg::Aliases aliases; linalg::LinalgDependenceGraph graph(aliases, linalg_ops); - if (auto info = fuseProducerOfBuffer(b, op, id, graph, &folder)) { + if (auto info = fuseProducerOfBuffer(b, op, id, graph)) { auto originalOp = info->originalProducer.getOperation(); erase_set.insert(originalOp); auto originalOpInLinalgOpsVector = std::find_if(