Unverified Commit efa46641 authored by Diego Caballero's avatar Diego Caballero Committed by GitHub

[MLIR] MLIR repo update (#4249)

* [MLIR] MLIR repo update

* Revert test

* More MLIR repo forward

* Move MLIR repo forward

* Add Loop-to-Std lowering pass to nGraph pipeline
Co-authored-by: 's avatarRobert Kimball <robert.kimball@intel.com>
Co-authored-by: 's avatarScott Cyphers <diyessi@users.noreply.github.com>
parent 2da03f8a
......@@ -19,7 +19,7 @@ include(ExternalProject)
set(MLIR_LLVM_REPO_URL https://github.com/llvm/llvm-project.git)
# Change these commit IDs to move to latest stable versions
set(MLIR_LLVM_COMMIT_ID d6295255)
set(MLIR_LLVM_COMMIT_ID 96400ae)
# MLIR environment variables. Some of them are used by LIT tool.
......
......@@ -53,6 +53,7 @@ target_link_libraries(
MLIRExecutionEngine
MLIRIR
MLIRLLVMIR
MLIRLoopToStandard
MLIRStandardToLLVM
MLIRParser
MLIRPass
......
......@@ -247,8 +247,9 @@ void MLIRCPUBackend::optimizeAffineDialect()
pm.addPass(mlir::createLoopTilingPass(cacheLevelSize));
}
// Populate pass manager with affine dialect to Std dialect conversion.
// Populate pass manager with affine-to-loop and loop-to-std dialect conversions.
pm.addPass(mlir::createLowerAffinePass());
pm.addPass(mlir::createLowerToCFGPass());
// Apply any generic pass manager command line options.
mlir::applyPassManagerCLOptions(pm);
......
......@@ -266,7 +266,7 @@ namespace
IdToMemRefMap m_id_to_memref;
MemoryAnalysis* m_memAnalysis;
// TODO: Workaround for findOutputValues and buildOutputDefs. See NGCPU-470.
std::string funcName;
StringRef funcName;
// Store the attributes needed by callback
std::vector<opAttrs> m_attrsVec;
......@@ -339,7 +339,7 @@ namespace
void DialectLoweringPass::findOutputValues()
{
FuncOp f = getModule().lookupSymbol<mlir::FuncOp>(funcName);
NGRAPH_CHECK(f, "FuncOp '" + funcName + "' not found");
NGRAPH_CHECK(f, "FuncOp '" + funcName.str() + "' not found");
SmallVector<Value, 4> outputList;
unsigned outputCount = 0;
......@@ -366,7 +366,7 @@ namespace
PatternRewriter& rewriter)
{
FuncOp f = getModule().lookupSymbol<mlir::FuncOp>(funcName);
NGRAPH_CHECK(f, "FuncOp '" + funcName + "' not found");
NGRAPH_CHECK(f, "FuncOp '" + funcName.str() + "' not found");
SmallVector<Value, 4> newResults;
for (auto origResult : op->getResults())
......@@ -495,7 +495,7 @@ namespace
void DialectLoweringPass::insertNoAliasArgAttrs()
{
FuncOp func = getModule().lookupSymbol<mlir::FuncOp>(funcName);
NGRAPH_CHECK(func, "FuncOp '" + funcName + "' not found");
NGRAPH_CHECK(func, "FuncOp '" + funcName.str() + "' not found");
unsigned int argIdx = 0;
for (auto arg : func.getArguments())
......@@ -798,7 +798,7 @@ namespace
// For each operand, generate a separate loop to copy into the target slice of "result".
// We'll keep track of the slice offsets via concatenation_axis_pos.
auto concatenationAxis = concat.concatenation_axis().getSExtValue();
IndexHandle concatenationAxisPos(index_t(0));
IndexHandle concatenationAxisPos(index_type(0));
for (auto& operand : operands)
{
......
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