Commit c101dcce authored by Diego Caballero's avatar Diego Caballero Committed by Scott Cyphers

[MLIR] Bump MLIR repo to commit c636f12, 08/09/2019 (#3422)

MLIR Commit:
commit c636f127ee412ef7279ec0d550f42740824cd9ea
Author: Alex Zinenko <zinenko@google.com>
Date:   Fri Aug 9 08:59:45 2019 -0700

    LLVM dialect and translation: support global strings

LLVM Commit:
commit c636f127ee412ef7279ec0d550f42740824cd9ea
Author: Alex Zinenko <zinenko@google.com>
Date:   Fri Aug 9 08:59:45 2019 -0700

    LLVM dialect and translation: support global strings
parent 0273b716
...@@ -294,7 +294,7 @@ void MLIRCompiler::lower_ng_dialect() ...@@ -294,7 +294,7 @@ void MLIRCompiler::lower_ng_dialect()
// Lower Standard dialect to LLVM dialect. // Lower Standard dialect to LLVM dialect.
mlir::LLVMTypeConverter llvm_converter(&m_context); mlir::LLVMTypeConverter llvm_converter(&m_context);
OwningRewritePatternList patterns; mlir::OwningRewritePatternList patterns;
mlir::populateLoopToStdConversionPatterns(patterns, &m_context); mlir::populateLoopToStdConversionPatterns(patterns, &m_context);
mlir::populateStdToLLVMConversionPatterns(llvm_converter, patterns); mlir::populateStdToLLVMConversionPatterns(llvm_converter, patterns);
...@@ -322,7 +322,7 @@ void MLIRCompiler::lower_ng_dialect() ...@@ -322,7 +322,7 @@ void MLIRCompiler::lower_ng_dialect()
// don't run MLIR passes that were already run. We also pass a default transformer to run // don't run MLIR passes that were already run. We also pass a default transformer to run
// LLVM optimizations at level 3. // LLVM optimizations at level 3.
auto llvm_transformer = auto llvm_transformer =
mlir::makeOptimizingTransformer(opt_level /*optLevel*/, 0 /*sizeLevel*/); mlir::makeOptimizingTransformer(opt_level, /*sizeLevel=*/0, /*targetMachine*/ nullptr);
auto maybeEngine = mlir::ExecutionEngine::create(m_module.get(), llvm_transformer); auto maybeEngine = mlir::ExecutionEngine::create(m_module.get(), llvm_transformer);
NGRAPH_CHECK(maybeEngine, "failed to construct an execution engine"); NGRAPH_CHECK(maybeEngine, "failed to construct an execution engine");
m_engine = std::move(maybeEngine.get()); m_engine = std::move(maybeEngine.get());
......
...@@ -195,9 +195,9 @@ namespace ...@@ -195,9 +195,9 @@ namespace
{ {
#define MLIR_OP(OP) OP##Conversion, #define MLIR_OP(OP) OP##Conversion,
#define MLIR_LAST_OP(OP) OP##Conversion #define MLIR_LAST_OP(OP) OP##Conversion
RewriteListBuilder< patterns.insert<
#include "op_lowerers.inc" #include "op_lowerers.inc"
>::build(patterns, &getContext(), *this); >(&getContext(), *this);
} }
void DialectLoweringPass::findOutputValues() void DialectLoweringPass::findOutputValues()
...@@ -499,8 +499,8 @@ namespace ...@@ -499,8 +499,8 @@ namespace
auto lbs = vLHS.getLbs(); auto lbs = vLHS.getLbs();
auto ubs = vLHS.getUbs(); auto ubs = vLHS.getUbs();
// Loop induction vars // Loop induction vars
auto ivs = IndexHandle::makeIndexHandles(vLHS.rank()); auto ivs = makeIndexHandles(vLHS.rank());
auto pivs = IndexHandle::makeIndexHandlePointers(ivs); auto pivs = makeIndexHandlePointers(ivs);
// Steps // Steps
auto steps = vLHS.getSteps(); auto steps = vLHS.getSteps();
...@@ -719,15 +719,15 @@ namespace ...@@ -719,15 +719,15 @@ namespace
paramsSteps.size() == paramsLbs.size(), paramsSteps.size() == paramsLbs.size(),
"Incorrect loop nest bounds size for gather params"); "Incorrect loop nest bounds size for gather params");
paramsIVs = IndexHandle::makeIndexHandles(vParams.rank() - 1); paramsIVs = makeIndexHandles(vParams.rank() - 1);
paramsIVPtrs = IndexHandle::makeIndexHandlePointers(paramsIVs); paramsIVPtrs = makeIndexHandlePointers(paramsIVs);
auto indicesLbs = vIndices.getLbs(); auto indicesLbs = vIndices.getLbs();
auto indicesUbs = vIndices.getUbs(); auto indicesUbs = vIndices.getUbs();
auto indicesSteps = vIndices.getSteps(); auto indicesSteps = vIndices.getSteps();
auto indicesIVs = IndexHandle::makeIndexHandles(vIndices.rank()); auto indicesIVs = makeIndexHandles(vIndices.rank());
auto indicesIVPtrs = IndexHandle::makeIndexHandlePointers(indicesIVs); auto indicesIVPtrs = makeIndexHandlePointers(indicesIVs);
SmallVector<IndexHandle, 8> paramsIndices, resIndices; SmallVector<IndexHandle, 8> paramsIndices, resIndices;
...@@ -831,8 +831,8 @@ namespace ...@@ -831,8 +831,8 @@ namespace
auto lbs = vLHS.getLbs(); auto lbs = vLHS.getLbs();
auto ubs = vLHS.getUbs(); auto ubs = vLHS.getUbs();
// Loop induction vars // Loop induction vars
auto ivs = IndexHandle::makeIndexHandles(vLHS.rank()); auto ivs = makeIndexHandles(vLHS.rank());
auto pivs = IndexHandle::makeIndexHandlePointers(ivs); auto pivs = makeIndexHandlePointers(ivs);
// Steps // Steps
auto steps = vLHS.getSteps(); auto steps = vLHS.getSteps();
...@@ -889,8 +889,8 @@ namespace ...@@ -889,8 +889,8 @@ namespace
auto lbs = vLHS.getLbs(); auto lbs = vLHS.getLbs();
auto ubs = vLHS.getUbs(); auto ubs = vLHS.getUbs();
// Loop induction vars // Loop induction vars
auto ivs = IndexHandle::makeIndexHandles(vLHS.rank()); auto ivs = makeIndexHandles(vLHS.rank());
auto pivs = IndexHandle::makeIndexHandlePointers(ivs); auto pivs = makeIndexHandlePointers(ivs);
// Steps // Steps
auto steps = vLHS.getSteps(); auto steps = vLHS.getSteps();
LoopNestBuilder(pivs, lbs, ubs, steps)( LoopNestBuilder(pivs, lbs, ubs, steps)(
...@@ -982,8 +982,8 @@ namespace ...@@ -982,8 +982,8 @@ namespace
Type resTy = result->getType().cast<MemRefType>().getElementType(); Type resTy = result->getType().cast<MemRefType>().getElementType();
// Generate loop nest that initializes result to lower bound of the axis to be reduced. // Generate loop nest that initializes result to lower bound of the axis to be reduced.
{ {
auto ivs = IndexHandle::makeIndexHandles(vRes.rank()); auto ivs = makeIndexHandles(vRes.rank());
auto pivs = IndexHandle::makeIndexHandlePointers(ivs); auto pivs = makeIndexHandlePointers(ivs);
auto steps = vRes.getSteps(); auto steps = vRes.getSteps();
auto initVal = vArg.lb(axis); auto initVal = vArg.lb(axis);
LoopNestBuilder(pivs, resLbs, resUbs, steps)( LoopNestBuilder(pivs, resLbs, resUbs, steps)(
...@@ -992,8 +992,8 @@ namespace ...@@ -992,8 +992,8 @@ namespace
// Generate loop nest that computes the actual index reduction. // Generate loop nest that computes the actual index reduction.
{ {
auto allIVs = IndexHandle::makeIndexHandles(vArg.rank()); auto allIVs = makeIndexHandles(vArg.rank());
auto pAllIVs = IndexHandle::makeIndexHandlePointers(allIVs); auto pAllIVs = makeIndexHandlePointers(allIVs);
auto steps = vArg.getSteps(); auto steps = vArg.getSteps();
SmallVector<IndexHandle, 8> nonRedIVs; SmallVector<IndexHandle, 8> nonRedIVs;
......
...@@ -30,8 +30,6 @@ namespace ngraph ...@@ -30,8 +30,6 @@ namespace ngraph
namespace ngmlir namespace ngmlir
{ {
class MLIRCompiler; class MLIRCompiler;
using OwningRewritePatternList = std::vector<std::unique_ptr<mlir::RewritePattern>>;
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment