From feefdbb264a39c9f7135b8d6378e17aa59ca19c0 Mon Sep 17 00:00:00 2001 From: Diego Caballero <diego.caballero@intel.com> Date: Mon, 22 Jul 2019 13:54:43 -0700 Subject: [PATCH] [MLIR] Fix warnings in MLIR code. (#3280) --- src/contrib/mlir/lowerer.cpp | 3 +-- src/contrib/mlir/pass/mlir_subgraph_extraction.cpp | 2 -- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/contrib/mlir/lowerer.cpp b/src/contrib/mlir/lowerer.cpp index 6d3bd2dd9..244331f97 100644 --- a/src/contrib/mlir/lowerer.cpp +++ b/src/contrib/mlir/lowerer.cpp @@ -350,6 +350,7 @@ namespace } return callBackFuncPtr; } + // NGDialect converters Type NGraphTypeConverter::convertType(Type type) { @@ -576,7 +577,6 @@ namespace // Create Value for result, and extract type info. Value* result = m_pass.buildOutputDefs(op, rewriter)[0]; NGRAPH_CHECK(result, "Unexpected null result in ConcatOp"); - auto resultTy = result->getType().cast<MemRefType>(); // Create view to write into result. MemRefView vRes(result); @@ -590,7 +590,6 @@ namespace for (auto& operand : operands) { NGRAPH_CHECK(operand, "Unexpected null operand in ConcatOp"); - auto operandTy = result->getType().cast<MemRefType>(); // Assuming rank = r, and the concatenation axis is A where A<r, we'll be creating // loops of this form: diff --git a/src/contrib/mlir/pass/mlir_subgraph_extraction.cpp b/src/contrib/mlir/pass/mlir_subgraph_extraction.cpp index 345714c5a..530b6ab29 100644 --- a/src/contrib/mlir/pass/mlir_subgraph_extraction.cpp +++ b/src/contrib/mlir/pass/mlir_subgraph_extraction.cpp @@ -74,7 +74,6 @@ void MLIRSubgraphExtractionPass::MLIRSubgraph::merge(MLIRSubgraph& sg2) // Associate nodes of second sub-graph to first one auto sg_nodes = sg2.get_nodes(); - auto& node_map = m_pass.m_node_to_graph; for (auto node : sg_nodes) { NGRAPH_DEBUG << *node; @@ -112,7 +111,6 @@ bool MLIRSubgraphExtractionPass::run_on_function(std::shared_ptr<Function> func) for (auto op : func->get_ordered_ops()) { NodeVector inputs; - int first_graph_id = -1; std::unordered_set<int> subgraph_ids; // unsupported ops, skip if (!is_supported_mlir_op(op)) -- 2.18.0