Skip to content

Commit

Permalink
Hide tensor legacy API to Dev API
Browse files Browse the repository at this point in the history
  • Loading branch information
ilya-lavrenov committed Feb 8, 2024
1 parent 1cf81e8 commit 2cca9b6
Show file tree
Hide file tree
Showing 14 changed files with 37 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/common/snippets/src/op/subgraph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
#include "snippets/pass/manager.hpp"
#include "openvino/pass/constant_folding.hpp"
#include "ov_ops/type_relaxed.hpp"
#include <openvino/pass/serialize.hpp>
#include "openvino/pass/serialize.hpp"

#include <algorithm>
#include <memory>
Expand Down
1 change: 1 addition & 0 deletions src/common/transformations/include/ov_ops/type_relaxed.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include "openvino/op/convert.hpp"
#include "openvino/op/parameter.hpp"
#include "openvino/runtime/tensor.hpp"
#include "openvino/core/descriptor_tensor.hpp"
#include "transformations_visibility.hpp"

namespace ov {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include "openvino/pass/graph_rewrite.hpp"
#include "transformations/rt_info/attributes.hpp"
#include "transformations_visibility.hpp"
#include "openvino/core/descriptor_tensor.hpp"

namespace ov {
namespace op {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include "openvino/op/tensor_iterator.hpp"
#include "openvino/pass/pattern/op/wrap_type.hpp"
#include "transformations/utils/utils.hpp"
#include "openvino/core/descriptor_tensor.hpp"

bool ov::pass::UnrollTensorIterator::run_on_model(const std::shared_ptr<ov::Model>& f) {
RUN_ON_FUNCTION_SCOPE(UnrollTensorIterator);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

#include "itt.hpp"
#include "openvino/core/dimension_tracker.hpp"
#include "openvino/core/descriptor_tensor.hpp"
#include "openvino/op/reshape.hpp"
#include "openvino/op/util/symbolic_info.hpp"
#include "openvino/pass/manager.hpp"
Expand Down
25 changes: 25 additions & 0 deletions src/core/dev_api/openvino/core/descriptor_tensor.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// Copyright (C) 2018-2023 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//

#include "openvino/core/descriptor/tensor.hpp"

namespace ov {
namespace descriptor {

// To change Tensor element type please change the Parameter type.
void set_element_type(Tensor& tensor, const element::Type& elemenet_type);

// To change Tensor type please change the Parameter type.
void set_tensor_type(Tensor& tensor, const element::Type& element_type, const PartialShape& pshape);

OPENVINO_DEPRECATED("get_ov_tensor_legacy_name() is deprecated. Please don't use this function.")
OPENVINO_API
std::string get_ov_tensor_legacy_name(const Tensor& tensor);

OPENVINO_DEPRECATED("set_ov_tensor_legacy_name() is deprecated. Please don't use this function.")
OPENVINO_API
void set_ov_tensor_legacy_name(Tensor& tensor, const std::string& tensor_name);

} // namespace descriptor
} // namespace ov
14 changes: 0 additions & 14 deletions src/core/include/openvino/core/descriptor/tensor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,6 @@ namespace descriptor {

class Tensor;

OPENVINO_DEPRECATED("get_ov_tensor_legacy_name() is deprecated. Please don't use this function.")
OPENVINO_API
std::string get_ov_tensor_legacy_name(const Tensor& tensor);

OPENVINO_DEPRECATED("set_ov_tensor_legacy_name() is deprecated. Please don't use this function.")
OPENVINO_API
void set_ov_tensor_legacy_name(Tensor& tensor, const std::string& tensor_name);

// To change Tensor element type please change the Parameter type.
void set_element_type(Tensor& tensor, const element::Type& elemenet_type);

// To change Tensor type please change the Parameter type.
void set_tensor_type(Tensor& tensor, const element::Type& element_type, const PartialShape& pshape);

/// \brief Compile-time descriptor of a first-class value that is a tensor.
class OPENVINO_API Tensor {
public:
Expand Down
1 change: 1 addition & 0 deletions src/core/src/descriptor/tensor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
//

#include "openvino/core/descriptor/tensor.hpp"
#include "openvino/core/descriptor_tensor.hpp"

#include "openvino/core/except.hpp"
#include "openvino/core/node.hpp"
Expand Down
1 change: 1 addition & 0 deletions src/core/src/graph_util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <vector>

#include "openvino/core/descriptor/tensor.hpp"
#include "openvino/core/descriptor_tensor.hpp"
#include "openvino/core/rt_info.hpp"
#include "openvino/op/broadcast.hpp"
#include "openvino/op/constant.hpp"
Expand Down
1 change: 1 addition & 0 deletions src/core/src/node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include "atomic_guard.hpp"
#include "bound_evaluate.hpp"
#include "itt.hpp"
#include "openvino/core/descriptor_tensor.hpp"
#include "openvino/core/descriptor/input.hpp"
#include "openvino/core/rt_info.hpp"
#include "openvino/core/shape_util.hpp"
Expand Down
1 change: 1 addition & 0 deletions src/core/src/node_output.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include "openvino/core/node.hpp"
#include "openvino/core/rt_info.hpp"
#include "openvino/op/parameter.hpp"
#include "openvino/core/descriptor_tensor.hpp"

namespace ov {
Output<Node>::Output(Node* node, size_t index) : m_index(index) {
Expand Down
1 change: 1 addition & 0 deletions src/core/src/preprocess/preprocess_impls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

#include "preprocess_impls.hpp"

#include "openvino/core/descriptor_tensor.hpp"
#include "layout_utils.hpp"

namespace ov {
Expand Down
1 change: 1 addition & 0 deletions src/frontends/onnx/frontend/src/core/graph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include "exceptions.hpp"
#include "onnx_framework_node.hpp"
#include "openvino/core/node.hpp"
#include "openvino/core/descriptor_tensor.hpp"
#include "openvino/frontend/exception.hpp"
#include "openvino/frontend/onnx/extension/conversion.hpp"
#include "openvino/frontend/onnx/node_context.hpp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

#include "subgraph_simple.hpp"
#include "common_test_utils/data_utils.hpp"
#include "openvino/core/descriptor_tensor.hpp"
#include <snippets/op/subgraph.hpp>

namespace ov {
Expand Down

0 comments on commit 2cca9b6

Please sign in to comment.