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
dd1c264a
Commit
dd1c264a
authored
Jan 29, 2018
by
Jaikrishnan Menon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CPU: Always create an MKLDNN CPU engine
parent
fc6cd9ac
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
2 additions
and
13 deletions
+2
-13
code_writer.cpp
src/ngraph/codegen/code_writer.cpp
+0
-1
code_writer.hpp
src/ngraph/codegen/code_writer.hpp
+0
-1
cpu_emitter.cpp
src/ngraph/runtime/cpu/cpu_emitter.cpp
+0
-11
cpu_external_function.cpp
src/ngraph/runtime/cpu/cpu_external_function.cpp
+2
-0
No files found.
src/ngraph/codegen/code_writer.cpp
View file @
dd1c264a
...
...
@@ -19,7 +19,6 @@ using namespace ngraph;
codegen
::
CodeWriter
::
CodeWriter
()
:
indent
(
0
)
,
emitted_mkldnn_preamble
(
false
)
,
m_pending_indent
(
true
)
,
m_temporary_name_count
(
0
)
{
...
...
src/ngraph/codegen/code_writer.hpp
View file @
dd1c264a
...
...
@@ -36,7 +36,6 @@ public:
void
operator
+=
(
const
std
::
string
&
);
size_t
indent
;
bool
emitted_mkldnn_preamble
;
template
<
typename
T
>
friend
CodeWriter
&
operator
<<
(
CodeWriter
&
out
,
const
T
&
obj
)
...
...
src/ngraph/runtime/cpu/cpu_emitter.cpp
View file @
dd1c264a
...
...
@@ -91,7 +91,6 @@ void runtime::cpu::CPU_Emitter::EmitMKLDNNPreamble(codegen::CodeWriter& writer)
{
writer
<<
"using namespace mkldnn;
\n
"
;
writer
<<
"auto cpu_engine = engine(engine::cpu, 0);
\n
"
;
writer
.
emitted_mkldnn_preamble
=
true
;
}
void
runtime
::
cpu
::
CPU_Emitter
::
EmitNop
(
codegen
::
CodeWriter
&
writer
,
...
...
@@ -1854,11 +1853,6 @@ void runtime::cpu::CPU_Emitter::EmitConvolution(codegen::CodeWriter& writer,
images_dilated
=
images_dilated
||
(
s
!=
1
);
}
if
(
!
writer
.
emitted_mkldnn_preamble
)
{
EmitMKLDNNPreamble
(
writer
);
}
// TODO: MKLDNN streams should be static so we need to either implement
// codegen for statics or move primitive and stream construction out
// of the generated function and only generate code to run/rerun the stream
...
...
@@ -1983,11 +1977,6 @@ void runtime::cpu::CPU_Emitter::EmitMaxPool(codegen::CodeWriter& writer,
// TODO: Optimize for 1D
if
(
!
writer
.
emitted_mkldnn_preamble
)
{
EmitMKLDNNPreamble
(
writer
);
}
// TODO: Remove element type restriction
if
(
arg_rank
==
4
&&
max_pool
->
get_window_shape
().
size
()
==
2
&&
args
[
0
].
get_element_type
()
==
element
::
f32
)
...
...
src/ngraph/runtime/cpu/cpu_external_function.cpp
View file @
dd1c264a
...
...
@@ -481,6 +481,8 @@ using namespace ngraph::runtime;
writer
<<
"tbb::flow::graph G;
\n\n
"
;
}
runtime
::
cpu
::
CPU_Emitter
::
EmitMKLDNNPreamble
(
writer
);
bool
temporaries_used
=
false
;
size_t
worst_case_tmp_size
=
0
;
for
(
shared_ptr
<
Node
>
node
:
current_function
->
get_ordered_ops
())
...
...
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