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
49a8f3b2
Commit
49a8f3b2
authored
Apr 12, 2019
by
Nishant Patel
Committed by
Scott Cyphers
Apr 12, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use only convolution direct algo for non float convs (#2752)
parent
c5d52f14
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
4 deletions
+16
-4
mkldnn_emitter.cpp
src/ngraph/runtime/cpu/mkldnn_emitter.cpp
+2
-4
mkldnn_emitter.hpp
src/ngraph/runtime/cpu/mkldnn_emitter.hpp
+7
-0
cpu_layout.cpp
src/ngraph/runtime/cpu/pass/cpu_layout.cpp
+7
-0
No files found.
src/ngraph/runtime/cpu/mkldnn_emitter.cpp
View file @
49a8f3b2
...
...
@@ -332,10 +332,9 @@ size_t
conv_attr
.
set_int_output_round_mode
(
mkldnn
::
round_mode
::
round_nearest
);
/* Specify the scales array and corresponding mask */
conv_attr
.
set_output_scales
(
0
,
output_scale
);
mkldnn
::
algorithm
convolution_algo
=
mkldnn_utils
::
get_conv_algo
();
size_t
conv_index
=
insert_primitive
(
new
mkldnn
::
convolution_forward
(
{{
mkldnn
::
prop_kind
::
forward
,
convolution_algo
,
mkldnn
::
algorithm
::
convolution_direct
,
input_data_desc
,
weights_desc
,
result_desc
,
...
...
@@ -377,10 +376,9 @@ size_t
conv_attr
.
set_int_output_round_mode
(
mkldnn
::
round_mode
::
round_nearest
);
/* Specify the scales array and corresponding mask */
conv_attr
.
set_output_scales
(
0
,
output_scale
);
mkldnn
::
algorithm
convolution_algo
=
mkldnn_utils
::
get_conv_algo
();
size_t
conv_index
=
insert_primitive
(
new
mkldnn
::
convolution_forward
(
{{
mkldnn
::
prop_kind
::
forward
,
convolution_algo
,
mkldnn
::
algorithm
::
convolution_direct
,
input_data_desc
,
weights_desc
,
bias_desc
,
...
...
src/ngraph/runtime/cpu/mkldnn_emitter.hpp
View file @
49a8f3b2
...
...
@@ -1250,6 +1250,13 @@ namespace ngraph
Strides
window_dilation_strides_adjusted
;
mkldnn
::
algorithm
convolution_algo
=
mkldnn_utils
::
get_conv_algo
();
if
(
node
->
get_input_element_type
(
0
)
!=
element
::
f32
&&
convolution_algo
!=
mkldnn
::
algorithm
::
convolution_direct
)
{
convolution_algo
=
mkldnn
::
algorithm
::
convolution_direct
;
}
for
(
size_t
s
:
convolution
->
get_window_dilation_strides
())
{
window_dilation_strides_adjusted
.
push_back
(
s
-
1
);
...
...
src/ngraph/runtime/cpu/pass/cpu_layout.cpp
View file @
49a8f3b2
...
...
@@ -393,6 +393,13 @@ namespace ngraph
std
::
unique_ptr
<
convolution_forward
::
desc
>
fwd_desc
{
nullptr
};
auto
convolution_algo
=
mkldnn_utils
::
get_conv_algo
();
if
(
node
->
get_input_element_type
(
0
)
!=
element
::
f32
&&
convolution_algo
!=
mkldnn
::
algorithm
::
convolution_direct
)
{
convolution_algo
=
mkldnn
::
algorithm
::
convolution_direct
;
}
if
(
use_bias
)
{
memory
::
data_type
et_bias
=
...
...
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