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
9a376ca6
Commit
9a376ca6
authored
Feb 26, 2018
by
pthoreho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Style fix
- select mkldnn add only if the input_tensor size is >= 1
parent
8578694b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
cpu_assignment.cpp
src/ngraph/runtime/cpu/pass/cpu_assignment.cpp
+5
-1
No files found.
src/ngraph/runtime/cpu/pass/cpu_assignment.cpp
View file @
9a376ca6
...
...
@@ -48,6 +48,9 @@ namespace ngraph
{
auto
add
=
static_cast
<
op
::
Add
*>
(
node
);
auto
arg0_shape
=
node
->
get_input_shape
(
0
);
auto
arg1_shape
=
node
->
get_input_shape
(
1
);
auto
arg0_rank
=
arg0_shape
.
size
();
auto
arg1_rank
=
arg1_shape
.
size
();
auto
src_size
=
1
;
for
(
size_t
i
=
0
;
i
<
node
->
get_input_shape
(
0
).
size
();
i
++
)
...
...
@@ -57,7 +60,8 @@ namespace ngraph
// insert Add as MKLDNN op, only if the src_size is big. this is to avoid MKLDNN overhead
// for smaller tensor sizes
if
(
node
->
get_input_element_type
(
0
)
==
element
::
f32
&&
node
->
get_input_element_type
(
1
)
==
element
::
f32
&&
src_size
>
64000
)
node
->
get_input_element_type
(
1
)
==
element
::
f32
&&
arg0_rank
>=
1
&&
arg1_rank
>=
1
&&
src_size
>
64000
)
{
auto
op_annotations
=
std
::
make_shared
<
ngraph
::
runtime
::
cpu
::
CPUOpAnnotations
>
();
...
...
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