Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
N
ngraph
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ngraph
Commits
502a880d
Commit
502a880d
authored
Sep 30, 2019
by
Diego Caballero
Committed by
nmostafa
Oct 09, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[MLIR] Update MLIR/LLVM repos
parent
0b1a386e
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
12 deletions
+13
-12
external_mlir.cmake
cmake/external_mlir.cmake
+2
-2
compiler.cpp
src/contrib/mlir/compiler/compiler.cpp
+9
-2
ngraph_opt.cpp
src/contrib/mlir/tools/ngraph-opt/ngraph_opt.cpp
+2
-8
No files found.
cmake/external_mlir.cmake
View file @
502a880d
...
...
@@ -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
)
...
...
src/contrib/mlir/compiler/compiler.cpp
View file @
502a880d
...
...
@@ -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
...
...
src/contrib/mlir/tools/ngraph-opt/ngraph_opt.cpp
View file @
502a880d
...
...
@@ -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
,
pass
Pipeline
,
split_input_file
,
verify_diagnostics
,
verify_passes
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment