Deprecate util functions in public api (#16716)
* Deprecate util functions in public api * Add deprecation suppression for usage inside openvino * Fix clang-format * Fix1
This commit is contained in:
@@ -98,6 +98,7 @@ public:
|
||||
if (auto_pad == ov::op::PadType::SAME_UPPER || auto_pad == ov::op::PadType::SAME_LOWER) {
|
||||
pads_begin.clear();
|
||||
pads_end.clear();
|
||||
OPENVINO_SUPPRESS_DEPRECATED_START
|
||||
ngraph::try_apply_auto_padding(input_layout.get_partial_shape(),
|
||||
kernel,
|
||||
stride,
|
||||
@@ -105,6 +106,7 @@ public:
|
||||
auto_pad,
|
||||
pads_end,
|
||||
pads_begin);
|
||||
OPENVINO_SUPPRESS_DEPRECATED_END
|
||||
}
|
||||
if (auto_pad == ov::op::PadType::VALID) {
|
||||
pads_begin = ov::CoordinateDiff(pads_begin.size(), 0);
|
||||
|
||||
@@ -224,6 +224,7 @@ std::vector<layout> pooling_inst::calc_output_layouts(pooling_node const& /*node
|
||||
if (auto_pad == ov::op::PadType::SAME_UPPER || auto_pad == ov::op::PadType::SAME_LOWER) {
|
||||
pads_begin.clear();
|
||||
pads_end.clear();
|
||||
OPENVINO_SUPPRESS_DEPRECATED_START
|
||||
ngraph::try_apply_auto_padding(input_shape,
|
||||
kernel_size,
|
||||
stride,
|
||||
@@ -231,6 +232,7 @@ std::vector<layout> pooling_inst::calc_output_layouts(pooling_node const& /*node
|
||||
auto_pad,
|
||||
pads_end,
|
||||
pads_begin);
|
||||
OPENVINO_SUPPRESS_DEPRECATED_END
|
||||
}
|
||||
if (auto_pad == ov::op::PadType::VALID) {
|
||||
pads_begin = ov::CoordinateDiff(pads_begin.size(), 0);
|
||||
|
||||
@@ -29,7 +29,9 @@ static void CreateCumSumOp(Program& p, const std::shared_ptr<ngraph::op::v0::Cum
|
||||
}
|
||||
axis = axes_constant->cast_vector<int64_t>()[0];
|
||||
}
|
||||
OPENVINO_SUPPRESS_DEPRECATED_START
|
||||
axis = ov::normalize_axis(op.get(), axis, op->get_input_partial_shape(0).rank());
|
||||
OPENVINO_SUPPRESS_DEPRECATED_END
|
||||
|
||||
auto primitive = cldnn::cum_sum(layerName,
|
||||
inputs[0],
|
||||
|
||||
@@ -33,7 +33,9 @@ void createDft(Program& p,
|
||||
if (direction != cldnn::dft_direction::forward || mode != cldnn::dft_mode::real) {
|
||||
--axis_correction;
|
||||
}
|
||||
OPENVINO_SUPPRESS_DEPRECATED_START
|
||||
ov::normalize_axes(op.get(), axis_correction, axes);
|
||||
OPENVINO_SUPPRESS_DEPRECATED_END
|
||||
|
||||
std::vector<int64_t> signal_size;
|
||||
if (op->get_input_size() == 3) {
|
||||
|
||||
@@ -38,10 +38,14 @@ static void CreateInterpolateOp(Program& p, const std::shared_ptr<ngraph::op::v4
|
||||
OPENVINO_ASSERT(axes_constant, "Unsupported parameter node type in ", op->get_friendly_name(), " (", op->get_type_name(), ")");
|
||||
|
||||
axes = axes_constant->cast_vector<int64_t>();
|
||||
OPENVINO_SUPPRESS_DEPRECATED_START
|
||||
ov::normalize_axes(op.get(), inputRank, axes);
|
||||
OPENVINO_SUPPRESS_DEPRECATED_END
|
||||
} else {
|
||||
for (size_t i = 0; i < inputRank; ++i) {
|
||||
OPENVINO_SUPPRESS_DEPRECATED_START
|
||||
axes.push_back(ov::normalize_axis(op.get(), i, inputRank));
|
||||
OPENVINO_SUPPRESS_DEPRECATED_END
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -48,7 +48,9 @@ static void CreateMVNOp(Program& p, const std::shared_ptr<ngraph::op::v6::MVN>&
|
||||
IE_THROW() << "Unsupported parameter nodes type in " << op->get_friendly_name() << " (" << op->get_type_name() << ")";
|
||||
|
||||
std::vector<int64_t> axes = inConst->cast_vector<int64_t>();
|
||||
OPENVINO_SUPPRESS_DEPRECATED_START
|
||||
ov::normalize_axes(op.get(), op->get_output_partial_shape(0).size(), axes);
|
||||
OPENVINO_SUPPRESS_DEPRECATED_END
|
||||
|
||||
const size_t chanelAxis = 1;
|
||||
bool across_channels = std::find(axes.begin(), axes.end(), chanelAxis) != axes.end();
|
||||
|
||||
@@ -22,7 +22,9 @@ static void CreateScatterElementsUpdateOp(Program& p, const std::shared_ptr<ngra
|
||||
if (!axes_constant) {
|
||||
OPENVINO_ASSERT("Unsupported parameter nodes type in ", op->get_friendly_name(), " (", op->get_type_name(), ")");
|
||||
}
|
||||
OPENVINO_SUPPRESS_DEPRECATED_START
|
||||
int64_t axis = ov::normalize_axis(op.get(), axes_constant->cast_vector<int64_t>()[0], op->get_input_partial_shape(0).rank());
|
||||
OPENVINO_SUPPRESS_DEPRECATED_END
|
||||
|
||||
auto primitive = cldnn::scatter_elements_update(layerName,
|
||||
inputs[0],
|
||||
|
||||
@@ -18,7 +18,9 @@ static void CreateShuffleChannelsOp(Program& p, const std::shared_ptr<ngraph::op
|
||||
std::string layerName = layer_type_name_ID(op);
|
||||
|
||||
int32_t group = op->get_group();
|
||||
OPENVINO_SUPPRESS_DEPRECATED_START
|
||||
int64_t axis = ov::normalize_axis(op.get(), op->get_axis(), op->get_input_partial_shape(0).rank());
|
||||
OPENVINO_SUPPRESS_DEPRECATED_END
|
||||
|
||||
auto shuffleChannelsPrim = cldnn::shuffle_channels(layerName,
|
||||
inputs[0],
|
||||
|
||||
@@ -29,7 +29,9 @@ static void CreateSoftmaxOp(Program& p, const std::shared_ptr<ngraph::op::v8::So
|
||||
auto inputs = p.GetInputInfo(op);
|
||||
std::string layerName = layer_type_name_ID(op);
|
||||
|
||||
OPENVINO_SUPPRESS_DEPRECATED_START
|
||||
int64_t axis = ov::normalize_axis(op.get(), op->get_axis(), op->get_input_partial_shape(0).rank());
|
||||
OPENVINO_SUPPRESS_DEPRECATED_END
|
||||
|
||||
auto softmaxPrim = cldnn::softmax(layerName,
|
||||
inputs[0],
|
||||
@@ -43,7 +45,9 @@ static void CreateLogSoftmaxOp(Program& p, const std::shared_ptr<ngraph::op::v5:
|
||||
std::string layerName = layer_type_name_ID(op);
|
||||
std::string layerNameSoftmax = layer_type_name_ID(op) + "_softmax";
|
||||
|
||||
OPENVINO_SUPPRESS_DEPRECATED_START
|
||||
int64_t axis = ov::normalize_axis(op.get(), op->get_axis(), op->get_input_partial_shape(0).rank());
|
||||
OPENVINO_SUPPRESS_DEPRECATED_END
|
||||
|
||||
auto softmaxPrim = cldnn::softmax(layerNameSoftmax,
|
||||
inputs[0],
|
||||
|
||||
Reference in New Issue
Block a user