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
7d0e91be
Commit
7d0e91be
authored
Mar 01, 2018
by
Louis Feng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed merge errors.
parent
91c9a1bf
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
24 deletions
+20
-24
mkldnn_emitter.cpp
src/ngraph/runtime/cpu/mkldnn_emitter.cpp
+14
-14
conv_bias.cpp
src/ngraph/runtime/cpu/ops/conv_bias.cpp
+3
-4
conv_bias.hpp
src/ngraph/runtime/cpu/ops/conv_bias.hpp
+3
-6
No files found.
src/ngraph/runtime/cpu/mkldnn_emitter.cpp
View file @
7d0e91be
...
...
@@ -134,12 +134,12 @@ size_t MKLDNNEmitter::build_convolution_forward(const mkldnn::memory::desc& inpu
mkldnn
::
memory
::
dims
(
padding_above
.
begin
(),
padding_above
.
end
()),
mkldnn
::
padding_kind
::
zero
},
mkldnn_utils
::
global_cpu_engine
},
*
mkldnn_primitives
[
input_data_index
],
*
mkldnn_primitives
[
weights_index
],
*
mkldnn_primitives
[
bias_index
],
*
mkldnn_primitives
[
result_index
]));
*
m
_m
kldnn_primitives
[
input_data_index
],
*
m
_m
kldnn_primitives
[
weights_index
],
*
m
_m
kldnn_primitives
[
bias_index
],
*
m
_m
kldnn_primitives
[
result_index
]));
primitive_deps
[
conv_index
]
=
{
input_data_index
,
weights_index
,
bias_index
,
result_index
};
m_
primitive_deps
[
conv_index
]
=
{
input_data_index
,
weights_index
,
bias_index
,
result_index
};
return
conv_index
;
}
...
...
@@ -186,11 +186,11 @@ size_t MKLDNNEmitter::build_convolution_backward_data(const mkldnn::memory::desc
fwd_pd
};
const
size_t
conv_index
=
insert_primitive
(
new
mkldnn
::
convolution_backward_data
(
bwd_pd
,
*
mkldnn_primitives
[
in_delta_index
],
*
mkldnn_primitives
[
in_weights_index
],
*
mkldnn_primitives
[
out_data_delta_index
]));
*
m
_m
kldnn_primitives
[
in_delta_index
],
*
m
_m
kldnn_primitives
[
in_weights_index
],
*
m
_m
kldnn_primitives
[
out_data_delta_index
]));
primitive_deps
[
conv_index
]
=
{
in_weights_index
,
in_delta_index
,
out_data_delta_index
};
m_
primitive_deps
[
conv_index
]
=
{
in_weights_index
,
in_delta_index
,
out_data_delta_index
};
return
conv_index
;
}
...
...
@@ -239,12 +239,12 @@ size_t MKLDNNEmitter::build_convolution_backward_filters_bias(const mkldnn::memo
fwd_pd
};
const
size_t
conv_index
=
insert_primitive
(
new
mkldnn
::
convolution_backward_weights
(
bwd_pd
,
*
mkldnn_primitives
[
in_data_index
],
*
mkldnn_primitives
[
in_delta_index
],
*
mkldnn_primitives
[
out_weights_delta_index
],
*
mkldnn_primitives
[
out_bias_delta_index
]));
*
m
_m
kldnn_primitives
[
in_data_index
],
*
m
_m
kldnn_primitives
[
in_delta_index
],
*
m
_m
kldnn_primitives
[
out_weights_delta_index
],
*
m
_m
kldnn_primitives
[
out_bias_delta_index
]));
primitive_deps
[
conv_index
]
=
{
in_data_index
,
in_delta_index
,
out_weights_delta_index
,
out_bias_delta_index
};
m_
primitive_deps
[
conv_index
]
=
{
in_data_index
,
in_delta_index
,
out_weights_delta_index
,
out_bias_delta_index
};
return
conv_index
;
}
...
...
src/ngraph/runtime/cpu/ops/conv_bias.cpp
View file @
7d0e91be
...
...
@@ -58,8 +58,7 @@ op::ConvolutionBias::ConvolutionBias(const std::shared_ptr<Node>& data_batch,
{
}
std
::
shared_ptr
<
Node
>
op
::
ConvolutionBias
::
copy_with_new_args
(
const
std
::
vector
<
std
::
shared_ptr
<
Node
>>&
new_args
)
const
std
::
shared_ptr
<
Node
>
op
::
ConvolutionBias
::
copy_with_new_args
(
const
NodeVector
&
new_args
)
const
{
if
(
new_args
.
size
()
!=
2
)
{
...
...
@@ -199,7 +198,7 @@ op::ConvolutionBiasBackpropData::ConvolutionBiasBackpropData(const Shape& data_b
}
std
::
shared_ptr
<
Node
>
op
::
ConvolutionBiasBackpropData
::
copy_with_new_args
(
const
std
::
vector
<
std
::
shared_ptr
<
Node
>>
&
new_args
)
const
const
NodeVector
&
new_args
)
const
{
if
(
new_args
.
size
()
!=
2
)
{
...
...
@@ -299,7 +298,7 @@ op::ConvolutionBiasBackpropFiltersBias::ConvolutionBiasBackpropFiltersBias(
}
std
::
shared_ptr
<
Node
>
op
::
ConvolutionBiasBackpropFiltersBias
::
copy_with_new_args
(
const
std
::
vector
<
std
::
shared_ptr
<
Node
>>
&
new_args
)
const
const
NodeVector
&
new_args
)
const
{
if
(
new_args
.
size
()
!=
2
)
{
...
...
src/ngraph/runtime/cpu/ops/conv_bias.hpp
View file @
7d0e91be
...
...
@@ -37,8 +37,7 @@ namespace ngraph
std
::
shared_ptr
<
Node
>
get_bias
()
{
return
get_input_op
(
2
);
}
std
::
shared_ptr
<
Node
>
get_filters
()
{
return
get_input_op
(
1
);
}
std
::
shared_ptr
<
Node
>
get_data_batch
()
{
return
get_input_op
(
0
);
}
virtual
std
::
shared_ptr
<
Node
>
copy_with_new_args
(
const
std
::
vector
<
std
::
shared_ptr
<
Node
>>&
new_args
)
const
override
;
virtual
std
::
shared_ptr
<
Node
>
copy_with_new_args
(
const
NodeVector
&
new_args
)
const
override
;
void
generate_adjoints
(
autodiff
::
Adjoints
&
adjoints
,
const
std
::
shared_ptr
<
Node
>&
delta
)
override
;
...
...
@@ -84,8 +83,7 @@ namespace ngraph
const
CoordinateDiff
&
padding_above_forward
,
const
Strides
&
data_dilation_strides_forward
);
virtual
std
::
shared_ptr
<
Node
>
copy_with_new_args
(
const
std
::
vector
<
std
::
shared_ptr
<
Node
>>&
new_args
)
const
override
;
virtual
std
::
shared_ptr
<
Node
>
copy_with_new_args
(
const
NodeVector
&
new_args
)
const
override
;
/// \return The data batch shape.
const
Shape
&
get_data_batch_shape
()
const
{
return
m_data_batch_shape
;
}
...
...
@@ -180,8 +178,7 @@ namespace ngraph
const
CoordinateDiff
&
padding_above_forward
,
const
Strides
&
data_dilation_strides_forward
);
virtual
std
::
shared_ptr
<
Node
>
copy_with_new_args
(
const
std
::
vector
<
std
::
shared_ptr
<
Node
>>&
new_args
)
const
override
;
virtual
std
::
shared_ptr
<
Node
>
copy_with_new_args
(
const
NodeVector
&
new_args
)
const
override
;
/// \return The filters tensor shape.
const
Shape
&
get_filters_shape
()
const
{
return
m_filters_shape
;
}
...
...
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