Remove ngraph_visibility.hpp / deprecated.hpp / check.hpp (#22520)
* Remove ngraph visibility * Remove ngraph deprecated * Remove ngraph check * Fix clang-format
This commit is contained in:
parent
8225e79413
commit
1e3039f1d0
|
|
@ -44,7 +44,7 @@ static constexpr char pcSimpleSort[] = "simple_sort";
|
|||
/**
|
||||
* @brief Unicode string wrappers
|
||||
*/
|
||||
#if defined(ENABLE_UNICODE_PATH_SUPPORT) && defined(_WIN32)
|
||||
#if defined(OPENVINO_ENABLE_UNICODE_PATH_SUPPORT) && defined(_WIN32)
|
||||
# define tchar wchar_t
|
||||
# define tstring std::wstring
|
||||
# define tmain wmain
|
||||
|
|
@ -56,7 +56,7 @@ static constexpr char pcSimpleSort[] = "simple_sort";
|
|||
# define TSTRING2STRING(tstr) tstr
|
||||
#endif
|
||||
|
||||
#if defined(ENABLE_UNICODE_PATH_SUPPORT) && defined(_WIN32)
|
||||
#if defined(OPENVINO_ENABLE_UNICODE_PATH_SUPPORT) && defined(_WIN32)
|
||||
|
||||
/**
|
||||
* @brief Convert wstring to string
|
||||
|
|
|
|||
|
|
@ -19,7 +19,6 @@
|
|||
#include <set>
|
||||
#include <vector>
|
||||
|
||||
#include "ngraph/ngraph_visibility.hpp"
|
||||
#include "openvino/core/axis_set.hpp"
|
||||
|
||||
namespace ngraph {
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@
|
|||
#include <ostream>
|
||||
#include <vector>
|
||||
|
||||
#include "ngraph/ngraph_visibility.hpp"
|
||||
#include "openvino/core/axis_vector.hpp"
|
||||
|
||||
namespace ngraph {
|
||||
|
|
|
|||
|
|
@ -1,36 +0,0 @@
|
|||
// Copyright (C) 2018-2023 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#if !defined(IN_OV_COMPONENT) && !defined(NGRAPH_LEGACY_HEADER_INCLUDED)
|
||||
# define NGRAPH_LEGACY_HEADER_INCLUDED
|
||||
# ifdef _MSC_VER
|
||||
# pragma message( \
|
||||
"The nGraph API is deprecated and will be removed in the 2024.0 release. For instructions on transitioning to the new API, please refer to https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
|
||||
# else
|
||||
# warning("The nGraph API is deprecated and will be removed in the 2024.0 release. For instructions on transitioning to the new API, please refer to https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#include <exception>
|
||||
#include <sstream>
|
||||
#include <vector>
|
||||
|
||||
#include "openvino/core/except.hpp"
|
||||
|
||||
namespace ngraph {
|
||||
using ov::write_all_to_stream;
|
||||
|
||||
using CheckFailure = ov::AssertFailure;
|
||||
} // namespace ngraph
|
||||
|
||||
#define NGRAPH_CHECK_HELPER2(exc_class, ctx, check, ...) OPENVINO_ASSERT_HELPER2(exc_class, ctx, check, __VA_ARGS__)
|
||||
|
||||
#define NGRAPH_CHECK_HELPER1(exc_class, ctx, check) OPENVINO_ASSERT_HELPER1(exc_class, ctx, check)
|
||||
|
||||
#define NGRAPH_CHECK(...) OPENVINO_ASSERT(__VA_ARGS__)
|
||||
|
||||
#define NGRAPH_UNREACHABLE(...) NGRAPH_CHECK(false, "Unreachable: ", __VA_ARGS__)
|
||||
#define NGRAPH_CHECK_HELPER(exc_class, ctx, ...) OPENVINO_ASSERT_HELPER(exc_class, ctx, __VA_ARGS__)
|
||||
|
|
@ -18,7 +18,6 @@
|
|||
#include <ostream>
|
||||
#include <vector>
|
||||
|
||||
#include "ngraph/ngraph_visibility.hpp"
|
||||
#include "openvino/core/coordinate_diff.hpp"
|
||||
|
||||
namespace ngraph {
|
||||
|
|
|
|||
|
|
@ -1,26 +0,0 @@
|
|||
// Copyright (C) 2018-2023 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#if !defined(IN_OV_COMPONENT) && !defined(NGRAPH_LEGACY_HEADER_INCLUDED)
|
||||
# define NGRAPH_LEGACY_HEADER_INCLUDED
|
||||
# ifdef _MSC_VER
|
||||
# pragma message( \
|
||||
"The nGraph API is deprecated and will be removed in the 2024.0 release. For instructions on transitioning to the new API, please refer to https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
|
||||
# else
|
||||
# warning("The nGraph API is deprecated and will be removed in the 2024.0 release. For instructions on transitioning to the new API, please refer to https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#include "openvino/core/deprecated.hpp"
|
||||
|
||||
#define NGRAPH_DEPRECATED(msg) OPENVINO_DEPRECATED(msg)
|
||||
#define NGRAPH_ENUM_DEPRECATED(msg) OPENVINO_ENUM_DEPRECATED(msg)
|
||||
#define NGRAPH_SUPPRESS_DEPRECATED_START OPENVINO_SUPPRESS_DEPRECATED_START
|
||||
#define NGRAPH_SUPPRESS_DEPRECATED_END OPENVINO_SUPPRESS_DEPRECATED_END
|
||||
#define NGRAPH_API_DEPRECATED \
|
||||
OPENVINO_DEPRECATED("The nGraph API is deprecated and will be removed in the 2024.0 release. " \
|
||||
"For instructions on transitioning to the new API, please refer to " \
|
||||
"https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
|
||||
|
|
@ -14,7 +14,6 @@
|
|||
# endif
|
||||
#endif
|
||||
|
||||
#include "ngraph/check.hpp"
|
||||
#include "openvino/core/enum_names.hpp"
|
||||
|
||||
namespace ngraph {
|
||||
|
|
|
|||
|
|
@ -15,24 +15,30 @@
|
|||
#endif
|
||||
|
||||
#include <cstdint>
|
||||
#include <ngraph/ngraph_visibility.hpp>
|
||||
#include <string>
|
||||
|
||||
#include "ngraph/deprecated.hpp"
|
||||
#include "openvino/core/core_visibility.hpp"
|
||||
#include "openvino/core/deprecated.hpp"
|
||||
|
||||
namespace ngraph {
|
||||
/// \brief Get the names environment variable as a string.
|
||||
/// \param env_var The string name of the environment variable to get.
|
||||
/// \return Returns string by value or an empty string if the environment
|
||||
/// variable is not set.
|
||||
NGRAPH_API_DEPRECATED NGRAPH_API std::string getenv_string(const char* env_var);
|
||||
OPENVINO_DEPRECATED("The nGraph API is deprecated and will be removed in the 2024.0 release. "
|
||||
"For instructions on transitioning to the new API, please refer to "
|
||||
"https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
|
||||
OPENVINO_API std::string getenv_string(const char* env_var);
|
||||
|
||||
/// \brief Get the names environment variable as an integer. If the value is not a
|
||||
/// valid integer then an exception is thrown.
|
||||
/// \param env_var The string name of the environment variable to get.
|
||||
/// \param default_value The value to return if the environment variable is not set.
|
||||
/// \return Returns value or default_value if the environment variable is not set.
|
||||
NGRAPH_API_DEPRECATED NGRAPH_API int32_t getenv_int(const char* env_var, int32_t default_value = -1);
|
||||
OPENVINO_DEPRECATED("The nGraph API is deprecated and will be removed in the 2024.0 release. "
|
||||
"For instructions on transitioning to the new API, please refer to "
|
||||
"https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
|
||||
OPENVINO_API int32_t getenv_int(const char* env_var, int32_t default_value = -1);
|
||||
|
||||
/// \brief Get the names environment variable as a boolean. If the value is not a
|
||||
/// valid boolean then an exception is thrown. Valid booleans are one of
|
||||
|
|
@ -42,5 +48,8 @@ NGRAPH_API_DEPRECATED NGRAPH_API int32_t getenv_int(const char* env_var, int32_t
|
|||
/// \param env_var The string name of the environment variable to get.
|
||||
/// \param default_value The value to return if the environment variable is not set.
|
||||
/// \return Returns the boolean value of the environment variable.
|
||||
NGRAPH_API_DEPRECATED NGRAPH_API bool getenv_bool(const char* env_var, bool default_value = false);
|
||||
OPENVINO_DEPRECATED("The nGraph API is deprecated and will be removed in the 2024.0 release. "
|
||||
"For instructions on transitioning to the new API, please refer to "
|
||||
"https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
|
||||
OPENVINO_API bool getenv_bool(const char* env_var, bool default_value = false);
|
||||
} // namespace ngraph
|
||||
|
|
|
|||
|
|
@ -18,8 +18,8 @@
|
|||
#include <stack>
|
||||
#include <utility>
|
||||
|
||||
#include "ngraph/deprecated.hpp"
|
||||
#include "ngraph/shape.hpp"
|
||||
#include "openvino/core/deprecated.hpp"
|
||||
#include "openvino/core/node.hpp"
|
||||
#include "openvino/core/type/element_type_traits.hpp"
|
||||
|
||||
|
|
@ -28,8 +28,10 @@ namespace ngraph {
|
|||
///
|
||||
///
|
||||
template <typename V>
|
||||
class NGRAPH_API_DEPRECATED Evaluator {
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
class OPENVINO_DEPRECATED("The nGraph API is deprecated and will be removed in the 2024.0 release. "
|
||||
"For instructions on transitioning to the new API, please refer to "
|
||||
"https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html") Evaluator {
|
||||
OPENVINO_SUPPRESS_DEPRECATED_START
|
||||
public:
|
||||
/// \brief values we compute for outputs
|
||||
using value_map = std::map<ov::RawNodeOutput, V>;
|
||||
|
|
@ -184,6 +186,6 @@ protected:
|
|||
op_handler_map m_handlers;
|
||||
op_handler m_default_handler;
|
||||
value_map& m_value_map;
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
OPENVINO_SUPPRESS_DEPRECATED_END
|
||||
};
|
||||
} // namespace ngraph
|
||||
|
|
|
|||
|
|
@ -24,8 +24,6 @@
|
|||
#include <unordered_set>
|
||||
#include <vector>
|
||||
|
||||
#include "ngraph/check.hpp"
|
||||
#include "ngraph/deprecated.hpp"
|
||||
#include "openvino/core/graph_util.hpp"
|
||||
|
||||
namespace ov {
|
||||
|
|
@ -55,13 +53,18 @@ using ov::traverse_nodes;
|
|||
|
||||
using NodeMap = std::unordered_map<ov::Node*, std::shared_ptr<ov::Node>>;
|
||||
|
||||
NGRAPH_API_DEPRECATED
|
||||
NGRAPH_API
|
||||
OPENVINO_DEPRECATED("The nGraph API is deprecated and will be removed in the 2024.0 release. "
|
||||
"For instructions on transitioning to the new API, please refer to "
|
||||
"https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
|
||||
OPENVINO_API
|
||||
ov::NodeVector find_common_args(std::shared_ptr<ov::Node> target, std::shared_ptr<ov::Node> replacement);
|
||||
|
||||
/// Topological sort of just nodes
|
||||
template <typename T>
|
||||
NGRAPH_API_DEPRECATED std::vector<std::shared_ptr<ov::Node>> subgraph_topological_sort(T nodes) {
|
||||
OPENVINO_DEPRECATED("The nGraph API is deprecated and will be removed in the 2024.0 release. "
|
||||
"For instructions on transitioning to the new API, please refer to "
|
||||
"https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
|
||||
std::vector<std::shared_ptr<ov::Node>> subgraph_topological_sort(T nodes) {
|
||||
std::stack<ov::Node*, std::vector<ov::Node*>> nodes_to_do;
|
||||
std::unordered_set<ov::Node*> nodes_done;
|
||||
std::unordered_set<ov::Node*> nodes_to_emit;
|
||||
|
|
@ -110,7 +113,10 @@ NGRAPH_API_DEPRECATED std::vector<std::shared_ptr<ov::Node>> subgraph_topologica
|
|||
}
|
||||
|
||||
template <typename T>
|
||||
NGRAPH_API_DEPRECATED void validate_nodes_and_infer_types(const T& nodes) {
|
||||
OPENVINO_DEPRECATED("The nGraph API is deprecated and will be removed in the 2024.0 release. "
|
||||
"For instructions on transitioning to the new API, please refer to "
|
||||
"https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
|
||||
void validate_nodes_and_infer_types(const T& nodes) {
|
||||
OPENVINO_SUPPRESS_DEPRECATED_START
|
||||
for (auto& node : subgraph_topological_sort(nodes)) {
|
||||
node->revalidate_and_infer_types();
|
||||
|
|
@ -119,58 +125,78 @@ NGRAPH_API_DEPRECATED void validate_nodes_and_infer_types(const T& nodes) {
|
|||
}
|
||||
|
||||
// Check if all paths from X to a result go through Y
|
||||
NGRAPH_API_DEPRECATED
|
||||
NGRAPH_API
|
||||
OPENVINO_DEPRECATED("The nGraph API is deprecated and will be removed in the 2024.0 release. "
|
||||
"For instructions on transitioning to the new API, please refer to "
|
||||
"https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
|
||||
OPENVINO_API
|
||||
bool is_post_dominated(ov::Node* X, ov::Node* Y);
|
||||
|
||||
NGRAPH_API_DEPRECATED
|
||||
NGRAPH_API
|
||||
OPENVINO_DEPRECATED("The nGraph API is deprecated and will be removed in the 2024.0 release. "
|
||||
"For instructions on transitioning to the new API, please refer to "
|
||||
"https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
|
||||
OPENVINO_API
|
||||
bool is_equal_to_const_value(const std::string& const_value, const ov::Output<ov::Node>& reduce_constant);
|
||||
|
||||
// input nodes are cloned and returned
|
||||
// NodeMap input may contain default node mapping i.e. pre-cloned nodes
|
||||
// NodeMap output (by reference) fully maps input and cloned nodes
|
||||
NGRAPH_API_DEPRECATED
|
||||
NGRAPH_API
|
||||
OPENVINO_DEPRECATED("The nGraph API is deprecated and will be removed in the 2024.0 release. "
|
||||
"For instructions on transitioning to the new API, please refer to "
|
||||
"https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
|
||||
OPENVINO_API
|
||||
std::vector<std::shared_ptr<ov::Node>> clone_nodes(const std::vector<std::shared_ptr<ov::Node>>& nodes,
|
||||
NodeMap& node_map);
|
||||
|
||||
// input nodes are cloned and returned
|
||||
// NodeMap input may contain default node mapping i.e. pre-cloned nodes
|
||||
// NodeMap output (by reference) fully maps input and cloned nodes
|
||||
NGRAPH_API_DEPRECATED
|
||||
NGRAPH_API
|
||||
OPENVINO_DEPRECATED("The nGraph API is deprecated and will be removed in the 2024.0 release. "
|
||||
"For instructions on transitioning to the new API, please refer to "
|
||||
"https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
|
||||
OPENVINO_API
|
||||
std::list<std::shared_ptr<ov::Node>> clone_nodes(const std::vector<std::shared_ptr<ov::Node>>& nodes,
|
||||
ov::RawNodeOutputMap& node_map);
|
||||
|
||||
NGRAPH_API_DEPRECATED
|
||||
NGRAPH_API
|
||||
OPENVINO_DEPRECATED("The nGraph API is deprecated and will be removed in the 2024.0 release. "
|
||||
"For instructions on transitioning to the new API, please refer to "
|
||||
"https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
|
||||
OPENVINO_API
|
||||
std::pair<std::shared_ptr<op::v0::Result>, std::shared_ptr<op::v0::Parameter>> insert_result_parameter_split(
|
||||
const std::shared_ptr<ov::Node>& src_node,
|
||||
const std::shared_ptr<ov::Node>& dst_node);
|
||||
|
||||
NGRAPH_API_DEPRECATED
|
||||
NGRAPH_API
|
||||
OPENVINO_DEPRECATED("The nGraph API is deprecated and will be removed in the 2024.0 release. "
|
||||
"For instructions on transitioning to the new API, please refer to "
|
||||
"https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
|
||||
OPENVINO_API
|
||||
void insert_new_node_between(const std::shared_ptr<ov::Node>& src_node,
|
||||
const std::shared_ptr<ov::Node>& dst_node,
|
||||
const std::shared_ptr<ov::Node>& new_node);
|
||||
|
||||
NGRAPH_API_DEPRECATED
|
||||
NGRAPH_API
|
||||
OPENVINO_DEPRECATED("The nGraph API is deprecated and will be removed in the 2024.0 release. "
|
||||
"For instructions on transitioning to the new API, please refer to "
|
||||
"https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
|
||||
OPENVINO_API
|
||||
std::shared_ptr<ov::Node> make_zero(const ov::element::Type& element_type, const ov::Shape& shape);
|
||||
|
||||
NGRAPH_API_DEPRECATED
|
||||
NGRAPH_API
|
||||
OPENVINO_DEPRECATED("The nGraph API is deprecated and will be removed in the 2024.0 release. "
|
||||
"For instructions on transitioning to the new API, please refer to "
|
||||
"https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
|
||||
OPENVINO_API
|
||||
std::shared_ptr<ov::Node> make_constant_from_string(std::string val,
|
||||
const ov::element::Type& element_type,
|
||||
const ov::Shape& shape);
|
||||
|
||||
NGRAPH_API_DEPRECATED
|
||||
NGRAPH_API
|
||||
OPENVINO_DEPRECATED("The nGraph API is deprecated and will be removed in the 2024.0 release. "
|
||||
"For instructions on transitioning to the new API, please refer to "
|
||||
"https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
|
||||
OPENVINO_API
|
||||
bool is_zero(const ov::Output<ov::Node>& reduce_constant);
|
||||
|
||||
NGRAPH_API_DEPRECATED
|
||||
NGRAPH_API
|
||||
OPENVINO_DEPRECATED("The nGraph API is deprecated and will be removed in the 2024.0 release. "
|
||||
"For instructions on transitioning to the new API, please refer to "
|
||||
"https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
|
||||
OPENVINO_API
|
||||
ov::NodeVector get_subgraph_outputs(const ov::NodeVector& nodes,
|
||||
const ov::NodeVector& exclusions,
|
||||
bool ignore_unused = false,
|
||||
|
|
@ -179,55 +205,75 @@ ov::NodeVector get_subgraph_outputs(const ov::NodeVector& nodes,
|
|||
// Extract sub-graph computing the `results`. Stops backward traversal at either a Parameter
|
||||
// node
|
||||
// or a node that belongs to args
|
||||
NGRAPH_API_DEPRECATED
|
||||
NGRAPH_API
|
||||
OPENVINO_DEPRECATED("The nGraph API is deprecated and will be removed in the 2024.0 release. "
|
||||
"For instructions on transitioning to the new API, please refer to "
|
||||
"https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
|
||||
OPENVINO_API
|
||||
ov::NodeVector extract_subgraph(const ov::NodeVector& results, const ov::NodeVector& args);
|
||||
|
||||
NGRAPH_API_DEPRECATED
|
||||
NGRAPH_API
|
||||
OPENVINO_DEPRECATED("The nGraph API is deprecated and will be removed in the 2024.0 release. "
|
||||
"For instructions on transitioning to the new API, please refer to "
|
||||
"https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
|
||||
OPENVINO_API
|
||||
bool is_one(const ov::Output<ov::Node>& reduce_constant);
|
||||
|
||||
// Returns true if `node` is live in the graph i.e. a result op
|
||||
// transitively uses this `node`
|
||||
NGRAPH_API_DEPRECATED
|
||||
NGRAPH_API
|
||||
OPENVINO_DEPRECATED("The nGraph API is deprecated and will be removed in the 2024.0 release. "
|
||||
"For instructions on transitioning to the new API, please refer to "
|
||||
"https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
|
||||
OPENVINO_API
|
||||
bool is_used(ov::Node* node);
|
||||
|
||||
// Returns count of `node` users that are still live in the graph
|
||||
NGRAPH_API_DEPRECATED
|
||||
NGRAPH_API
|
||||
OPENVINO_DEPRECATED("The nGraph API is deprecated and will be removed in the 2024.0 release. "
|
||||
"For instructions on transitioning to the new API, please refer to "
|
||||
"https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
|
||||
OPENVINO_API
|
||||
size_t get_user_count(ov::Node* node);
|
||||
|
||||
NGRAPH_API_DEPRECATED
|
||||
NGRAPH_API
|
||||
OPENVINO_DEPRECATED("The nGraph API is deprecated and will be removed in the 2024.0 release. "
|
||||
"For instructions on transitioning to the new API, please refer to "
|
||||
"https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
|
||||
OPENVINO_API
|
||||
bool is_strided(const ov::Strides& strides);
|
||||
|
||||
NGRAPH_API_DEPRECATED
|
||||
NGRAPH_API
|
||||
OPENVINO_DEPRECATED("The nGraph API is deprecated and will be removed in the 2024.0 release. "
|
||||
"For instructions on transitioning to the new API, please refer to "
|
||||
"https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
|
||||
OPENVINO_API
|
||||
bool is_valid_rank(const std::shared_ptr<ov::Node>& node, std::vector<size_t> valid_ranks);
|
||||
|
||||
NGRAPH_API_DEPRECATED
|
||||
NGRAPH_API
|
||||
OPENVINO_DEPRECATED("The nGraph API is deprecated and will be removed in the 2024.0 release. "
|
||||
"For instructions on transitioning to the new API, please refer to "
|
||||
"https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
|
||||
OPENVINO_API
|
||||
void plot_graph(std::shared_ptr<ov::Model> f,
|
||||
const std::string& filename,
|
||||
std::function<void(const ov::Node& node, std::vector<std::string>& attributes)> = nullptr);
|
||||
|
||||
/// \return A vector containing handles for each input of dst that is connected to an output
|
||||
/// of `src`.
|
||||
NGRAPH_API_DEPRECATED
|
||||
NGRAPH_API
|
||||
OPENVINO_DEPRECATED("The nGraph API is deprecated and will be removed in the 2024.0 release. "
|
||||
"For instructions on transitioning to the new API, please refer to "
|
||||
"https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
|
||||
OPENVINO_API
|
||||
std::vector<ov::Input<ov::Node>> get_inputs_from(ov::Node& src, ov::Node& dst);
|
||||
/// \return A vector containing a handle for each output of src that is connected to an input
|
||||
/// of `dst`.
|
||||
NGRAPH_API_DEPRECATED
|
||||
NGRAPH_API
|
||||
OPENVINO_DEPRECATED("The nGraph API is deprecated and will be removed in the 2024.0 release. "
|
||||
"For instructions on transitioning to the new API, please refer to "
|
||||
"https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
|
||||
OPENVINO_API
|
||||
std::vector<ov::Output<ov::Node>> get_outputs_to(ov::Node& src, ov::Node& dst);
|
||||
|
||||
/// Checks the func for graph cycles starting from results going backwards, then from parameters
|
||||
/// going forward.
|
||||
/// It returns true if a cycle is found and the first cycle encountered.
|
||||
NGRAPH_API_DEPRECATED
|
||||
NGRAPH_API
|
||||
OPENVINO_DEPRECATED("The nGraph API is deprecated and will be removed in the 2024.0 release. "
|
||||
"For instructions on transitioning to the new API, please refer to "
|
||||
"https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
|
||||
OPENVINO_API
|
||||
bool check_for_cycles(const ov::Model* func, ov::NodeVector& cycle_nodes, bool& is_bkwd_cycle);
|
||||
} // namespace ngraph
|
||||
|
||||
|
|
|
|||
|
|
@ -1,26 +0,0 @@
|
|||
// Copyright (C) 2018-2023 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
#pragma once
|
||||
|
||||
#if !defined(IN_OV_COMPONENT) && !defined(NGRAPH_LEGACY_HEADER_INCLUDED)
|
||||
# define NGRAPH_LEGACY_HEADER_INCLUDED
|
||||
# ifdef _MSC_VER
|
||||
# pragma message( \
|
||||
"The nGraph API is deprecated and will be removed in the 2024.0 release. For instructions on transitioning to the new API, please refer to https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
|
||||
# else
|
||||
# warning("The nGraph API is deprecated and will be removed in the 2024.0 release. For instructions on transitioning to the new API, please refer to https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#include "openvino/core/core_visibility.hpp"
|
||||
|
||||
#define NGRAPH_API OPENVINO_API
|
||||
#define NGRAPH_API_C OPENVINO_API_C
|
||||
#define NGRAPH_EXTERN_C OPENVINO_EXTERN_C
|
||||
|
||||
#ifdef OPENVINO_ENABLE_UNICODE_PATH_SUPPORT
|
||||
# ifndef ENABLE_UNICODE_PATH_SUPPORT
|
||||
# define ENABLE_UNICODE_PATH_SUPPORT
|
||||
# endif
|
||||
#endif
|
||||
|
|
@ -17,7 +17,6 @@
|
|||
#include <cstddef>
|
||||
#include <ostream>
|
||||
|
||||
#include "ngraph/ngraph_visibility.hpp"
|
||||
#include "openvino/op/util/attr_types.hpp"
|
||||
|
||||
namespace ngraph {
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@
|
|||
|
||||
#include <memory>
|
||||
|
||||
#include "ngraph/ngraph_visibility.hpp"
|
||||
#include "openvino/op/util/op_types.hpp"
|
||||
|
||||
namespace ngraph {
|
||||
|
|
|
|||
|
|
@ -19,7 +19,6 @@
|
|||
#include <vector>
|
||||
|
||||
#include "ngraph/axis_set.hpp"
|
||||
#include "ngraph/ngraph_visibility.hpp"
|
||||
#include "ngraph/strides.hpp"
|
||||
#include "openvino/core/shape.hpp"
|
||||
|
||||
|
|
|
|||
|
|
@ -16,8 +16,7 @@
|
|||
|
||||
#include <memory>
|
||||
|
||||
#include "ngraph/deprecated.hpp"
|
||||
#include "ngraph/ngraph_visibility.hpp"
|
||||
#include "openvino/core/deprecated.hpp"
|
||||
#include "openvino/core/model.hpp"
|
||||
#include "openvino/core/shape.hpp"
|
||||
#include "openvino/core/type.hpp"
|
||||
|
|
@ -105,8 +104,10 @@ namespace ngraph {
|
|||
/// which a Constant node with element type parameter_element_types[i] and shape
|
||||
/// parameter_shapes[i] can be created.
|
||||
///
|
||||
NGRAPH_API_DEPRECATED
|
||||
NGRAPH_API
|
||||
OPENVINO_DEPRECATED("The nGraph API is deprecated and will be removed in the 2024.0 release. "
|
||||
"For instructions on transitioning to the new API, please refer to "
|
||||
"https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
|
||||
OPENVINO_API
|
||||
std::shared_ptr<ov::Model> specialize_function(std::shared_ptr<ov::Model> f,
|
||||
const std::vector<ov::element::Type>& parameter_element_types,
|
||||
const std::vector<ov::PartialShape>& parameter_shapes,
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@
|
|||
#include <ostream>
|
||||
#include <vector>
|
||||
|
||||
#include "ngraph/ngraph_visibility.hpp"
|
||||
#include "openvino/core/strides.hpp"
|
||||
|
||||
namespace ngraph {
|
||||
|
|
|
|||
|
|
@ -46,9 +46,12 @@ using ov::Node;
|
|||
class stopwatch;
|
||||
class Tensor;
|
||||
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
OPENVINO_SUPPRESS_DEPRECATED_START
|
||||
template <typename T>
|
||||
NGRAPH_API_DEPRECATED std::string join(const T& v, const std::string& sep = ", ") {
|
||||
OPENVINO_DEPRECATED("The nGraph API is deprecated and will be removed in the 2024.0 release. "
|
||||
"For instructions on transitioning to the new API, please refer to "
|
||||
"https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
|
||||
std::string join(const T& v, const std::string& sep = ", ") {
|
||||
std::ostringstream ss;
|
||||
size_t count = 0;
|
||||
for (const auto& x : v) {
|
||||
|
|
@ -61,40 +64,58 @@ NGRAPH_API_DEPRECATED std::string join(const T& v, const std::string& sep = ", "
|
|||
}
|
||||
|
||||
template <typename T>
|
||||
NGRAPH_API_DEPRECATED std::string vector_to_string(const T& v) {
|
||||
OPENVINO_DEPRECATED("The nGraph API is deprecated and will be removed in the 2024.0 release. "
|
||||
"For instructions on transitioning to the new API, please refer to "
|
||||
"https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
|
||||
std::string vector_to_string(const T& v) {
|
||||
std::ostringstream os;
|
||||
os << "[ " << ngraph::join(v) << " ]";
|
||||
return os.str();
|
||||
}
|
||||
|
||||
NGRAPH_API
|
||||
NGRAPH_API_DEPRECATED
|
||||
OPENVINO_API
|
||||
OPENVINO_DEPRECATED("The nGraph API is deprecated and will be removed in the 2024.0 release. "
|
||||
"For instructions on transitioning to the new API, please refer to "
|
||||
"https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
|
||||
size_t hash_combine(const std::vector<size_t>& list);
|
||||
NGRAPH_API
|
||||
NGRAPH_API_DEPRECATED
|
||||
OPENVINO_API
|
||||
OPENVINO_DEPRECATED("The nGraph API is deprecated and will be removed in the 2024.0 release. "
|
||||
"For instructions on transitioning to the new API, please refer to "
|
||||
"https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
|
||||
void dump(std::ostream& out, const void*, size_t);
|
||||
NGRAPH_API
|
||||
NGRAPH_API_DEPRECATED
|
||||
OPENVINO_API
|
||||
OPENVINO_DEPRECATED("The nGraph API is deprecated and will be removed in the 2024.0 release. "
|
||||
"For instructions on transitioning to the new API, please refer to "
|
||||
"https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
|
||||
std::string to_lower(const std::string& s);
|
||||
NGRAPH_API
|
||||
NGRAPH_API_DEPRECATED
|
||||
OPENVINO_API
|
||||
OPENVINO_DEPRECATED("The nGraph API is deprecated and will be removed in the 2024.0 release. "
|
||||
"For instructions on transitioning to the new API, please refer to "
|
||||
"https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
|
||||
std::string to_upper(const std::string& s);
|
||||
NGRAPH_API
|
||||
NGRAPH_API_DEPRECATED
|
||||
OPENVINO_API
|
||||
OPENVINO_DEPRECATED("The nGraph API is deprecated and will be removed in the 2024.0 release. "
|
||||
"For instructions on transitioning to the new API, please refer to "
|
||||
"https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
|
||||
std::string trim(const std::string& s);
|
||||
NGRAPH_API
|
||||
NGRAPH_API_DEPRECATED
|
||||
OPENVINO_API
|
||||
OPENVINO_DEPRECATED("The nGraph API is deprecated and will be removed in the 2024.0 release. "
|
||||
"For instructions on transitioning to the new API, please refer to "
|
||||
"https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
|
||||
std::vector<std::string> split(const std::string& s, char delimiter, bool trim = false);
|
||||
|
||||
template <typename T>
|
||||
NGRAPH_API_DEPRECATED std::string locale_string(T x) {
|
||||
OPENVINO_DEPRECATED("The nGraph API is deprecated and will be removed in the 2024.0 release. "
|
||||
"For instructions on transitioning to the new API, please refer to "
|
||||
"https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
|
||||
std::string locale_string(T x) {
|
||||
std::stringstream ss;
|
||||
ss.imbue(std::locale(""));
|
||||
ss << x;
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
class NGRAPH_API NGRAPH_DEPRECATED("It is obsolete structure and will be removed soon") stopwatch {
|
||||
class OPENVINO_API OPENVINO_DEPRECATED("It is obsolete structure and will be removed soon") stopwatch {
|
||||
public:
|
||||
void start() {
|
||||
if (m_active == false) {
|
||||
|
|
@ -136,7 +157,10 @@ private:
|
|||
|
||||
/// Parses a string containing a literal of the underlying type.
|
||||
template <typename T>
|
||||
NGRAPH_API_DEPRECATED T parse_string(const std::string& s) {
|
||||
OPENVINO_DEPRECATED("The nGraph API is deprecated and will be removed in the 2024.0 release. "
|
||||
"For instructions on transitioning to the new API, please refer to "
|
||||
"https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
|
||||
T parse_string(const std::string& s) {
|
||||
T result;
|
||||
std::stringstream ss;
|
||||
|
||||
|
|
@ -154,65 +178,100 @@ NGRAPH_API_DEPRECATED T parse_string(const std::string& s) {
|
|||
/// template specializations for float and double to handle INFINITY, -INFINITY
|
||||
/// and NaN values.
|
||||
template <>
|
||||
NGRAPH_API_DEPRECATED NGRAPH_API float parse_string<float>(const std::string& s);
|
||||
OPENVINO_DEPRECATED("The nGraph API is deprecated and will be removed in the 2024.0 release. "
|
||||
"For instructions on transitioning to the new API, please refer to "
|
||||
"https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
|
||||
OPENVINO_API float parse_string<float>(const std::string& s);
|
||||
template <>
|
||||
NGRAPH_API_DEPRECATED NGRAPH_API double parse_string<double>(const std::string& s);
|
||||
OPENVINO_DEPRECATED("The nGraph API is deprecated and will be removed in the 2024.0 release. "
|
||||
"For instructions on transitioning to the new API, please refer to "
|
||||
"https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
|
||||
OPENVINO_API double parse_string<double>(const std::string& s);
|
||||
|
||||
/// template specializations for int8_t and uint8_t to handle the fact that default
|
||||
/// implementation ends up treating values as characters so that the number "0" turns into
|
||||
/// the parsed value 48, which is it's ASCII value
|
||||
template <>
|
||||
NGRAPH_API_DEPRECATED NGRAPH_API int8_t parse_string<int8_t>(const std::string& s);
|
||||
OPENVINO_DEPRECATED("The nGraph API is deprecated and will be removed in the 2024.0 release. "
|
||||
"For instructions on transitioning to the new API, please refer to "
|
||||
"https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
|
||||
OPENVINO_API int8_t parse_string<int8_t>(const std::string& s);
|
||||
template <>
|
||||
NGRAPH_API_DEPRECATED NGRAPH_API uint8_t parse_string<uint8_t>(const std::string& s);
|
||||
OPENVINO_DEPRECATED("The nGraph API is deprecated and will be removed in the 2024.0 release. "
|
||||
"For instructions on transitioning to the new API, please refer to "
|
||||
"https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
|
||||
OPENVINO_API uint8_t parse_string<uint8_t>(const std::string& s);
|
||||
|
||||
/// Parses a list of strings containing literals of the underlying type.
|
||||
template <typename T>
|
||||
NGRAPH_API_DEPRECATED std::vector<T> parse_string(const std::vector<std::string>& ss) {
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
OPENVINO_DEPRECATED("The nGraph API is deprecated and will be removed in the 2024.0 release. "
|
||||
"For instructions on transitioning to the new API, please refer to "
|
||||
"https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
|
||||
std::vector<T> parse_string(const std::vector<std::string>& ss) {
|
||||
OPENVINO_SUPPRESS_DEPRECATED_START
|
||||
std::vector<T> result(ss.size());
|
||||
std::transform(ss.begin(), ss.end(), result.begin(), [](const std::string& s) {
|
||||
return parse_string<T>(s);
|
||||
});
|
||||
return result;
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
OPENVINO_SUPPRESS_DEPRECATED_END
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
NGRAPH_API_DEPRECATED T ceil_div(const T& x, const T& y) {
|
||||
OPENVINO_DEPRECATED("The nGraph API is deprecated and will be removed in the 2024.0 release. "
|
||||
"For instructions on transitioning to the new API, please refer to "
|
||||
"https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
|
||||
T ceil_div(const T& x, const T& y) {
|
||||
return (x == 0 ? 0 : (1 + (x - 1) / y));
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
NGRAPH_API_DEPRECATED T subtract_or_zero(T x, T y) {
|
||||
OPENVINO_DEPRECATED("The nGraph API is deprecated and will be removed in the 2024.0 release. "
|
||||
"For instructions on transitioning to the new API, please refer to "
|
||||
"https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
|
||||
T subtract_or_zero(T x, T y) {
|
||||
return y > x ? 0 : x - y;
|
||||
}
|
||||
|
||||
NGRAPH_API
|
||||
NGRAPH_API_DEPRECATED
|
||||
OPENVINO_API
|
||||
OPENVINO_DEPRECATED("The nGraph API is deprecated and will be removed in the 2024.0 release. "
|
||||
"For instructions on transitioning to the new API, please refer to "
|
||||
"https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
|
||||
void* ngraph_malloc(size_t size);
|
||||
NGRAPH_API
|
||||
NGRAPH_API_DEPRECATED
|
||||
OPENVINO_API
|
||||
OPENVINO_DEPRECATED("The nGraph API is deprecated and will be removed in the 2024.0 release. "
|
||||
"For instructions on transitioning to the new API, please refer to "
|
||||
"https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
|
||||
void ngraph_free(void*);
|
||||
|
||||
NGRAPH_API
|
||||
NGRAPH_API_DEPRECATED
|
||||
OPENVINO_API
|
||||
OPENVINO_DEPRECATED("The nGraph API is deprecated and will be removed in the 2024.0 release. "
|
||||
"For instructions on transitioning to the new API, please refer to "
|
||||
"https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
|
||||
size_t round_up(size_t size, size_t alignment);
|
||||
|
||||
NGRAPH_API
|
||||
NGRAPH_API_DEPRECATED
|
||||
OPENVINO_API
|
||||
OPENVINO_DEPRECATED("The nGraph API is deprecated and will be removed in the 2024.0 release. "
|
||||
"For instructions on transitioning to the new API, please refer to "
|
||||
"https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
|
||||
AxisVector get_default_order(size_t rank);
|
||||
|
||||
NGRAPH_API
|
||||
NGRAPH_API_DEPRECATED
|
||||
OPENVINO_API
|
||||
OPENVINO_DEPRECATED("The nGraph API is deprecated and will be removed in the 2024.0 release. "
|
||||
"For instructions on transitioning to the new API, please refer to "
|
||||
"https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
|
||||
AxisVector get_default_order(const ov::Rank& rank);
|
||||
|
||||
NGRAPH_API
|
||||
NGRAPH_API_DEPRECATED
|
||||
OPENVINO_API
|
||||
OPENVINO_DEPRECATED("The nGraph API is deprecated and will be removed in the 2024.0 release. "
|
||||
"For instructions on transitioning to the new API, please refer to "
|
||||
"https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
|
||||
AxisVector get_default_order(const ov::Shape& shape);
|
||||
|
||||
NGRAPH_API
|
||||
NGRAPH_API_DEPRECATED
|
||||
OPENVINO_API
|
||||
OPENVINO_DEPRECATED("The nGraph API is deprecated and will be removed in the 2024.0 release. "
|
||||
"For instructions on transitioning to the new API, please refer to "
|
||||
"https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
|
||||
AxisVector get_default_order(const ov::PartialShape& shape);
|
||||
|
||||
/// \brief Function to query parsed version information of the version of ngraph which
|
||||
|
|
@ -226,12 +285,17 @@ AxisVector get_default_order(const ov::PartialShape& shape);
|
|||
/// the patch version number.
|
||||
///
|
||||
/// \note Throws a runtime_error if there is an error during parsing
|
||||
NGRAPH_API
|
||||
NGRAPH_API_DEPRECATED
|
||||
OPENVINO_API
|
||||
OPENVINO_DEPRECATED("The nGraph API is deprecated and will be removed in the 2024.0 release. "
|
||||
"For instructions on transitioning to the new API, please refer to "
|
||||
"https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
|
||||
void parse_version_string(std::string version, size_t& major, size_t& minor, size_t& patch, std::string& extra);
|
||||
|
||||
template <typename T>
|
||||
NGRAPH_API_DEPRECATED T double_to_int(double x, double float_to_int_converter(double)) {
|
||||
OPENVINO_DEPRECATED("The nGraph API is deprecated and will be removed in the 2024.0 release. "
|
||||
"For instructions on transitioning to the new API, please refer to "
|
||||
"https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
|
||||
T double_to_int(double x, double float_to_int_converter(double)) {
|
||||
if (!std::is_integral<T>()) {
|
||||
OPENVINO_THROW("Function double_to_int template parameter must be an integral type.");
|
||||
}
|
||||
|
|
@ -253,7 +317,10 @@ NGRAPH_API_DEPRECATED T double_to_int(double x, double float_to_int_converter(do
|
|||
} // end namespace ngraph
|
||||
|
||||
template <typename T>
|
||||
NGRAPH_API_DEPRECATED std::vector<T> read_vector(std::shared_ptr<ov::Tensor> tv) {
|
||||
OPENVINO_DEPRECATED("The nGraph API is deprecated and will be removed in the 2024.0 release. "
|
||||
"For instructions on transitioning to the new API, please refer to "
|
||||
"https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
|
||||
std::vector<T> read_vector(std::shared_ptr<ov::Tensor> tv) {
|
||||
if (ov::element::from<T>() != tv->get_element_type()) {
|
||||
OPENVINO_THROW("read_vector type must match Tensor type");
|
||||
}
|
||||
|
|
@ -265,8 +332,10 @@ NGRAPH_API_DEPRECATED std::vector<T> read_vector(std::shared_ptr<ov::Tensor> tv)
|
|||
}
|
||||
|
||||
template <class T, ov::element::Type_t ET>
|
||||
NGRAPH_API_DEPRECATED std::vector<T> array_2_vector(typename ov::element_type_traits<ET>::value_type* data,
|
||||
size_t size) {
|
||||
OPENVINO_DEPRECATED("The nGraph API is deprecated and will be removed in the 2024.0 release. "
|
||||
"For instructions on transitioning to the new API, please refer to "
|
||||
"https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
|
||||
std::vector<T> array_2_vector(typename ov::element_type_traits<ET>::value_type* data, size_t size) {
|
||||
std::vector<T> result(size);
|
||||
for (size_t i = 0; i < size; i++) {
|
||||
result[i] = static_cast<T>(data[i]);
|
||||
|
|
@ -274,13 +343,19 @@ NGRAPH_API_DEPRECATED std::vector<T> array_2_vector(typename ov::element_type_tr
|
|||
return result;
|
||||
}
|
||||
|
||||
NGRAPH_API_DEPRECATED
|
||||
std::vector<float> NGRAPH_API read_float_vector(std::shared_ptr<ov::Tensor> tv);
|
||||
OPENVINO_DEPRECATED("The nGraph API is deprecated and will be removed in the 2024.0 release. "
|
||||
"For instructions on transitioning to the new API, please refer to "
|
||||
"https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
|
||||
std::vector<float> OPENVINO_API read_float_vector(std::shared_ptr<ov::Tensor> tv);
|
||||
|
||||
NGRAPH_API_DEPRECATED
|
||||
std::vector<int64_t> NGRAPH_API read_index_vector(std::shared_ptr<ov::Tensor> tv);
|
||||
OPENVINO_DEPRECATED("The nGraph API is deprecated and will be removed in the 2024.0 release. "
|
||||
"For instructions on transitioning to the new API, please refer to "
|
||||
"https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
|
||||
std::vector<int64_t> OPENVINO_API read_index_vector(std::shared_ptr<ov::Tensor> tv);
|
||||
|
||||
NGRAPH_API
|
||||
NGRAPH_API_DEPRECATED
|
||||
OPENVINO_API
|
||||
OPENVINO_DEPRECATED("The nGraph API is deprecated and will be removed in the 2024.0 release. "
|
||||
"For instructions on transitioning to the new API, please refer to "
|
||||
"https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
|
||||
std::ostream& operator<<(std::ostream& os, const ov::NodeVector& nv);
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
OPENVINO_SUPPRESS_DEPRECATED_END
|
||||
|
|
|
|||
|
|
@ -34,20 +34,26 @@ using ov::element::Type;
|
|||
using ov::element::Type_t;
|
||||
} // namespace element
|
||||
|
||||
NGRAPH_API_DEPRECATED
|
||||
NGRAPH_API
|
||||
OPENVINO_DEPRECATED("The nGraph API is deprecated and will be removed in the 2024.0 release. "
|
||||
"For instructions on transitioning to the new API, please refer to "
|
||||
"https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
|
||||
OPENVINO_API
|
||||
Strides conv_default_strides(const Node* node,
|
||||
const ov::PartialShape& data_batch_shape,
|
||||
const ov::PartialShape& filters_shape);
|
||||
|
||||
NGRAPH_API_DEPRECATED
|
||||
NGRAPH_API
|
||||
OPENVINO_DEPRECATED("The nGraph API is deprecated and will be removed in the 2024.0 release. "
|
||||
"For instructions on transitioning to the new API, please refer to "
|
||||
"https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
|
||||
OPENVINO_API
|
||||
CoordinateDiff conv_default_padding(const Node* node,
|
||||
const ov::PartialShape& data_batch_shape,
|
||||
const ov::PartialShape& filters_shape);
|
||||
|
||||
NGRAPH_API_DEPRECATED
|
||||
NGRAPH_API
|
||||
OPENVINO_DEPRECATED("The nGraph API is deprecated and will be removed in the 2024.0 release. "
|
||||
"For instructions on transitioning to the new API, please refer to "
|
||||
"https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
|
||||
OPENVINO_API
|
||||
ov::PartialShape infer_windowed_reduction_output_shape(const Node* node,
|
||||
const ov::PartialShape& data_shape,
|
||||
const Strides& data_dilation,
|
||||
|
|
@ -59,7 +65,9 @@ ov::PartialShape infer_windowed_reduction_output_shape(const Node* node,
|
|||
bool is_window_all_in_padding_allowed,
|
||||
bool ceil_mode = false);
|
||||
|
||||
NGRAPH_API_DEPRECATED
|
||||
OPENVINO_DEPRECATED("The nGraph API is deprecated and will be removed in the 2024.0 release. "
|
||||
"For instructions on transitioning to the new API, please refer to "
|
||||
"https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
|
||||
void validate_conv_params_spatial_dimensions(const Node* node,
|
||||
const size_t num_spatial_dims,
|
||||
const op::PadType auto_pad,
|
||||
|
|
@ -68,8 +76,10 @@ void validate_conv_params_spatial_dimensions(const Node* node,
|
|||
CoordinateDiff& pads_begin,
|
||||
CoordinateDiff& pads_end);
|
||||
|
||||
NGRAPH_API_DEPRECATED
|
||||
NGRAPH_API
|
||||
OPENVINO_DEPRECATED("The nGraph API is deprecated and will be removed in the 2024.0 release. "
|
||||
"For instructions on transitioning to the new API, please refer to "
|
||||
"https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
|
||||
OPENVINO_API
|
||||
ov::PartialShape infer_batched_pooling_forward(const Node* node,
|
||||
const ov::PartialShape& data_batch_shape,
|
||||
const CoordinateDiff& data_padding_below,
|
||||
|
|
@ -80,8 +90,10 @@ ov::PartialShape infer_batched_pooling_forward(const Node* node,
|
|||
bool ceil_mode = false,
|
||||
const Strides& window_dilation = Strides{});
|
||||
|
||||
NGRAPH_API_DEPRECATED
|
||||
NGRAPH_API
|
||||
OPENVINO_DEPRECATED("The nGraph API is deprecated and will be removed in the 2024.0 release. "
|
||||
"For instructions on transitioning to the new API, please refer to "
|
||||
"https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
|
||||
OPENVINO_API
|
||||
ov::PartialShape infer_slice_shape(const Node* node,
|
||||
const ov::PartialShape& input_shape,
|
||||
const std::vector<int64_t>& begin,
|
||||
|
|
@ -97,20 +109,28 @@ ov::PartialShape infer_slice_shape(const Node* node,
|
|||
/// \return (true, max_value) if can be determined, or (false, numeric_limits<uint64_t>::max())
|
||||
/// if not.
|
||||
/// \deprecated Use evaluate_upper_bound instead
|
||||
NGRAPH_API_DEPRECATED
|
||||
NGRAPH_API std::pair<bool, uint64_t> maximum_value(const ov::Output<Node>& value);
|
||||
OPENVINO_DEPRECATED("The nGraph API is deprecated and will be removed in the 2024.0 release. "
|
||||
"For instructions on transitioning to the new API, please refer to "
|
||||
"https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
|
||||
OPENVINO_API std::pair<bool, uint64_t> maximum_value(const ov::Output<Node>& value);
|
||||
|
||||
/// \brief Returns a Constant storing scalar value equal to std::numeric_limits<t>::max()
|
||||
NGRAPH_API_DEPRECATED
|
||||
NGRAPH_API std::shared_ptr<Constant> get_constant_max_of_type(element::Type_t t);
|
||||
OPENVINO_DEPRECATED("The nGraph API is deprecated and will be removed in the 2024.0 release. "
|
||||
"For instructions on transitioning to the new API, please refer to "
|
||||
"https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
|
||||
OPENVINO_API std::shared_ptr<Constant> get_constant_max_of_type(element::Type_t t);
|
||||
|
||||
/// \brief Returns a Constant storing scalar value equal to std::numeric_limits<t>::min()
|
||||
NGRAPH_API_DEPRECATED
|
||||
NGRAPH_API std::shared_ptr<Constant> get_constant_min_of_type(element::Type_t t);
|
||||
OPENVINO_DEPRECATED("The nGraph API is deprecated and will be removed in the 2024.0 release. "
|
||||
"For instructions on transitioning to the new API, please refer to "
|
||||
"https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
|
||||
OPENVINO_API std::shared_ptr<Constant> get_constant_min_of_type(element::Type_t t);
|
||||
|
||||
/// \brief Returns a Constant storing scalar value equal to std::numeric_limits<t>::lowest()
|
||||
NGRAPH_API_DEPRECATED
|
||||
NGRAPH_API std::shared_ptr<Constant> get_constant_lowest_of_type(element::Type_t t);
|
||||
OPENVINO_DEPRECATED("The nGraph API is deprecated and will be removed in the 2024.0 release. "
|
||||
"For instructions on transitioning to the new API, please refer to "
|
||||
"https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
|
||||
OPENVINO_API std::shared_ptr<Constant> get_constant_lowest_of_type(element::Type_t t);
|
||||
|
||||
namespace opset1 {
|
||||
///
|
||||
|
|
@ -126,8 +146,10 @@ namespace opset1 {
|
|||
/// \param pads_begin The placeholder for paddings at the beginning of axis.
|
||||
/// \param pads_end The placeholder for paddings at the end of axis.
|
||||
///
|
||||
NGRAPH_API_DEPRECATED
|
||||
NGRAPH_API
|
||||
OPENVINO_DEPRECATED("The nGraph API is deprecated and will be removed in the 2024.0 release. "
|
||||
"For instructions on transitioning to the new API, please refer to "
|
||||
"https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
|
||||
OPENVINO_API
|
||||
void infer_conv_backprop_auto_padding(const Shape& input_data_shape,
|
||||
const Shape& filters_shape,
|
||||
const Shape& output_shape,
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
#include "openvino/op/parameter.hpp"
|
||||
|
||||
using namespace ngraph;
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START;
|
||||
OPENVINO_SUPPRESS_DEPRECATED_START;
|
||||
|
||||
using ov::op::v0::Constant;
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
using namespace ngraph;
|
||||
using namespace ov;
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START;
|
||||
OPENVINO_SUPPRESS_DEPRECATED_START;
|
||||
|
||||
using ov::op::v0::Constant;
|
||||
using ov::op::v0::Convert;
|
||||
|
|
@ -209,7 +209,7 @@ TEST(specialize_function, et_static_shape_rank_static_dynamic_rank_mismatch) {
|
|||
{ov::PartialShape{1, 2, 3}, ov::PartialShape{1, 2, 3, 4}},
|
||||
param_vals);
|
||||
},
|
||||
CheckFailure);
|
||||
ov::AssertFailure);
|
||||
}
|
||||
|
||||
// Test specialization of rank-static dynamic shapes, where the replacement shapes have wrong
|
||||
|
|
@ -236,7 +236,7 @@ TEST(specialize_function, et_static_shape_rank_static_dynamic_dim_mismatch) {
|
|||
{ov::PartialShape{1, 2, 3}, ov::PartialShape{1, 9, 4}},
|
||||
param_vals);
|
||||
},
|
||||
CheckFailure);
|
||||
ov::AssertFailure);
|
||||
}
|
||||
|
||||
// Test for failure when we supply the wrong number of replacement element types.
|
||||
|
|
@ -258,7 +258,7 @@ TEST(specialize_function, et_count_wrong) {
|
|||
{ov::PartialShape{1, 2, 3}, ov::PartialShape{1, 2, 3}},
|
||||
param_vals);
|
||||
},
|
||||
CheckFailure);
|
||||
ov::AssertFailure);
|
||||
}
|
||||
|
||||
// Test for failure when we supply the wrong number of replacement shapes.
|
||||
|
|
@ -280,7 +280,7 @@ TEST(specialize_function, shape_count_wrong) {
|
|||
{ov::PartialShape{1, 2, 3}, ov::PartialShape{1, 2, 3}, ov::PartialShape{4, 5, 6}},
|
||||
param_vals);
|
||||
},
|
||||
CheckFailure);
|
||||
ov::AssertFailure);
|
||||
}
|
||||
|
||||
// Test for failure when we supply the wrong number of replacement parameter values.
|
||||
|
|
@ -302,5 +302,5 @@ TEST(specialize_function, value_count_wrong) {
|
|||
{ov::PartialShape{1, 2, 3}, ov::PartialShape{1, 2, 3}},
|
||||
param_vals);
|
||||
},
|
||||
CheckFailure);
|
||||
ov::AssertFailure);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,7 +53,9 @@ class Tensor;
|
|||
class SparseTensor;
|
||||
class Attribute;
|
||||
|
||||
class NGRAPH_API_DEPRECATED ONNX_IMPORTER_API Node {
|
||||
class OPENVINO_DEPRECATED("The nGraph API is deprecated and will be removed in the 2024.0 release. "
|
||||
"For instructions on transitioning to the new API, please refer to "
|
||||
"https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html") ONNX_IMPORTER_API Node {
|
||||
public:
|
||||
Node() = delete;
|
||||
// TODO: hide this ctor since it uses protobufs generated structures
|
||||
|
|
|
|||
|
|
@ -20,8 +20,8 @@
|
|||
#include <set>
|
||||
#include <string>
|
||||
|
||||
#include "ngraph/deprecated.hpp"
|
||||
#include "onnx_importer_visibility.hpp"
|
||||
#include "openvino/core/deprecated.hpp"
|
||||
#include "openvino/core/model.hpp"
|
||||
|
||||
/// \brief Top level nGraph namespace.
|
||||
|
|
@ -36,8 +36,10 @@ namespace onnx_import {
|
|||
/// \param[in] domain A domain to get the supported operators for.
|
||||
///
|
||||
/// \return The set containing names of supported operators.
|
||||
NGRAPH_API_DEPRECATED ONNX_IMPORTER_API std::set<std::string> get_supported_operators(std::int64_t version,
|
||||
const std::string& domain);
|
||||
OPENVINO_DEPRECATED("The nGraph API is deprecated and will be removed in the 2024.0 release. "
|
||||
"For instructions on transitioning to the new API, please refer to "
|
||||
"https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
|
||||
ONNX_IMPORTER_API std::set<std::string> get_supported_operators(std::int64_t version, const std::string& domain);
|
||||
|
||||
/// \brief Determines whether ONNX operator is supported.
|
||||
///
|
||||
|
|
@ -47,9 +49,12 @@ NGRAPH_API_DEPRECATED ONNX_IMPORTER_API std::set<std::string> get_supported_oper
|
|||
/// If not set, the default domain "ai.onnx" is used.
|
||||
///
|
||||
/// \return true if operator is supported, false otherwise.
|
||||
NGRAPH_API_DEPRECATED ONNX_IMPORTER_API bool is_operator_supported(const std::string& op_name,
|
||||
std::int64_t version,
|
||||
const std::string& domain = "ai.onnx");
|
||||
OPENVINO_DEPRECATED("The nGraph API is deprecated and will be removed in the 2024.0 release. "
|
||||
"For instructions on transitioning to the new API, please refer to "
|
||||
"https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
|
||||
ONNX_IMPORTER_API bool is_operator_supported(const std::string& op_name,
|
||||
std::int64_t version,
|
||||
const std::string& domain = "ai.onnx");
|
||||
|
||||
/// \brief Imports and converts an serialized ONNX model from the input stream
|
||||
/// to an nGraph Function representation.
|
||||
|
|
@ -64,9 +69,12 @@ NGRAPH_API_DEPRECATED ONNX_IMPORTER_API bool is_operator_supported(const std::st
|
|||
/// \param[in] enable_mmap Enable mapping files with external weights instead of reading.
|
||||
///
|
||||
/// \return An nGraph function that represents a single output from the created graph.
|
||||
NGRAPH_API_DEPRECATED ONNX_IMPORTER_API std::shared_ptr<ov::Model> import_onnx_model(std::istream& stream,
|
||||
const std::string& model_path = "",
|
||||
bool enable_mmap = false);
|
||||
OPENVINO_DEPRECATED("The nGraph API is deprecated and will be removed in the 2024.0 release. "
|
||||
"For instructions on transitioning to the new API, please refer to "
|
||||
"https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
|
||||
ONNX_IMPORTER_API std::shared_ptr<ov::Model> import_onnx_model(std::istream& stream,
|
||||
const std::string& model_path = "",
|
||||
bool enable_mmap = false);
|
||||
|
||||
/// \brief Imports and converts an ONNX model from the input file
|
||||
/// to an nGraph Function representation.
|
||||
|
|
@ -79,8 +87,10 @@ NGRAPH_API_DEPRECATED ONNX_IMPORTER_API std::shared_ptr<ov::Model> import_onnx_m
|
|||
/// \param[in] enable_mmap Enable mapping files with external weights instead of reading.
|
||||
///
|
||||
/// \return An nGraph function that represents a single output from the created graph.
|
||||
NGRAPH_API_DEPRECATED ONNX_IMPORTER_API std::shared_ptr<ov::Model> import_onnx_model(const std::string& file_path,
|
||||
bool enable_mmap = false);
|
||||
OPENVINO_DEPRECATED("The nGraph API is deprecated and will be removed in the 2024.0 release. "
|
||||
"For instructions on transitioning to the new API, please refer to "
|
||||
"https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
|
||||
ONNX_IMPORTER_API std::shared_ptr<ov::Model> import_onnx_model(const std::string& file_path, bool enable_mmap = false);
|
||||
} // namespace onnx_import
|
||||
|
||||
} // namespace ngraph
|
||||
|
|
|
|||
|
|
@ -35,10 +35,13 @@ namespace onnx_import {
|
|||
/// \param domain The domain the ONNX operator is registered to.
|
||||
/// \param fn The function providing the implementation of the operator
|
||||
/// which transforms the single ONNX operator to an nGraph sub-graph.
|
||||
NGRAPH_API_DEPRECATED ONNX_IMPORTER_API void register_operator(const std::string& name,
|
||||
std::int64_t version,
|
||||
const std::string& domain,
|
||||
Operator fn);
|
||||
OPENVINO_DEPRECATED("The nGraph API is deprecated and will be removed in the 2024.0 release. "
|
||||
"For instructions on transitioning to the new API, please refer to "
|
||||
"https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
|
||||
ONNX_IMPORTER_API void register_operator(const std::string& name,
|
||||
std::int64_t version,
|
||||
const std::string& domain,
|
||||
Operator fn);
|
||||
|
||||
/// \brief Unregisters ONNX custom operator.
|
||||
/// The function unregisters previously registered operator.
|
||||
|
|
@ -46,9 +49,10 @@ NGRAPH_API_DEPRECATED ONNX_IMPORTER_API void register_operator(const std::string
|
|||
/// \param name The ONNX operator name.
|
||||
/// \param version The ONNX operator set version.
|
||||
/// \param domain The domain the ONNX operator is registered to.
|
||||
NGRAPH_API_DEPRECATED ONNX_IMPORTER_API void unregister_operator(const std::string& name,
|
||||
std::int64_t version,
|
||||
const std::string& domain);
|
||||
OPENVINO_DEPRECATED("The nGraph API is deprecated and will be removed in the 2024.0 release. "
|
||||
"For instructions on transitioning to the new API, please refer to "
|
||||
"https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html")
|
||||
ONNX_IMPORTER_API void unregister_operator(const std::string& name, std::int64_t version, const std::string& domain);
|
||||
|
||||
} // namespace onnx_import
|
||||
|
||||
|
|
|
|||
|
|
@ -226,9 +226,9 @@ std::shared_ptr<ov::Model> foldFunction(const std::shared_ptr<ov::Model>& functi
|
|||
}
|
||||
}
|
||||
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START;
|
||||
OPENVINO_SUPPRESS_DEPRECATED_START;
|
||||
const auto& foldedFunc = ngraph::specialize_function(function, paramElementTypes, paramShapes, inBuffers);
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END;
|
||||
OPENVINO_SUPPRESS_DEPRECATED_END;
|
||||
ov::pass::ConstantFolding().run_on_model(foldedFunc);
|
||||
for (const auto& op : foldedFunc->get_ops()) {
|
||||
OPENVINO_ASSERT(ov::op::util::is_constant(op) || ov::op::util::is_output(op) || ov::op::util::is_parameter(op),
|
||||
|
|
|
|||
|
|
@ -209,7 +209,7 @@ std::shared_ptr<ov::Model> EltwiseTwoResultsFunction::initOriginal() const {
|
|||
auto relu = std::make_shared<op::v0::Relu>(hswish);
|
||||
relu->set_friendly_name("relu");
|
||||
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
OPENVINO_SUPPRESS_DEPRECATED_START
|
||||
auto& out_tensor0 = add->get_output_tensor(0);
|
||||
ov::descriptor::set_ov_tensor_legacy_name(out_tensor0, "add_out");
|
||||
out_tensor0.set_names({"add_out", "y0"});
|
||||
|
|
@ -217,7 +217,7 @@ std::shared_ptr<ov::Model> EltwiseTwoResultsFunction::initOriginal() const {
|
|||
auto& out_tensor1 = relu->get_output_tensor(0);
|
||||
ov::descriptor::set_ov_tensor_legacy_name(out_tensor1, "relu_out");
|
||||
out_tensor1.set_names({"relu_out", "y1"});
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
OPENVINO_SUPPRESS_DEPRECATED_END
|
||||
|
||||
auto res0 = std::make_shared<op::v0::Result>(add);
|
||||
res0->set_friendly_name("res0");
|
||||
|
|
@ -248,7 +248,7 @@ std::shared_ptr<ov::Model> EltwiseTwoResultsFunction::initReference() const {
|
|||
std::make_shared<ov::Model>(NodeVector{relu},
|
||||
ParameterVector{indata2}));
|
||||
subgraph1->set_friendly_name("relu");
|
||||
NGRAPH_SUPPRESS_DEPRECATED_START
|
||||
OPENVINO_SUPPRESS_DEPRECATED_START
|
||||
auto& out_tensor0 = subgraph0->get_output_tensor(0);
|
||||
ov::descriptor::set_ov_tensor_legacy_name(out_tensor0, "add_out");
|
||||
out_tensor0.set_names({"add_out", "y0"});
|
||||
|
|
@ -256,7 +256,7 @@ std::shared_ptr<ov::Model> EltwiseTwoResultsFunction::initReference() const {
|
|||
auto& out_tensor1 = subgraph1->get_output_tensor(0);
|
||||
ov::descriptor::set_ov_tensor_legacy_name(out_tensor1, "relu_out");
|
||||
out_tensor1.set_names({"relu_out", "y1"});
|
||||
NGRAPH_SUPPRESS_DEPRECATED_END
|
||||
OPENVINO_SUPPRESS_DEPRECATED_END
|
||||
|
||||
auto res0 = std::make_shared<op::v0::Result>(subgraph0->output(0));
|
||||
res0->set_friendly_name("res0");
|
||||
|
|
|
|||
Loading…
Reference in New Issue