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
8c47e8f1
Commit
8c47e8f1
authored
Oct 29, 2017
by
Jaikrishnan Menon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CPU: Address review comments #1
parent
a48a75d5
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
10 deletions
+11
-10
compiler.cpp
src/ngraph/codegen/compiler.cpp
+2
-2
compiler.hpp
src/ngraph/codegen/compiler.hpp
+6
-5
call_frame.cpp
src/ngraph/runtime/cpu/call_frame.cpp
+1
-1
external_function.cpp
src/ngraph/runtime/cpu/external_function.cpp
+2
-2
No files found.
src/ngraph/codegen/compiler.cpp
View file @
8c47e8f1
...
...
@@ -67,7 +67,7 @@ static std::string GetExecutablePath(const char* Argv0)
execution_state
::
execution_state
()
:
m_execution_engine
{
nullptr
}
,
p
ch
_enabled
(
false
)
,
p
recompiled_headers
_enabled
(
false
)
,
debuginfo_enabled
(
false
)
{
}
...
...
@@ -147,7 +147,7 @@ std::unique_ptr<llvm::Module> execution_state::compile(const string& source, con
CGO
.
setDebugInfo
(
codegenoptions
::
FullDebugInfo
);
}
if
(
p
ch
_enabled
)
if
(
p
recompiled_headers
_enabled
)
{
// Preprocessor options
auto
&
PPO
=
Clang
->
getInvocation
().
getPreprocessorOpts
();
...
...
src/ngraph/codegen/compiler.hpp
View file @
8c47e8f1
...
...
@@ -44,10 +44,11 @@ public:
execution_state
();
~
execution_state
();
void
enable_pch
()
{
pch_enabled
=
true
;
}
void
disable_pch
()
{
pch_enabled
=
false
;
}
void
enable_debuginfo
()
{
debuginfo_enabled
=
true
;
}
void
disable_debuginfo
()
{
debuginfo_enabled
=
false
;
}
void
set_precompiled_headers_enabled
(
bool
state
)
{
precompiled_headers_enabled
=
state
;
}
bool
is_precompiled_headers_enabled
()
{
return
precompiled_headers_enabled
;
}
void
set_debuginfo_enabled
(
bool
state
)
{
debuginfo_enabled
=
state
;
}
bool
is_debuginfo_enabled
()
{
return
debuginfo_enabled
;
}
std
::
unique_ptr
<
llvm
::
Module
>
compile
(
const
std
::
string
&
source
,
const
std
::
string
&
name
=
""
);
bool
add_module
(
std
::
unique_ptr
<
llvm
::
Module
>&
);
...
...
@@ -65,7 +66,7 @@ public:
private
:
llvm
::
ExecutionEngine
*
m_execution_engine
;
std
::
string
jit_error
;
bool
p
ch
_enabled
;
bool
p
recompiled_headers
_enabled
;
bool
debuginfo_enabled
;
template
<
typename
signature
>
...
...
src/ngraph/runtime/cpu/call_frame.cpp
View file @
8c47e8f1
...
...
@@ -14,7 +14,7 @@
#include <algorithm>
#include "
ngraph/runtime/cpu/
call_frame.hpp"
#include "call_frame.hpp"
using
namespace
std
;
using
namespace
ngraph
::
runtime
::
cpu
;
...
...
src/ngraph/runtime/cpu/external_function.cpp
View file @
8c47e8f1
...
...
@@ -246,11 +246,11 @@ extern "C" void __entrypoint(ngraph::runtime::cpu::CallFrame* call_frame,
ngraph
::
codegen
::
execution_state
estate
;
#if NGCPU_PCH
estate
.
enable_pch
(
);
estate
.
set_precompiled_headers_enabled
(
true
);
#endif
#if NGCPU_DEBUGINFO
estate
.
enable_debuginfo
(
);
estate
.
set_debuginfo_enabled
(
true
);
#endif
auto
llvm_module
=
estate
.
compile
(
TU
,
"__ngcpu_codegen.cpp"
);
...
...
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