Skip to content
This repository has been archived by the owner on Jan 3, 2023. It is now read-only.

Commit

Permalink
Headers refactoring in ONNX importer (#4004)
Browse files Browse the repository at this point in the history
  • Loading branch information
mitruska authored and postrational committed Dec 6, 2019
1 parent eb2ce8e commit 9b56d08
Show file tree
Hide file tree
Showing 63 changed files with 88 additions and 71 deletions.
2 changes: 1 addition & 1 deletion src/ngraph/frontend/onnx_import/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ add_library(onnx_import STATIC
op/reshape.cpp
op/reshape.hpp
op/reverse_sequence.cpp
op/reverse_sequence.h
op/reverse_sequence.hpp
op/selu.cpp
op/selu.hpp
op/shape.hpp
Expand Down
2 changes: 2 additions & 0 deletions src/ngraph/frontend/onnx_import/op/acosh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
// limitations under the License.
//*****************************************************************************

#include <memory>

#include "acosh.hpp"
#include "ngraph/op/add.hpp"
#include "ngraph/op/constant.hpp"
Expand Down
2 changes: 0 additions & 2 deletions src/ngraph/frontend/onnx_import/op/acosh.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@

#pragma once

#include <memory>

#include "core/node.hpp"
#include "ngraph/node.hpp"

Expand Down
2 changes: 2 additions & 0 deletions src/ngraph/frontend/onnx_import/op/add.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

#pragma once

#include <memory>

#include "core/node.hpp"
#include "ngraph/node.hpp"
#include "ngraph/op/add.hpp"
Expand Down
2 changes: 2 additions & 0 deletions src/ngraph/frontend/onnx_import/op/and.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

#pragma once

#include <memory>

#include "core/node.hpp"
#include "ngraph/node.hpp"
#include "ngraph/op/and.hpp"
Expand Down
3 changes: 2 additions & 1 deletion src/ngraph/frontend/onnx_import/op/argmax.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@
// limitations under the License.
//*****************************************************************************

#include "ngraph/op/argmax.hpp"
#include "argmax.hpp"
#include "core/node.hpp"
#include "ngraph/node.hpp"
#include "ngraph/op/argmax.hpp"
#include "utils/reduction.hpp"

namespace ngraph
Expand Down
3 changes: 2 additions & 1 deletion src/ngraph/frontend/onnx_import/op/argmin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@
// limitations under the License.
//*****************************************************************************

#include "ngraph/op/argmin.hpp"
#include "argmin.hpp"
#include "core/node.hpp"
#include "ngraph/node.hpp"
#include "ngraph/op/argmin.hpp"
#include "utils/reduction.hpp"

namespace ngraph
Expand Down
2 changes: 2 additions & 0 deletions src/ngraph/frontend/onnx_import/op/asinh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
// limitations under the License.
//*****************************************************************************

#include <memory>

#include "asinh.hpp"
#include "ngraph/op/add.hpp"
#include "ngraph/op/constant.hpp"
Expand Down
2 changes: 0 additions & 2 deletions src/ngraph/frontend/onnx_import/op/asinh.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@

#pragma once

#include <memory>

#include "core/node.hpp"
#include "ngraph/node.hpp"

Expand Down
2 changes: 2 additions & 0 deletions src/ngraph/frontend/onnx_import/op/atanh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
// limitations under the License.
//*****************************************************************************

#include <memory>

#include "atanh.hpp"
#include "ngraph/op/add.hpp"
#include "ngraph/op/constant.hpp"
Expand Down
2 changes: 0 additions & 2 deletions src/ngraph/frontend/onnx_import/op/atanh.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@

#pragma once

#include <memory>

#include "core/node.hpp"
#include "ngraph/node.hpp"

Expand Down
1 change: 1 addition & 0 deletions src/ngraph/frontend/onnx_import/op/average_pool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
// limitations under the License.
//*****************************************************************************

#include "average_pool.hpp"
#include "ngraph/node.hpp"
#include "ngraph/op/avg_pool.hpp"
#include "utils/pooling_factory.hpp"
Expand Down
7 changes: 3 additions & 4 deletions src/ngraph/frontend/onnx_import/op/batch_norm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,9 @@
#include <cstdint>
#include <memory>

#include "ngraph/frontend/onnx_import/core/null_node.hpp"
#include "ngraph/frontend/onnx_import/exceptions.hpp"
#include "ngraph/frontend/onnx_import/op/batch_norm.hpp"
#include "ngraph/node.hpp"
#include "batch_norm.hpp"
#include "core/null_node.hpp"
#include "exceptions.hpp"
#include "ngraph/op/batch_norm.hpp"

namespace ngraph
Expand Down
1 change: 1 addition & 0 deletions src/ngraph/frontend/onnx_import/op/batch_norm.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#pragma once

#include "core/node.hpp"
#include "ngraph/node.hpp"

namespace ngraph
{
Expand Down
5 changes: 2 additions & 3 deletions src/ngraph/frontend/onnx_import/op/constant.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@
// limitations under the License.
//*****************************************************************************

#include "ngraph/op/constant.hpp"
#include "core/node.hpp"
#include "constant.hpp"
#include "core/tensor.hpp"
#include "ngraph/node.hpp"
#include "ngraph/op/constant.hpp"

namespace ngraph
{
Expand Down
6 changes: 3 additions & 3 deletions src/ngraph/frontend/onnx_import/op/conv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@
#include <memory>
#include <vector>

#include "conv.hpp"
#include "exceptions.hpp"
#include "ngraph/builder/reshape.hpp"
#include "ngraph/frontend/onnx_import/exceptions.hpp"
#include "ngraph/frontend/onnx_import/op/conv.hpp"
#include "ngraph/frontend/onnx_import/utils/convpool.hpp"
#include "ngraph/op/add.hpp"
#include "ngraph/op/broadcast.hpp"
#include "ngraph/op/concat.hpp"
Expand All @@ -31,6 +30,7 @@
#include "ngraph/op/slice.hpp"
#include "ngraph/op/util/attr_types.hpp"
#include "ngraph/op/util/broadcasting.hpp"
#include "utils/convpool.hpp"

namespace ngraph
{
Expand Down
2 changes: 1 addition & 1 deletion src/ngraph/frontend/onnx_import/op/conv_integer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// limitations under the License.
//*****************************************************************************

#include "op/conv_integer.hpp"
#include "conv_integer.hpp"
#include "ngraph/builder/make_constant.hpp"
#include "ngraph/frontend/onnx_import/exceptions.hpp"
#include "ngraph/frontend/onnx_import/utils/convpool.hpp"
Expand Down
6 changes: 3 additions & 3 deletions src/ngraph/frontend/onnx_import/op/conv_transpose.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@
#include <memory>
#include <vector>

#include "conv_transpose.hpp"
#include "exceptions.hpp"
#include "ngraph/coordinate_diff.hpp"
#include "ngraph/frontend/onnx_import/exceptions.hpp"
#include "ngraph/frontend/onnx_import/op/conv_transpose.hpp"
#include "ngraph/frontend/onnx_import/utils/convpool.hpp"
#include "ngraph/op/add.hpp"
#include "ngraph/op/fused/group_conv_transpose.hpp"
#include "ngraph/op/util/attr_types.hpp"
#include "ngraph/op/util/broadcasting.hpp"
#include "ngraph/shape.hpp"
#include "utils/convpool.hpp"

namespace ngraph
{
Expand Down
2 changes: 1 addition & 1 deletion src/ngraph/frontend/onnx_import/op/dequantize_linear.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
#include <cstdint>
#include <memory>

#include "dequantize_linear.hpp"
#include "ngraph/axis_set.hpp"
#include "ngraph/builder/make_constant.hpp"
#include "ngraph/op/convert.hpp"
#include "ngraph/op/dequantize.hpp"
#include "ngraph/shape.hpp"
#include "quantize_linear.hpp"

namespace ngraph
{
Expand Down
2 changes: 2 additions & 0 deletions src/ngraph/frontend/onnx_import/op/div.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

#pragma once

#include <memory>

#include "core/node.hpp"
#include "ngraph/node.hpp"
#include "ngraph/op/divide.hpp"
Expand Down
3 changes: 1 addition & 2 deletions src/ngraph/frontend/onnx_import/op/elu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,10 @@
#include <memory>
#include <vector>

#include "elu.hpp"
#include "ngraph/op/constant.hpp"
#include "ngraph/op/fused/elu.hpp"

#include "elu.hpp"

namespace ngraph
{
namespace onnx_import
Expand Down
2 changes: 2 additions & 0 deletions src/ngraph/frontend/onnx_import/op/equal.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

#pragma once

#include <memory>

#include "core/node.hpp"
#include "ngraph/node.hpp"
#include "ngraph/op/equal.hpp"
Expand Down
1 change: 1 addition & 0 deletions src/ngraph/frontend/onnx_import/op/expand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

#include <cstddef>
#include <cstdint>
#include <memory>

#include "expand.hpp"
#include "ngraph/descriptor/output.hpp"
Expand Down
7 changes: 5 additions & 2 deletions src/ngraph/frontend/onnx_import/op/eye_like.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//*****************************************************************************
#include "eye_like.hpp"

#include <memory>

#include "exceptions.hpp"
#include "ngraph/frontend/onnx_import/utils/common.hpp"
#include "eye_like.hpp"
#include "utils/common.hpp"

namespace ngraph
{
Expand Down
2 changes: 0 additions & 2 deletions src/ngraph/frontend/onnx_import/op/flatten.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@

#pragma once

#include <memory>

#include "core/node.hpp"
#include "ngraph/node.hpp"

Expand Down
2 changes: 2 additions & 0 deletions src/ngraph/frontend/onnx_import/op/gather.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

#pragma once

#include <memory>

#include "core/node.hpp"
#include "ngraph/node.hpp"
#include "ngraph/op/gather.hpp"
Expand Down
1 change: 1 addition & 0 deletions src/ngraph/frontend/onnx_import/op/global_average_pool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
// limitations under the License.
//*****************************************************************************

#include "global_average_pool.hpp"
#include "ngraph/node.hpp"
#include "ngraph/op/avg_pool.hpp"
#include "utils/pooling_factory.hpp"
Expand Down
1 change: 1 addition & 0 deletions src/ngraph/frontend/onnx_import/op/global_max_pool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
// limitations under the License.
//*****************************************************************************

#include "global_max_pool.hpp"
#include "ngraph/node.hpp"
#include "ngraph/op/max_pool.hpp"
#include "utils/pooling_factory.hpp"
Expand Down
2 changes: 2 additions & 0 deletions src/ngraph/frontend/onnx_import/op/greater.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

#pragma once

#include <memory>

#include "core/node.hpp"
#include "ngraph/node.hpp"
#include "ngraph/op/greater.hpp"
Expand Down
1 change: 1 addition & 0 deletions src/ngraph/frontend/onnx_import/op/instance_norm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
//*****************************************************************************

#include <cstddef>
#include <memory>

#include "exceptions.hpp"
#include "instance_norm.hpp"
Expand Down
9 changes: 1 addition & 8 deletions src/ngraph/frontend/onnx_import/op/leaky_relu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,10 @@
#include <memory>

#include "exceptions.hpp"
#include "ngraph/node.hpp"
#include "ngraph/node.hpp"
#include "ngraph/op/broadcast.hpp"
#include "leaky_relu.hpp"
#include "ngraph/op/constant.hpp"
#include "ngraph/op/maximum.hpp"
#include "ngraph/op/multiply.hpp"
#include "ngraph/shape.hpp"

#include "core/node.hpp"
#include "leaky_relu.hpp"
#include "ngraph/op/util/broadcasting.hpp"

namespace ngraph
{
Expand Down
2 changes: 2 additions & 0 deletions src/ngraph/frontend/onnx_import/op/less.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

#pragma once

#include <memory>

#include "core/node.hpp"
#include "ngraph/node.hpp"
#include "ngraph/op/less.hpp"
Expand Down
4 changes: 1 addition & 3 deletions src/ngraph/frontend/onnx_import/op/log_softmax.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,8 @@

#include <memory>

#include "core/node.hpp"
#include "ngraph/node.hpp"
#include "log_softmax.hpp"
#include "ngraph/op/fused/log_softmax.hpp"
#include "utils/common.hpp"

namespace ngraph
{
Expand Down
2 changes: 0 additions & 2 deletions src/ngraph/frontend/onnx_import/op/log_softmax.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@

#pragma once

#include <memory>

#include "core/node.hpp"
#include "ngraph/node.hpp"

Expand Down
1 change: 1 addition & 0 deletions src/ngraph/frontend/onnx_import/op/lp_norm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

#include <cstddef>
#include <cstdint>
#include <memory>

#include "exceptions.hpp"
#include "lp_norm.hpp"
Expand Down
1 change: 1 addition & 0 deletions src/ngraph/frontend/onnx_import/op/lstm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <vector>

#include "exceptions.hpp"
#include "lstm.hpp"
#include "ngraph/builder/split.hpp"
#include "ngraph/frontend/onnx_import/op/lstm.hpp"
#include "ngraph/op/add.hpp"
Expand Down
2 changes: 2 additions & 0 deletions src/ngraph/frontend/onnx_import/op/matmul.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

#pragma once

#include <memory>

#include "core/node.hpp"
#include "ngraph/node.hpp"
#include "ngraph/op/fused/matmul.hpp"
Expand Down
Loading

0 comments on commit 9b56d08

Please sign in to comment.