Skip to content

Commit ce876c4

Browse files
praaszilya-lavrenovt-jankowski
authored
Remove ngraph/op API (openvinotoolkit#22394)
Co-authored-by: Ilya Lavrenov <ilya.lavrenov@intel.com> Co-authored-by: Tomasz Jankowski <tomasz1.jankowski@intel.com>
1 parent 2e6d061 commit ce876c4

32 files changed

+322
-512
lines changed

src/core/include/ngraph/op/concat.hpp

-28
This file was deleted.

src/core/include/ngraph/op/divide.hpp

-25
This file was deleted.

src/core/include/ngraph/op/parameter.hpp

-27
This file was deleted.

src/core/include/ngraph/op/split.hpp

-28
This file was deleted.

src/core/include/ngraph/op/util/attr_types.hpp

-36
This file was deleted.

src/core/include/ngraph/op/util/op_types.hpp

-35
This file was deleted.

src/core/include/ngraph/partial_shape.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
# endif
1515
#endif
1616

17-
#include "ngraph/op/util/attr_types.hpp"
1817
#include "ngraph/rank.hpp"
1918
#include "ngraph/shape.hpp"
2019
#include "openvino/core/partial_shape.hpp"
20+
#include "openvino/op/util/attr_types.hpp"
2121

2222
namespace ngraph {
2323
using ov::PartialShape;

src/core/include/ngraph/validation_util.hpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
#include <tuple>
1818

1919
#include "ngraph/coordinate_diff.hpp"
20-
#include "ngraph/op/util/attr_types.hpp"
2120
#include "openvino/core/validation_util.hpp"
21+
#include "openvino/op/util/attr_types.hpp"
2222
#include "openvino/op/util/variable_context.hpp"
2323

2424
namespace ngraph {
@@ -70,7 +70,7 @@ OPENVINO_DEPRECATED("The nGraph API is deprecated and will be removed in the 202
7070
"https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
7171
void validate_conv_params_spatial_dimensions(const Node* node,
7272
const size_t num_spatial_dims,
73-
const op::PadType auto_pad,
73+
const ov::op::PadType auto_pad,
7474
Strides& strides,
7575
Strides& dilations,
7676
CoordinateDiff& pads_begin,
@@ -155,7 +155,7 @@ void infer_conv_backprop_auto_padding(const Shape& input_data_shape,
155155
const Shape& output_shape,
156156
const Strides& strides,
157157
const Strides& dilations,
158-
const op::PadType auto_pad_type,
158+
const ov::op::PadType auto_pad_type,
159159
const CoordinateDiff& output_padding,
160160
CoordinateDiff& pads_begin,
161161
CoordinateDiff& pads_end);

src/core/src/specialize_function.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
#include "ngraph/specialize_function.hpp"
66

77
#include "itt.hpp"
8-
#include "ngraph/op/util/op_types.hpp"
98
#include "openvino/op/constant.hpp"
109
#include "openvino/op/parameter.hpp"
10+
#include "openvino/op/util/op_types.hpp"
1111

1212
using namespace ngraph;
1313
OPENVINO_SUPPRESS_DEPRECATED_START;
@@ -46,7 +46,7 @@ std::shared_ptr<ov::Model> ngraph::specialize_function(std::shared_ptr<ov::Model
4646
}
4747

4848
for (auto old_node : f->get_ordered_ops()) {
49-
if (op::is_parameter(old_node)) {
49+
if (ov::op::util::is_parameter(old_node)) {
5050
continue;
5151
}
5252

src/core/src/validation_util.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ ov::PartialShape infer_windowed_reduction_output_shape(const Node* node,
202202

203203
void validate_conv_params_spatial_dimensions(const Node* node,
204204
const size_t num_spatial_dims,
205-
const op::PadType auto_pad,
205+
const ov::op::PadType auto_pad,
206206
Strides& strides,
207207
Strides& dilations,
208208
CoordinateDiff& pads_begin,
@@ -213,10 +213,10 @@ void validate_conv_params_spatial_dimensions(const Node* node,
213213
if (dilations.size() == 0) {
214214
dilations = Strides(num_spatial_dims, 1);
215215
}
216-
if (pads_begin.size() == 0 || auto_pad == op::PadType::VALID) {
216+
if (pads_begin.size() == 0 || auto_pad == ov::op::PadType::VALID) {
217217
pads_begin = CoordinateDiff(num_spatial_dims, 0);
218218
}
219-
if (pads_end.size() == 0 || auto_pad == op::PadType::VALID) {
219+
if (pads_end.size() == 0 || auto_pad == ov::op::PadType::VALID) {
220220
pads_end = CoordinateDiff(num_spatial_dims, 0);
221221
}
222222
NODE_VALIDATION_CHECK(node,
@@ -481,11 +481,11 @@ void opset1::infer_conv_backprop_auto_padding(const Shape& input_data_shape,
481481
const Shape& output_shape,
482482
const Strides& strides,
483483
const Strides& dilations,
484-
const op::PadType auto_pad_type,
484+
const ov::op::PadType auto_pad_type,
485485
const CoordinateDiff& output_padding,
486486
CoordinateDiff& pads_begin,
487487
CoordinateDiff& pads_end) {
488-
OPENVINO_ASSERT(auto_pad_type == op::PadType::SAME_UPPER || auto_pad_type == op::PadType::SAME_LOWER);
488+
OPENVINO_ASSERT(auto_pad_type == ov::op::PadType::SAME_UPPER || auto_pad_type == ov::op::PadType::SAME_LOWER);
489489

490490
size_t num_spatial_dims = input_data_shape.size();
491491
OPENVINO_ASSERT(filters_shape.size() == num_spatial_dims && strides.size() == num_spatial_dims &&
@@ -500,7 +500,7 @@ void opset1::infer_conv_backprop_auto_padding(const Shape& input_data_shape,
500500
static_cast<int>(strides[i] * (input_data_shape[i] - 1) + dilations[i] * (filters_shape[i] - 1) + 1 -
501501
output_shape[i] + output_padding[i]),
502502
0);
503-
if (auto_pad_type != op::PadType::SAME_UPPER) {
503+
if (auto_pad_type != ov::op::PadType::SAME_UPPER) {
504504
pads_begin[i] = total_padding / 2;
505505
pads_end[i] = total_padding - pads_begin[i];
506506
} else {

src/frontends/onnx/frontend/src/op/scan.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include "openvino/op/squeeze.hpp"
1313
#include "openvino/op/tensor_iterator.hpp"
1414
#include "openvino/op/unsqueeze.hpp"
15+
#include "openvino/op/util/op_types.hpp"
1516

1617
using namespace ov::op;
1718

src/frontends/onnx/frontend/src/op/upsample.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#include "default_opset.hpp"
1010
#include "exceptions.hpp"
11-
#include "ngraph/op/util/op_types.hpp"
11+
#include "openvino/op/util/op_types.hpp"
1212

1313
OPENVINO_SUPPRESS_DEPRECATED_START
1414
namespace ngraph {

src/frontends/onnx/tests/onnx_editor.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ InputTypePred element_type_is(const ov::element::Type et) {
2929
};
3030
}
3131

32-
std::shared_ptr<op::v0::Parameter> find_input(const ParameterVector& inputs, const std::string& name) {
32+
std::shared_ptr<op::v0::Parameter> find_input(const ov::ParameterVector& inputs, const std::string& name) {
3333
const auto input_pos =
34-
std::find_if(std::begin(inputs), std::end(inputs), [&name](const ParameterVector::value_type i) {
34+
std::find_if(std::begin(inputs), std::end(inputs), [&name](const ov::ParameterVector::value_type i) {
3535
return i->get_friendly_name() == name;
3636
});
3737

0 commit comments

Comments
 (0)