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
1ce31a49
Commit
1ce31a49
authored
Sep 30, 2019
by
Tomasz Socha
Committed by
Michał Karzyński
Sep 30, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SPEC] Add v1:Convolution operator (#3636)
parent
ac4676ff
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
48 additions
and
4 deletions
+48
-4
convolution.cpp
src/ngraph/op/convolution.cpp
+0
-0
convolution.hpp
src/ngraph/op/convolution.hpp
+0
-0
opset1_upgrade.cpp
src/ngraph/pass/opset1_upgrade.cpp
+0
-0
cpu_emitter.hpp
src/ngraph/runtime/cpu/cpu_emitter.hpp
+1
-3
serializer.cpp
src/ngraph/serializer.cpp
+0
-0
CMakeLists.txt
test/CMakeLists.txt
+2
-1
convolution_opset_pass.cpp
test/opset_pass/convolution_opset_pass.cpp
+45
-0
No files found.
src/ngraph/op/convolution.cpp
View file @
1ce31a49
This diff is collapsed.
Click to expand it.
src/ngraph/op/convolution.hpp
View file @
1ce31a49
This diff is collapsed.
Click to expand it.
src/ngraph/pass/opset1_upgrade.cpp
View file @
1ce31a49
This diff is collapsed.
Click to expand it.
src/ngraph/runtime/cpu/cpu_emitter.hpp
View file @
1ce31a49
...
...
@@ -22,6 +22,7 @@
#include "ngraph/code_writer.hpp"
#include "ngraph/node.hpp"
#include "ngraph/op/avg_pool.hpp"
#include "ngraph/op/convolution.hpp"
#include "ngraph/op/gather.hpp"
#include "ngraph/op/max_pool.hpp"
#include "ngraph/op/pad.hpp"
...
...
@@ -109,10 +110,7 @@ namespace ngraph
class
QuantizedConvolution
;
class
GroupConvolution
;
class
GroupConvolutionBias
;
class
Convolution
;
class
ConvolutionBackpropFilters
;
class
DeconvolutionBias
;
class
ConvolutionBackpropData
;
class
QuantizedConvolutionBias
;
class
QuantizedConvolutionBiasAdd
;
class
QuantizedConvolutionBiasSignedAdd
;
...
...
src/ngraph/serializer.cpp
View file @
1ce31a49
This diff is collapsed.
Click to expand it.
test/CMakeLists.txt
View file @
1ce31a49
...
...
@@ -69,13 +69,14 @@ set(SRC
node_input_output.cpp
nop_elimination.cpp
op.cpp
opset_pass/convolution_opset_pass.cpp
opset_pass/gather_opset_pass.cpp
opset_pass/pad_opset_pass.cpp
opset_pass/poolings_opset_pass.cpp
opset_pass/product_opset_pass.cpp
opset_pass/reverse_opset_pass.cpp
opset_pass/softmax_opset_pass.cpp
opset_pass/sum_opset_pass.cpp
opset_pass/poolings_opset_pass.cpp
partial_shape.cpp
pass.cpp
pass_liveness.cpp
...
...
test/opset_pass/convolution_opset_pass.cpp
0 → 100644
View file @
1ce31a49
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include "ngraph/ngraph.hpp"
#include "ngraph/pass/manager.hpp"
#include "ngraph/pass/opset1_upgrade.hpp"
#include "util/test_control.hpp"
#include "util/type_prop.hpp"
using
namespace
std
;
using
namespace
ngraph
;
TEST
(
upgrade_pass
,
opset1_convolution_pass
)
{
auto
data
=
make_shared
<
op
::
Parameter
>
(
element
::
f32
,
Shape
{
1
,
3
,
6
,
9
});
auto
filters
=
make_shared
<
op
::
Parameter
>
(
element
::
f32
,
Shape
{
1
,
3
,
3
,
3
});
CoordinateDiff
pads_begin
{
0
,
0
};
CoordinateDiff
pads_end
{
0
,
0
};
Strides
strides
{
1
,
1
};
Strides
dilations
{
1
,
1
};
Strides
data_dilations_strides
{
1
,
1
};
op
::
PadType
pad_type
=
op
::
PadType
::
EXPLICIT
;
auto
convolution_v0
=
make_shared
<
op
::
v0
::
Convolution
>
(
data
,
filters
,
strides
,
dilations
,
pads_begin
,
pads_end
,
data_dilations_strides
,
pad_type
);
auto
result
=
make_shared
<
op
::
Result
>
(
convolution_v0
);
auto
f
=
make_shared
<
Function
>
(
ResultVector
{
result
},
ParameterVector
{
data
,
filters
});
ngraph
::
pass
::
Manager
pass_manager
;
pass_manager
.
register_pass
<
pass
::
Opset1Upgrade
>
();
pass_manager
.
run_passes
(
f
);
auto
convolution_s1_result
=
f
->
get_results
().
at
(
0
);
auto
node
=
convolution_s1_result
->
input
(
0
).
get_source_output
().
get_node_shared_ptr
();
auto
convolution_v1_node
=
static_pointer_cast
<
op
::
v1
::
Convolution
>
(
node
);
EXPECT_EQ
(
convolution_v1_node
->
description
(),
"Convolution"
);
EXPECT_EQ
(
convolution_v1_node
->
get_version
(),
1
);
EXPECT_EQ
(
convolution_v1_node
->
get_pads_begin
(),
pads_begin
);
EXPECT_EQ
(
convolution_v1_node
->
get_pads_end
(),
pads_end
);
EXPECT_EQ
(
convolution_v1_node
->
get_strides
(),
strides
);
EXPECT_EQ
(
convolution_v1_node
->
get_auto_pad
(),
pad_type
);
EXPECT_EQ
(
convolution_v1_node
->
get_dilations
(),
dilations
);
}
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