Commit 502a880d authored by Diego Caballero's avatar Diego Caballero Committed by nmostafa

[MLIR] Update MLIR/LLVM repos

parent 0b1a386e
......@@ -20,8 +20,8 @@ set(MLIR_LLVM_REPO_URL https://github.com/llvm/llvm-project.git)
set(MLIR_REPO_URL https://github.com/tensorflow/mlir.git)
# Change these commit IDs to move to latest stable versions
set(MLIR_LLVM_COMMIT_ID 4fe2732)
set(MLIR_COMMIT_ID 40fe0fe7)
set(MLIR_LLVM_COMMIT_ID ebaa3eb1)
set(MLIR_COMMIT_ID 9a856bce)
# MLIR environment variables. Some of them are used by LIT tool.
set(MLIR_PROJECT_ROOT ${CMAKE_CURRENT_BINARY_DIR}/mlir_project)
......
......@@ -360,7 +360,10 @@ void MLIRCompiler::lowerNgDialect()
// Apply any generic pass manager command line options.
mlir::applyPassManagerCLOptions(pm);
pm.run(m_module.get());
if (failed(pm.run(m_module.get())))
{
NGRAPH_CHECK(false, "MLIR pass manager failed");
}
if (failed(m_module->verify()))
{
......@@ -709,7 +712,11 @@ void MLIRCompiler::optimizeNgDialect()
{
pm.addPass(mlir::createMemoryOptimizationPass());
}
pm.run(m_module.get());
if (failed(pm.run(m_module.get())))
{
NGRAPH_CHECK(false, "MLIR pass manager failed");
}
}
// Binds MLIR function arguments to the proper values. This includes externally allocated tensors
......
......@@ -61,8 +61,6 @@ static llvm::cl::opt<bool>
llvm::cl::desc("Run the verifier after each transformation pass"),
llvm::cl::init(true));
static std::vector<const mlir::PassRegistryEntry*>* pass_list;
int main(int argc, char** argv)
{
llvm::InitLLVM y(argc, argv);
......@@ -70,11 +68,7 @@ int main(int argc, char** argv)
// Register any pass manager command line options.
mlir::registerPassManagerCLOptions();
// Parse pass names in main to ensure static initialization completed.
llvm::cl::list<const mlir::PassRegistryEntry*, bool, mlir::PassNameParser> pass_list(
"", llvm::cl::desc("Compiler passes to run"));
::pass_list = &pass_list;
mlir::PassPipelineCLParser passPipeline("", "Compiler passes to run");
llvm::cl::ParseCommandLineOptions(argc, argv, "nGraph MLIR modular optimizer driver\n");
// Set up the input file.
......@@ -87,7 +81,7 @@ int main(int argc, char** argv)
return failed(mlir::MlirOptMain(output->os(),
std::move(file),
pass_list,
passPipeline,
split_input_file,
verify_diagnostics,
verify_passes));
......
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