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
521d2223
Unverified
Commit
521d2223
authored
Nov 17, 2017
by
Robert Kimball
Committed by
GitHub
Nov 17, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #244 from NervanaSystems/jmenon/fix_cpu
CPU: Minor fixes
parents
7ba8f533
004aab51
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
11 deletions
+11
-11
CMakeLists.txt
src/ngraph/CMakeLists.txt
+2
-2
compiler.cpp
src/ngraph/codegen/compiler.cpp
+8
-0
emitter.cpp
src/ngraph/runtime/cpu/emitter.cpp
+1
-1
external_function.cpp
src/ngraph/runtime/cpu/external_function.cpp
+0
-8
No files found.
src/ngraph/CMakeLists.txt
View file @
521d2223
...
...
@@ -121,10 +121,10 @@ if (NGRAPH_CPU_ENABLE AND LLVM_INCLUDE_DIR AND
# This must be kept in sync with the LLVM + Clang version in use
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
}
\"
"
)
"EIGEN_HEADERS_PATH=
\"
${
EIGEN_INCLUDE_DIR
}
\"
;CLANG_BUILTIN_HEADERS_PATH=
\"
${
LLVM_LIB_DIR
}
/clang/5.0.0/include
\"
;NGRAPH_HEADERS_PATH=
\"
${
NGRAPH_INCLUDE_PATH
}
\"
;
"
)
set
(
NGRAPH_CPU_PCH_ENABLE 0 CACHE STRING
"Enable pre-compiled headers in the CPU backend"
)
set
(
NGRAPH_CPU_DEBUGINFO_ENABLE 0 CACHE STRING
"Enable debuginfo in the CPU backend"
)
set_
source_files_properties
(
runtime/cpu/external_function.cpp PROPERTIES
COMPILE_DEFINITIONS
set_
property
(
SOURCE codegen/compiler.cpp APPEND_STRING PROPERTY
COMPILE_DEFINITIONS
"NGCPU_PCH=
${
NGRAPH_CPU_PCH_ENABLE
}
;NGCPU_DEBUGINFO=
${
NGRAPH_CPU_DEBUGINFO_ENABLE
}
"
)
endif
()
...
...
src/ngraph/codegen/compiler.cpp
View file @
521d2223
...
...
@@ -92,6 +92,14 @@ StaticCompiler::StaticCompiler()
,
m_debuginfo_enabled
(
false
)
,
m_source_name
(
"code.cpp"
)
{
#if NGCPU_PCH
m_precompiled_headers_enabled
=
true
;
#endif
#if NGCPU_DEBUGINFO
m_debuginfo_enabled
=
true
;
#endif
llvm
::
InitializeAllTargets
();
llvm
::
InitializeAllTargetMCs
();
llvm
::
InitializeAllAsmPrinters
();
...
...
src/ngraph/runtime/cpu/emitter.cpp
View file @
521d2223
...
...
@@ -1384,7 +1384,7 @@ void Emitter::generate_call(const std::vector<TensorViewInfo>& inputs,
static
string
format_name
(
const
string
&
name
)
{
string
rc
;
if
(
name
.
empty
())
if
(
!
name
.
empty
())
{
rc
=
" "
+
name
;
}
...
...
src/ngraph/runtime/cpu/external_function.cpp
View file @
521d2223
...
...
@@ -318,14 +318,6 @@ using namespace ngraph::runtime::cpu::eigen;
codegen
::
Compiler
compiler
;
codegen
::
ExecutionEngine
execution_engine
;
#if NGCPU_PCH
compiler
.
set_precompiled_headers_enabled
(
true
);
#endif
#if NGCPU_DEBUGINFO
compiler
.
set_debuginfo_enabled
(
true
);
#endif
auto
llvm_module
=
compiler
.
compile
(
code
);
if
(
llvm_module
==
nullptr
)
{
...
...
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