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:
Oleg Pipikin
2023-04-06 04:32:04 +02:00
committed by GitHub
parent 6e97c82c97
commit 1c564226f3
218 changed files with 811 additions and 23 deletions

View File

@@ -99,9 +99,11 @@ bool ConcatTransformation::transform(TransformationContext& context, ngraph::pat
[](const FakeQuantizeDequantization& value) { return !value.isLowPrecision(); });
bool DqWithDifferentPrecision = someDqInLowPrecision && someDqInFpPrecision;
OPENVINO_SUPPRESS_DEPRECATED_START
const auto axis = ngraph::normalize_axis(concat->get_friendly_name(),
concat->get_axis(),
concat->get_output_partial_shape(0).rank());
OPENVINO_SUPPRESS_DEPRECATED_END
OutputVector dataNodes;
NodeVector convertNodes;
@@ -214,7 +216,9 @@ bool ConcatTransformation::canBeTransformed(const TransformationContext& context
return false;
}
OPENVINO_SUPPRESS_DEPRECATED_START
const size_t normalizedAxis = ngraph::normalize_axis(concat->get_friendly_name(), axis, outRank);
OPENVINO_SUPPRESS_DEPRECATED_END
if (outPShape[normalizedAxis].is_dynamic()) {
return false;
}

View File

@@ -42,7 +42,9 @@ std::shared_ptr<opset1::Constant> gatherDeqConstant(
}
const int64_t axis = ov::as_type_ptr<opset1::Constant>(gather->get_input_node_shared_ptr(2))->cast_vector<int64_t>()[0];
OPENVINO_SUPPRESS_DEPRECATED_START
const size_t normalizedAxis = normalize_axis(gather->get_friendly_name(), axis, gather->get_input_partial_shape(0).rank());
OPENVINO_SUPPRESS_DEPRECATED_END
// Dequantization channel matches with gather axis
if (constantShape[normalizedAxis] != 1ul) {
@@ -165,7 +167,10 @@ bool GatherTransformation::canBeTransformed(const TransformationContext& context
}
}
const int64_t axis = axisConstant->cast_vector<int64_t>()[0];
OPENVINO_SUPPRESS_DEPRECATED_START
const size_t normalizedAxis = normalize_axis(operation->get_friendly_name(), axis, operation->get_input_partial_shape(0).rank());
OPENVINO_SUPPRESS_DEPRECATED_END
if (constantShape[normalizedAxis] != 1ul) {
const auto indicesConstant = ov::as_type_ptr<opset1::Constant>(operation->get_input_node_shared_ptr(1));
if (indicesConstant == nullptr)

View File

@@ -48,7 +48,9 @@ bool ReduceBaseTransformation::canBeTransformed(const TransformationContext& con
return false;
}
OPENVINO_SUPPRESS_DEPRECATED_START
const std::vector<size_t> axes = ngraph::normalize_axes(reduce->get_friendly_name(), constData, inputRank);
OPENVINO_SUPPRESS_DEPRECATED_END
const auto deqByReducedConst = [&](const std::shared_ptr<Node>& eltwise) {
const auto constShape = eltwise->get_shape();

View File

@@ -48,10 +48,12 @@ bool ShuffleChannelsTransformation::transform(TransformationContext& context, ng
if (shape_size(constShape) == 1ul) {
return NetworkHelper::toScalar(normalizedConst);
} else {
OPENVINO_SUPPRESS_DEPRECATED_START
const size_t normalizedAxis = ngraph::normalize_axis(
shuffleChannels->get_friendly_name(),
shuffleChannels->get_axis(),
shuffleChannels->get_input_partial_shape(0).rank());
OPENVINO_SUPPRESS_DEPRECATED_END
if (constShape[normalizedAxis] == 1ul) {
return normalizedConst;

View File

@@ -46,7 +46,9 @@ bool SplitTransformation::transform(TransformationContext& context, ngraph::patt
ngraph::copy_runtime_info(split, newSplit);
const int64_t axis = ov::as_type_ptr<opset1::Constant>(split->get_input_node_shared_ptr(1))->cast_vector<int64_t>()[0];
OPENVINO_SUPPRESS_DEPRECATED_START
const size_t normalizedAxis = normalize_axis(split->get_friendly_name(), axis, split->get_input_partial_shape(0).rank());
OPENVINO_SUPPRESS_DEPRECATED_END
const size_t outputSize = newSplit->get_output_size();
const auto splitConstant = [&](const std::shared_ptr<Node> operation) {