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
021399a1
Commit
021399a1
authored
Apr 12, 2019
by
Nagy Mostafa
Committed by
nmostafa
May 31, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[MLIR] Link MLIR static libs to cpu backend
* Link MLIR static libs to cpu backend * Use LLVMConfig.cmake
parent
e49dd589
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
0 deletions
+39
-0
CMakeLists.txt
src/ngraph/runtime/cpu/CMakeLists.txt
+39
-0
No files found.
src/ngraph/runtime/cpu/CMakeLists.txt
View file @
021399a1
...
...
@@ -196,6 +196,45 @@ if (NGRAPH_CPU_ENABLE)
target_link_libraries
(
cpu_backend PUBLIC codegen
)
endif
()
target_include_directories
(
cpu_backend SYSTEM PUBLIC libmkldnn
)
# Link LLVM and MLIR
find_package
(
LLVM REQUIRED CONFIG
)
message
(
STATUS
"Found LLVM
${
LLVM_PACKAGE_VERSION
}
"
)
message
(
STATUS
"Using LLVMConfig.cmake in:
${
LLVM_DIR
}
"
)
add_definitions
(
${
LLVM_DEFINITIONS
}
)
target_include_directories
(
cpu_backend PRIVATE
${
LLVM_INCLUDE_DIRS
}
)
string
(
REPLACE
":"
";"
MLIR_INCLUDE_PATH $ENV{MLIR_INCLUDE_PATH}
)
message
(
STATUS
"MLIR Headers at :
${
MLIR_INCLUDE_PATH
}
"
)
target_include_directories
(
cpu_backend PRIVATE
${
MLIR_INCLUDE_PATH
}
)
llvm_map_components_to_libnames
(
llvm_libs support core irreader
)
# Link MLIR libs
target_link_libraries
(
cpu_backend PRIVATE
MLIRAnalysis
MLIREDSC
MLIRExecutionEngine
MLIRIR
MLIRLLVMIR
MLIRParser
MLIRPass
MLIRTargetLLVMIR
MLIRTransforms
MLIRSupport
MLIRAffineOps
MLIRStandardOps
)
# Link LLVM libs
target_link_libraries
(
cpu_backend PRIVATE
${
llvm_libs
}
)
if
(
NOT APPLE AND NOT MSVS
)
# CPU backend uses third-party libraries like Eigen that might be linked in and
# exported by other DSOs as well. In the absence of versioning, this could lead to the
...
...
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