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
92430c2e
Commit
92430c2e
authored
Oct 25, 2017
by
Jaikrishnan Menon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CPU: Add CMake glue to populate header search paths
Also disable PCH in preparation of merge
parent
46840954
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
9 deletions
+9
-9
CMakeLists.txt
src/ngraph/CMakeLists.txt
+5
-1
compiler.cpp
src/ngraph/codegen/compiler.cpp
+3
-7
external_function.cpp
src/ngraph/runtime/cpu/external_function.cpp
+1
-1
No files found.
src/ngraph/CMakeLists.txt
View file @
92430c2e
...
...
@@ -101,7 +101,8 @@ include_directories(
if
(
LLVM_INCLUDE_DIR
)
include_directories
(
SYSTEM
${
LLVM_INCLUDE_DIR
}
)
link_directories
(
${
LLVM_LIB_DIR
}
)
# Add sources for the LLVM-based code generator
# Add sources for the CPU backend
# and all its dependencies
set
(
SRC
${
SRC
}
codegen/compiler.cpp
runtime/cpu/call_frame.cpp
...
...
@@ -110,7 +111,10 @@ if(LLVM_INCLUDE_DIR)
runtime/cpu/emitter.cpp
runtime/cpu/external_function.cpp
)
# LLVM binary builds are typically built without RTTI
set_source_files_properties
(
codegen/compiler.cpp PROPERTIES COMPILE_FLAGS
"-fno-rtti"
)
set_source_files_properties
(
codegen/compiler.cpp PROPERTIES COMPILE_DEFINITIONS
"EIGEN_HEADERS_PATH=
\"
${
EIGEN_INCLUDE_DIR
}
\"
;CLANG_BUILTIN_HEADERS_PATH=
\"
${
LLVM_LIB_DIR
}
/clang/5.0.0/include
\"
;NGRAPH_HEADERS_PATH=
\"
${
NGRAPH_INCLUDE_PATH
}
\"
"
)
endif
()
add_library
(
ngraph SHARED
${
SRC
}
)
...
...
src/ngraph/codegen/compiler.cpp
View file @
92430c2e
...
...
@@ -123,7 +123,7 @@ std::unique_ptr<llvm::Module> execution_state::compile(const string& source, con
// But that's a private header and isn't part of the public libclang API
// Instead of re-implementing all of that functionality in a custom toolchain
// just hardcode the paths relevant to frequently used build/test machines for now
HSO
.
AddPath
(
"/localdisk/menonjai/build/third-party/ext_llvm-prefix/src/ext_llvm/lib/clang/5.0.0/include"
,
clang
::
frontend
::
System
,
false
,
false
);
HSO
.
AddPath
(
CLANG_BUILTIN_HEADERS_PATH
,
clang
::
frontend
::
System
,
false
,
false
);
HSO
.
AddPath
(
"/usr/include/x86_64-linux-gnu"
,
clang
::
frontend
::
System
,
false
,
false
);
HSO
.
AddPath
(
"/usr/include"
,
clang
::
frontend
::
System
,
false
,
false
);
// Add C++ standard library headers
...
...
@@ -133,12 +133,8 @@ std::unique_ptr<llvm::Module> execution_state::compile(const string& source, con
// Debian-like + GCC 5 libstdc++
HSO
.
AddPath
(
"/usr/include/x86_64-linux-gnu/c++/5"
,
clang
::
frontend
::
System
,
false
,
false
);
HSO
.
AddPath
(
"/usr/include/c++/5"
,
clang
::
frontend
::
System
,
false
,
false
);
// TODO: Hack in path to eigen headers for now
HSO
.
AddPath
(
"/localdisk/menonjai/build/external/eigen/include/eigen3"
,
clang
::
frontend
::
System
,
false
,
false
);
HSO
.
AddPath
(
"/home/menonjai/ngraph-cpp/src"
,
clang
::
frontend
::
System
,
false
,
false
);
HSO
.
AddPath
(
EIGEN_HEADERS_PATH
,
clang
::
frontend
::
System
,
false
,
false
);
HSO
.
AddPath
(
NGRAPH_HEADERS_PATH
,
clang
::
frontend
::
System
,
false
,
false
);
// Language options
auto
LO
=
Clang
->
getInvocation
().
getLangOpts
();
...
...
src/ngraph/runtime/cpu/external_function.cpp
View file @
92430c2e
...
...
@@ -61,7 +61,7 @@
// TODO: Decide if we want to ship this or
// just enable it for developer build-test cycles
#define NGCPU_PCH
//
#define NGCPU_PCH
using
namespace
std
;
using
namespace
ngraph
::
runtime
::
cpu
;
...
...
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