[Remove APIs] remove api set_tensor_type()

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>
This commit is contained in:
Zhai, Xuejun
2023-03-09 11:36:22 +08:00
parent 33ebb61977
commit 96f89e222d
4 changed files with 21 additions and 20 deletions

View File

@@ -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<ov::op::v0::Parameter*>(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<ov::op::v0::Parameter*>(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()) {

View File

@@ -65,9 +65,6 @@ public:
void set_names(const std::unordered_set<std::string>& names);
void add_names(const std::unordered_set<std::string>& 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

View File

@@ -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 = {};

View File

@@ -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<ov::op::v0::Parameter*>(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 {