diff --git a/src/common/transformations/include/ov_ops/type_relaxed.hpp b/src/common/transformations/include/ov_ops/type_relaxed.hpp index 6b72c757231..c0c37b2ebc0 100644 --- a/src/common/transformations/include/ov_ops/type_relaxed.hpp +++ b/src/common/transformations/include/ov_ops/type_relaxed.hpp @@ -88,9 +88,13 @@ protected: for (size_t i = 0; i < node.get_input_size(); ++i) { auto origin_input_type = get_origin_input_type(i); if (origin_input_type != element::undefined) { - OPENVINO_SUPPRESS_DEPRECATED_START - node.get_input_tensor(i).set_tensor_type(origin_input_type, node.get_input_partial_shape(i)); - OPENVINO_SUPPRESS_DEPRECATED_END + auto parameter = dynamic_cast(node.get_input_node_ptr(i)); + if (parameter != nullptr) { + parameter->set_element_type(origin_input_type); + } + if (parameter != nullptr) { + parameter->set_partial_shape(node.get_input_partial_shape(i)); + } } } } @@ -98,9 +102,13 @@ protected: void restore_input_data_types(Node& node, const element::TypeVector& old_input_types) { // Restore original input data types for (size_t i = 0; i < node.get_input_size(); ++i) { - OPENVINO_SUPPRESS_DEPRECATED_START - node.get_input_tensor(i).set_tensor_type(old_input_types[i], node.get_input_partial_shape(i)); - OPENVINO_SUPPRESS_DEPRECATED_END + auto parameter = dynamic_cast(node.get_input_node_ptr(i)); + if (parameter != nullptr) { + parameter->set_element_type(old_input_types[i]); + } + if (parameter != nullptr) { + parameter->set_partial_shape(node.get_input_partial_shape(i)); + } } if (m_original_output_data_types.empty()) { diff --git a/src/core/include/openvino/core/descriptor/tensor.hpp b/src/core/include/openvino/core/descriptor/tensor.hpp index 7ed18bfb759..b01378826bd 100644 --- a/src/core/include/openvino/core/descriptor/tensor.hpp +++ b/src/core/include/openvino/core/descriptor/tensor.hpp @@ -65,9 +65,6 @@ public: void set_names(const std::unordered_set& names); void add_names(const std::unordered_set& names); - OPENVINO_DEPRECATED("set_tensor_type() is deprecated. To change Tensor type please change the Parameter type") - void set_tensor_type(const element::Type& element_type, const PartialShape& pshape); - /// \brief sets lower bound value description void set_lower_value(const ov::Tensor& value); /// \brief sets upper bound value description diff --git a/src/core/src/descriptor/tensor.cpp b/src/core/src/descriptor/tensor.cpp index 1ee7417002a..08d08264172 100644 --- a/src/core/src/descriptor/tensor.cpp +++ b/src/core/src/descriptor/tensor.cpp @@ -35,14 +35,6 @@ ov::descriptor::Tensor::Tensor(const element::Type& element_type, m_name_it = m_names.cend(); } -OPENVINO_SUPPRESS_DEPRECATED_START -void ov::descriptor::Tensor::set_tensor_type(const element::Type& element_type, const PartialShape& pshape) { - m_element_type = element_type; - m_partial_shape = pshape; - m_shape_changed = true; -} -OPENVINO_SUPPRESS_DEPRECATED_END - void ov::descriptor::Tensor::invalidate_values() { m_upper_value = {}; m_lower_value = {}; diff --git a/src/core/src/node.cpp b/src/core/src/node.cpp index 70b18e710f4..4d088112581 100644 --- a/src/core/src/node.cpp +++ b/src/core/src/node.cpp @@ -254,9 +254,13 @@ void ov::Node::set_input_is_relevant_to_value(size_t i, bool relevant) { } void ov::Node::set_output_type(size_t i, const element::Type& element_type, const PartialShape& pshape) { - OPENVINO_SUPPRESS_DEPRECATED_START - get_output_descriptor(i).get_tensor_ptr()->set_tensor_type(element_type, pshape); - OPENVINO_SUPPRESS_DEPRECATED_END + auto parameter = dynamic_cast(get_input_node_ptr(i)); + if (parameter != nullptr) { + parameter->set_element_type(element_type); + } + if (parameter != nullptr) { + parameter->set_partial_shape(pshape); + } } std::string ov::Node::description() const {