From 815af98acd81013de0958324f9b187242740eb23 Mon Sep 17 00:00:00 2001 From: Ilya Lavrenov Date: Fri, 24 Jan 2025 09:05:23 +0400 Subject: [PATCH] Fixed C++ RTTI for Core base classes (#28640) ### Ported: - https://github.com/openvinotoolkit/openvino/pull/28555 - https://github.com/openvinotoolkit/openvino/pull/28624 - https://github.com/openvinotoolkit/openvino/pull/28636 --- .github/workflows/mac.yml | 4 ++-- .github/workflows/mac_arm64.yml | 4 ++-- .../frontend/tensorflow/graph_iterator.cpp | 2 +- .../frontend/tensorflow/graph_iterator.hpp | 2 +- .../python/src/pyopenvino/utils/utils.cpp | 6 +++--- .../low_precision/cleanup_transformation.hpp | 1 - .../fuse_elementwise_to_fake_quantize.hpp | 1 - .../low_precision/layer_transformation.hpp | 1 - .../rt_info/shared_value_attribute.hpp | 2 -- src/core/include/openvino/core/any.hpp | 4 +--- .../include/openvino/core/attribute_adapter.hpp | 2 +- .../include/openvino/core/attribute_visitor.hpp | 2 +- src/core/include/openvino/core/model.hpp | 2 +- .../include/openvino/core/runtime_attribute.hpp | 2 +- .../openvino/op/util/multi_subgraph_base.hpp | 8 ++++---- .../openvino/op/util/variable_extension.hpp | 2 +- src/core/include/openvino/pass/pass.hpp | 2 +- .../include/openvino/pass/pattern/matcher.hpp | 5 +++-- src/core/include/openvino/runtime/allocator.hpp | 4 ++-- .../reference/utils/philox_converter.hpp | 2 +- .../reference/utils/philox_generator.hpp | 2 +- src/core/src/any.cpp | 2 ++ src/core/src/attribute_visitor.cpp | 4 ++++ src/core/src/model.cpp | 2 ++ src/core/src/op/util/multi_subgraph_base.cpp | 4 ++++ src/core/src/op/util/variable_extension.cpp | 9 +++++++++ src/core/src/pass/pass.cpp | 2 ++ src/core/src/pattern/matcher.cpp | 2 ++ src/core/src/runtime/allocator.cpp | 2 ++ src/core/src/runtime_attribute.cpp | 2 ++ .../openvino/frontend/complex_type_mark.hpp | 5 ++++- .../include/openvino/frontend/decoder.hpp | 4 ++-- .../openvino/frontend/graph_iterator.hpp | 13 ++----------- .../include/openvino/frontend/input_model.hpp | 2 +- .../include/openvino/frontend/node_context.hpp | 2 +- .../common/include/openvino/frontend/place.hpp | 2 +- src/frontends/common/src/complex_type_mark.cpp | 9 +++++++++ src/frontends/common/src/decoder.cpp | 4 +++- src/frontends/common/src/graph_iterator.cpp | 15 +++++++++++++++ src/frontends/common/src/hash_table.cpp | 2 +- src/frontends/common/src/input_model.cpp | 2 ++ src/frontends/common/src/node_context.cpp | 9 +++++++++ src/frontends/common/src/variable.cpp | 2 +- .../include/openvino/frontend/jax/decoder.hpp | 5 ++++- .../frontend/jax/extension/conversion.hpp | 2 +- .../include/openvino/frontend/jax/frontend.hpp | 2 +- .../openvino/frontend/jax/visibility.hpp | 12 ++++++------ src/frontends/jax/src/decoder.cpp | 7 +++++++ src/frontends/jax/src/jax.cpp | 4 ++-- .../frontend/paddle/extension/conversion.hpp | 2 +- .../openvino/frontend/paddle/frontend.hpp | 2 +- .../openvino/frontend/paddle/visibility.hpp | 12 ++++++------ src/frontends/paddle/src/frontend.cpp | 4 ++-- .../openvino/frontend/pytorch/decoder.hpp | 5 ++++- .../frontend/pytorch/extension/conversion.hpp | 2 +- .../openvino/frontend/pytorch/frontend.hpp | 2 +- .../openvino/frontend/pytorch/visibility.hpp | 12 ++++++------ src/frontends/pytorch/src/decoder.cpp | 7 +++++++ src/frontends/pytorch/src/frontend.cpp | 5 +++-- src/frontends/pytorch/src/pytorch.cpp | 4 ++-- .../src/transforms/aten_index_put_replacer.hpp | 3 +-- .../src/transforms/aten_index_replacer.hpp | 3 +-- .../tensorflow/extension/conversion.hpp | 2 +- .../openvino/frontend/tensorflow/frontend.hpp | 2 +- .../frontend/tensorflow/graph_iterator.hpp | 17 +++++++++++++++++ .../frontend/tensorflow/node_context.hpp | 2 +- .../frontend/tensorflow/special_types.hpp | 2 +- .../openvino/frontend/tensorflow/visibility.hpp | 12 ++++++------ src/frontends/tensorflow/src/tensorflow.cpp | 4 ++-- .../tensorflow_common/src/CMakeLists.txt | 2 +- .../frontend/tensorflow_lite/decoder.hpp | 15 +++++++++++---- .../tensorflow_lite/extension/conversion.hpp | 2 +- .../frontend/tensorflow_lite/frontend.hpp | 2 +- .../frontend/tensorflow_lite/graph_iterator.hpp | 2 +- .../frontend/tensorflow_lite/node_context.hpp | 2 +- .../tensorflow_lite/quantization_info.hpp | 6 ++---- .../frontend/tensorflow_lite/sparsity_info.hpp | 16 ++++++++-------- .../frontend/tensorflow_lite/visibility.hpp | 12 ++++++------ src/frontends/tensorflow_lite/src/decoder.cpp | 13 +++++++++++++ .../tensorflow_lite/src/tensorflow_lite.cpp | 4 ++-- 80 files changed, 240 insertions(+), 132 deletions(-) create mode 100644 src/core/src/op/util/variable_extension.cpp create mode 100644 src/frontends/common/src/complex_type_mark.cpp create mode 100644 src/frontends/common/src/graph_iterator.cpp create mode 100644 src/frontends/common/src/node_context.cpp create mode 100644 src/frontends/jax/src/decoder.cpp create mode 100644 src/frontends/pytorch/src/decoder.cpp create mode 100644 src/frontends/tensorflow/include/openvino/frontend/tensorflow/graph_iterator.hpp create mode 100644 src/frontends/tensorflow_lite/src/decoder.cpp diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.yml index 0fbc20cf19594b..7f2beea9d5ab89 100644 --- a/.github/workflows/mac.yml +++ b/.github/workflows/mac.yml @@ -4,7 +4,7 @@ on: schedule: # at 00:00 on workdays - cron: '0 0 * * 1,2,3,4,5' - #pull_request: + # pull_request: # paths-ignore: # - '**/docs/**' # - 'docs/**' @@ -12,7 +12,7 @@ on: # - '**.md' # - '**/layer_tests_summary/**' # - '**/conformance/**' - #push: + # push: # paths-ignore: # - '**/docs/**' # - 'docs/**' diff --git a/.github/workflows/mac_arm64.yml b/.github/workflows/mac_arm64.yml index b60daefa442c83..7c148a98787903 100644 --- a/.github/workflows/mac_arm64.yml +++ b/.github/workflows/mac_arm64.yml @@ -4,7 +4,7 @@ on: schedule: # at 00:00 on workdays - cron: '0 0 * * 1,2,3,4,5' - #pull_request: + # pull_request: # paths-ignore: # - '**/docs/**' # - 'docs/**' @@ -12,7 +12,7 @@ on: # - '**.md' # - '**/layer_tests_summary/**' # - '**/conformance/**' - #push: + # push: # paths-ignore: # - '**/docs/**' # - 'docs/**' diff --git a/src/bindings/python/src/pyopenvino/frontend/tensorflow/graph_iterator.cpp b/src/bindings/python/src/pyopenvino/frontend/tensorflow/graph_iterator.cpp index 1a5edab7de767a..8c97d0d49162c2 100644 --- a/src/bindings/python/src/pyopenvino/frontend/tensorflow/graph_iterator.cpp +++ b/src/bindings/python/src/pyopenvino/frontend/tensorflow/graph_iterator.cpp @@ -8,7 +8,7 @@ #include "graph_iterator.hpp" -#include "openvino/frontend/graph_iterator.hpp" +#include "openvino/frontend/tensorflow/graph_iterator.hpp" namespace py = pybind11; diff --git a/src/bindings/python/src/pyopenvino/frontend/tensorflow/graph_iterator.hpp b/src/bindings/python/src/pyopenvino/frontend/tensorflow/graph_iterator.hpp index b0e333657f91e2..46e6bdebedcd21 100644 --- a/src/bindings/python/src/pyopenvino/frontend/tensorflow/graph_iterator.hpp +++ b/src/bindings/python/src/pyopenvino/frontend/tensorflow/graph_iterator.hpp @@ -7,7 +7,7 @@ #include #include "openvino/frontend/decoder.hpp" -#include "openvino/frontend/graph_iterator.hpp" +#include "openvino/frontend/tensorflow/graph_iterator.hpp" namespace py = pybind11; diff --git a/src/bindings/python/src/pyopenvino/utils/utils.cpp b/src/bindings/python/src/pyopenvino/utils/utils.cpp index d223a400ea2a49..526be24b989b09 100644 --- a/src/bindings/python/src/pyopenvino/utils/utils.cpp +++ b/src/bindings/python/src/pyopenvino/utils/utils.cpp @@ -454,9 +454,9 @@ ov::Any py_object_to_any(const py::object& py_obj) { // FrontEnd Decoder } else if (py::isinstance(py_obj)) { return py::cast>(py_obj); - // TF FrontEnd GraphIterator - } else if (py::isinstance(py_obj)) { - return py::cast>(py_obj); + // FrontEnd GraphIterator + } else if (py::isinstance(py_obj)) { + return py::cast>(py_obj); // Custom FrontEnd Types } else if (py::isinstance(py_obj)) { return py::cast(py_obj); diff --git a/src/common/low_precision_transformations/include/low_precision/cleanup_transformation.hpp b/src/common/low_precision_transformations/include/low_precision/cleanup_transformation.hpp index 503c519ea60f22..677e14fd370a46 100644 --- a/src/common/low_precision_transformations/include/low_precision/cleanup_transformation.hpp +++ b/src/common/low_precision_transformations/include/low_precision/cleanup_transformation.hpp @@ -17,7 +17,6 @@ namespace low_precision { class LP_TRANSFORMATIONS_API CleanupTransformation : public LayerTransformation { public: CleanupTransformation(const Params& params); - virtual ~CleanupTransformation() = default; bool canBeTransformed(const TransformationContext& context, std::shared_ptr layer) const override; static bool canBeTransformedStatic( diff --git a/src/common/low_precision_transformations/include/low_precision/fuse_elementwise_to_fake_quantize.hpp b/src/common/low_precision_transformations/include/low_precision/fuse_elementwise_to_fake_quantize.hpp index ab1a589845aa10..ba511575fdce02 100644 --- a/src/common/low_precision_transformations/include/low_precision/fuse_elementwise_to_fake_quantize.hpp +++ b/src/common/low_precision_transformations/include/low_precision/fuse_elementwise_to_fake_quantize.hpp @@ -19,7 +19,6 @@ namespace low_precision { class LP_TRANSFORMATIONS_API FuseElementwiseToFakeQuantizeTransformation : public CleanupTransformation { public: FuseElementwiseToFakeQuantizeTransformation(const Params& params); - virtual ~FuseElementwiseToFakeQuantizeTransformation() = default; bool canBeTransformed(const TransformationContext& context, std::shared_ptr layer) const override; }; diff --git a/src/common/low_precision_transformations/include/low_precision/layer_transformation.hpp b/src/common/low_precision_transformations/include/low_precision/layer_transformation.hpp index c675ade19b516b..b997c44bfe8830 100644 --- a/src/common/low_precision_transformations/include/low_precision/layer_transformation.hpp +++ b/src/common/low_precision_transformations/include/low_precision/layer_transformation.hpp @@ -300,7 +300,6 @@ class LP_TRANSFORMATIONS_API LayerTransformation : public ov::pass::MatcherPass }; LayerTransformation(const Params& params); - virtual ~LayerTransformation() = default; virtual bool transform(TransformationContext& context, ov::pass::pattern::Matcher &m) = 0; void setContext(TransformationContext* context) noexcept; diff --git a/src/common/low_precision_transformations/include/low_precision/rt_info/shared_value_attribute.hpp b/src/common/low_precision_transformations/include/low_precision/rt_info/shared_value_attribute.hpp index 04eade094279a9..bf8f51b3077fae 100644 --- a/src/common/low_precision_transformations/include/low_precision/rt_info/shared_value_attribute.hpp +++ b/src/common/low_precision_transformations/include/low_precision/rt_info/shared_value_attribute.hpp @@ -15,8 +15,6 @@ template class LP_TRANSFORMATIONS_API SharedAttribute : public ov::RuntimeAttribute { public: - virtual ~SharedAttribute() = default; - /** * @ingroup ov_transformation_common_api * @brief SharedValueAttribute type for shared value attributes. diff --git a/src/core/include/openvino/core/any.hpp b/src/core/include/openvino/core/any.hpp index 6f65efb5233ab1..3e41ed51ee9c54 100644 --- a/src/core/include/openvino/core/any.hpp +++ b/src/core/include/openvino/core/any.hpp @@ -536,7 +536,7 @@ class OPENVINO_API Any { template U convert_impl() const; - virtual ~Base() = default; + virtual ~Base(); }; template @@ -611,8 +611,6 @@ class OPENVINO_API Any { template Impl(Args&&... args) : value(std::forward(args)...) {} - virtual ~Impl(){}; - const std::type_info& type_info() const override { return typeid(T); } diff --git a/src/core/include/openvino/core/attribute_adapter.hpp b/src/core/include/openvino/core/attribute_adapter.hpp index 706d3e9e363450..8f00cc6cfd601f 100644 --- a/src/core/include/openvino/core/attribute_adapter.hpp +++ b/src/core/include/openvino/core/attribute_adapter.hpp @@ -34,7 +34,7 @@ class OPENVINO_API ValueAccessor { /// \brief type info enables identification of the value accessor, as well as is_type and /// as_type. virtual const DiscreteTypeInfo& get_type_info() const = 0; - virtual ~ValueAccessor() = default; + virtual ~ValueAccessor(); virtual void set_as_any(const ov::Any& x) { OPENVINO_NOT_IMPLEMENTED; } diff --git a/src/core/include/openvino/core/attribute_visitor.hpp b/src/core/include/openvino/core/attribute_visitor.hpp index f1790cba959c2f..35fb5fb0ccd7e4 100644 --- a/src/core/include/openvino/core/attribute_visitor.hpp +++ b/src/core/include/openvino/core/attribute_visitor.hpp @@ -56,7 +56,7 @@ class VisitorAdapter; /// deserialization. class OPENVINO_API AttributeVisitor { public: - virtual ~AttributeVisitor() = default; + virtual ~AttributeVisitor(); // Must implement these methods /// \brief handles all specialized on_adapter methods implemented by the visitor. /// diff --git a/src/core/include/openvino/core/model.hpp b/src/core/include/openvino/core/model.hpp index 5733209f492377..6ad235062eda36 100644 --- a/src/core/include/openvino/core/model.hpp +++ b/src/core/include/openvino/core/model.hpp @@ -107,7 +107,7 @@ class OPENVINO_API Model : public std::enable_shared_from_this { /// based on traversing the graph from the results and the sinks. Model(const ov::OutputVector& results, const ov::SinkVector& sinks, const std::string& name = ""); - virtual ~Model() = default; + virtual ~Model(); /// Return the number of outputs for this Model. size_t get_output_size() const; diff --git a/src/core/include/openvino/core/runtime_attribute.hpp b/src/core/include/openvino/core/runtime_attribute.hpp index 82b860cc99d7ec..86171a81562e90 100644 --- a/src/core/include/openvino/core/runtime_attribute.hpp +++ b/src/core/include/openvino/core/runtime_attribute.hpp @@ -28,7 +28,7 @@ class OPENVINO_API RuntimeAttribute { } using Ptr = std::shared_ptr; using Base = std::tuple<::ov::RuntimeAttribute>; - virtual ~RuntimeAttribute() = default; + virtual ~RuntimeAttribute(); virtual bool is_copyable() const; virtual bool is_copyable(const std::shared_ptr& to) const; virtual Any init(const std::shared_ptr& node) const; diff --git a/src/core/include/openvino/op/util/multi_subgraph_base.hpp b/src/core/include/openvino/op/util/multi_subgraph_base.hpp index 5f6053acfcd281..71ba0ebe4f6b35 100644 --- a/src/core/include/openvino/op/util/multi_subgraph_base.hpp +++ b/src/core/include/openvino/op/util/multi_subgraph_base.hpp @@ -20,7 +20,7 @@ class OPENVINO_API MultiSubGraphOp : public ov::op::Sink { OPENVINO_OP("MultiSubGraphOp", "util", ov::op::Sink); /// \brief Abstract class describes a connection between a MultiSubGraphOp input and /// the body. - class InputDescription { + class OPENVINO_API InputDescription { protected: /// /// \brief Constructs a new instance. @@ -34,7 +34,7 @@ class OPENVINO_API MultiSubGraphOp : public ov::op::Sink { public: using Ptr = std::shared_ptr; using type_info_t = DiscreteTypeInfo; - virtual ~InputDescription() = default; + virtual ~InputDescription(); virtual std::shared_ptr copy() const = 0; virtual const type_info_t& get_type_info() const = 0; @@ -45,7 +45,7 @@ class OPENVINO_API MultiSubGraphOp : public ov::op::Sink { /// \brief Abstract class describes how a MultiSubGraphOp output is produced from /// the body. - class OutputDescription { + class OPENVINO_API OutputDescription { protected: /// /// \brief Constructs a new instance. @@ -59,7 +59,7 @@ class OPENVINO_API MultiSubGraphOp : public ov::op::Sink { public: using Ptr = std::shared_ptr; using type_info_t = DiscreteTypeInfo; - virtual ~OutputDescription() = default; + virtual ~OutputDescription(); virtual std::shared_ptr copy() const = 0; virtual const type_info_t& get_type_info() const = 0; diff --git a/src/core/include/openvino/op/util/variable_extension.hpp b/src/core/include/openvino/op/util/variable_extension.hpp index 924bd97c17f9a2..e4f811afe52a8f 100644 --- a/src/core/include/openvino/op/util/variable_extension.hpp +++ b/src/core/include/openvino/op/util/variable_extension.hpp @@ -39,7 +39,7 @@ class OPENVINO_API VariableExtension { virtual std::string get_variable_id() const = 0; protected: - virtual ~VariableExtension(){}; + virtual ~VariableExtension(); protected: std::shared_ptr m_variable; diff --git a/src/core/include/openvino/pass/pass.hpp b/src/core/include/openvino/pass/pass.hpp index fc019859128f25..6440114ab9a8ec 100644 --- a/src/core/include/openvino/pass/pass.hpp +++ b/src/core/include/openvino/pass/pass.hpp @@ -44,7 +44,7 @@ class OPENVINO_API PassBase { public: PassBase(); - virtual ~PassBase() = default; + virtual ~PassBase(); /// Check if this pass has all the pass properties. bool get_property(const PassPropertyMask& prop_mask) const; diff --git a/src/core/include/openvino/pass/pattern/matcher.hpp b/src/core/include/openvino/pass/pattern/matcher.hpp index f39b284702969e..acf7c85841fc09 100644 --- a/src/core/include/openvino/pass/pattern/matcher.hpp +++ b/src/core/include/openvino/pass/pattern/matcher.hpp @@ -108,7 +108,8 @@ class OPENVINO_API Matcher { Matcher(std::shared_ptr pattern_node, const std::string& name); Matcher(std::shared_ptr pattern_node, const std::string& name, bool strict_mode); - virtual ~Matcher() = default; + virtual ~Matcher(); + /// \brief Matches a pattern to \p graph_node /// /// \param graph_value is an input graph to be matched against @@ -176,7 +177,7 @@ class OPENVINO_API Matcher { size_t add_node(Output node); - bool virtual match_value(const ov::Output& pattern_value, const ov::Output& graph_value); + virtual bool match_value(const ov::Output& pattern_value, const ov::Output& graph_value); bool is_strict_mode() { return m_strict_mode; diff --git a/src/core/include/openvino/runtime/allocator.hpp b/src/core/include/openvino/runtime/allocator.hpp index 4180d90b0ce4bf..ae62fb7b290802 100644 --- a/src/core/include/openvino/runtime/allocator.hpp +++ b/src/core/include/openvino/runtime/allocator.hpp @@ -37,7 +37,7 @@ class OPENVINO_API Allocator { friend class ov::Tensor; - struct Base : public std::enable_shared_from_this { + struct OPENVINO_API Base : public std::enable_shared_from_this { virtual void* addressof() = 0; const void* addressof() const { return const_cast(this)->addressof(); @@ -48,7 +48,7 @@ class OPENVINO_API Allocator { virtual bool is_equal(const Base& other) const = 0; protected: - virtual ~Base() = default; + virtual ~Base(); }; template diff --git a/src/core/reference/include/openvino/reference/utils/philox_converter.hpp b/src/core/reference/include/openvino/reference/utils/philox_converter.hpp index 45fbb7d160a247..bf6baaff8af1d4 100644 --- a/src/core/reference/include/openvino/reference/utils/philox_converter.hpp +++ b/src/core/reference/include/openvino/reference/utils/philox_converter.hpp @@ -19,7 +19,7 @@ class PhiloxConverter { public: PhiloxConverter() = delete; - virtual ~PhiloxConverter(){}; + virtual ~PhiloxConverter() = default; /// \brief Returns the number of generated elements per execution /// based on the requested data type. diff --git a/src/core/reference/include/openvino/reference/utils/philox_generator.hpp b/src/core/reference/include/openvino/reference/utils/philox_generator.hpp index f38a947b9ded27..81ea89acf0c55c 100644 --- a/src/core/reference/include/openvino/reference/utils/philox_generator.hpp +++ b/src/core/reference/include/openvino/reference/utils/philox_generator.hpp @@ -30,7 +30,7 @@ class PhiloxGenerator { public: PhiloxGenerator() = delete; - virtual ~PhiloxGenerator(){}; + virtual ~PhiloxGenerator() = default; /// @brief Get a set of 4 random 32-bit unsigned integers based on the seed(s). /// @return A vector with a random set of 4 32-bit unsigned integers. diff --git a/src/core/src/any.cpp b/src/core/src/any.cpp index 1637a139680394..4dd9ce40af5703 100644 --- a/src/core/src/any.cpp +++ b/src/core/src/any.cpp @@ -30,6 +30,8 @@ bool util::equal(std::type_index lhs, std::type_index rhs) { return result; } +Any::Base::~Base() = default; + bool Any::Base::is(const std::type_info& other) const { return util::equal(type_info(), other); } diff --git a/src/core/src/attribute_visitor.cpp b/src/core/src/attribute_visitor.cpp index 63a59591e37839..991e549fa83cf0 100644 --- a/src/core/src/attribute_visitor.cpp +++ b/src/core/src/attribute_visitor.cpp @@ -10,6 +10,10 @@ using namespace std; +ov::ValueAccessor::~ValueAccessor() = default; + +ov::AttributeVisitor::~AttributeVisitor() = default; + void ov::AttributeVisitor::start_structure(const string& name) { m_context.push_back(name); } diff --git a/src/core/src/model.cpp b/src/core/src/model.cpp index c9a25676b9cf2e..44ac9c9177d955 100644 --- a/src/core/src/model.cpp +++ b/src/core/src/model.cpp @@ -221,6 +221,8 @@ ov::Model::Model(const ov::OutputVector& results, const ov::SinkVector& sinks, c ov::Model::Model(const OutputVector& results, const string& name) : Model(results, ov::SinkVector{}, name) {} +ov::Model::~Model() = default; + void ov::Model::prerequirements(bool detect_variables, bool detect_parameters) { OV_ITT_SCOPED_TASK(ov::itt::domains::core, "Model::prerequirements"); diff --git a/src/core/src/op/util/multi_subgraph_base.cpp b/src/core/src/op/util/multi_subgraph_base.cpp index 6b7f78afcfff86..5e5f84d8ff7353 100644 --- a/src/core/src/op/util/multi_subgraph_base.cpp +++ b/src/core/src/op/util/multi_subgraph_base.cpp @@ -8,10 +8,14 @@ ov::op::util::MultiSubGraphOp::InputDescription::InputDescription(uint64_t input : m_input_index(input_index), m_body_parameter_index(body_parameter_index) {} +ov::op::util::MultiSubGraphOp::InputDescription::~InputDescription() = default; + ov::op::util::MultiSubGraphOp::OutputDescription::OutputDescription(uint64_t body_value_index, uint64_t output_index) : m_body_value_index(body_value_index), m_output_index(output_index) {} +ov::op::util::MultiSubGraphOp::OutputDescription::~OutputDescription() = default; + ov::op::util::MultiSubGraphOp::SliceInputDescription::SliceInputDescription(uint64_t input_index, uint64_t body_parameter_index, int64_t start, diff --git a/src/core/src/op/util/variable_extension.cpp b/src/core/src/op/util/variable_extension.cpp new file mode 100644 index 00000000000000..b49055dbccd8f4 --- /dev/null +++ b/src/core/src/op/util/variable_extension.cpp @@ -0,0 +1,9 @@ +// Copyright (C) 2018-2025 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "openvino/op/util/variable_extension.hpp" + +using namespace ov::op::util; + +VariableExtension::~VariableExtension() = default; diff --git a/src/core/src/pass/pass.cpp b/src/core/src/pass/pass.cpp index 73a3f7261e5d56..420b8d2729828a 100644 --- a/src/core/src/pass/pass.cpp +++ b/src/core/src/pass/pass.cpp @@ -16,6 +16,8 @@ using namespace std; ov::pass::PassBase::PassBase() : m_property(), m_name(), m_pass_config(std::make_shared()) {} +ov::pass::PassBase::~PassBase() = default; + bool ov::pass::PassBase::get_property(const PassPropertyMask& prop) const { return m_property.is_set(prop); } diff --git a/src/core/src/pattern/matcher.cpp b/src/core/src/pattern/matcher.cpp index 54e153ebbaa962..3681b933cebe14 100644 --- a/src/core/src/pattern/matcher.cpp +++ b/src/core/src/pattern/matcher.cpp @@ -37,6 +37,8 @@ Matcher::Matcher(std::shared_ptr pattern_node, const std::string& name) Matcher::Matcher(std::shared_ptr pattern_node, const std::string& name, bool strict_mode) : Matcher(make_node_output(pattern_node), name, strict_mode) {} +Matcher::~Matcher() = default; + MatcherState::~MatcherState() { if (m_restore) { if (!m_matcher->m_matched_list.empty()) { diff --git a/src/core/src/runtime/allocator.cpp b/src/core/src/runtime/allocator.cpp index 2a1d8a79ad3ddf..729a61d9b0d8dc 100644 --- a/src/core/src/runtime/allocator.cpp +++ b/src/core/src/runtime/allocator.cpp @@ -45,6 +45,8 @@ struct DefaultAllocator { } }; +Allocator::Base::~Base() = default; + Allocator::Allocator() : Allocator{DefaultAllocator{}} {} Allocator::~Allocator() { diff --git a/src/core/src/runtime_attribute.cpp b/src/core/src/runtime_attribute.cpp index e936afd6b29a76..cf67b09cb2b37d 100644 --- a/src/core/src/runtime_attribute.cpp +++ b/src/core/src/runtime_attribute.cpp @@ -9,6 +9,8 @@ namespace ov { +RuntimeAttribute::~RuntimeAttribute() = default; + std::string RuntimeAttribute::to_string() const { return {}; } diff --git a/src/frontends/common/include/openvino/frontend/complex_type_mark.hpp b/src/frontends/common/include/openvino/frontend/complex_type_mark.hpp index e7a89f4f3e933a..b23004237622a2 100644 --- a/src/frontends/common/include/openvino/frontend/complex_type_mark.hpp +++ b/src/frontends/common/include/openvino/frontend/complex_type_mark.hpp @@ -5,6 +5,7 @@ #pragma once #include "openvino/core/type/element_type.hpp" +#include "openvino/frontend/visibility.hpp" #include "openvino/op/util/framework_node.hpp" namespace ov { @@ -17,7 +18,7 @@ namespace frontend { // into a floating-point tensor [N1, N2, ..., Nk, 2] // where a slice with index [..., 0] represents a real part and // a slice with index [..., 1] represents a imaginary part. -class ComplexTypeMark : public ov::op::util::FrameworkNode { +class FRONTEND_API ComplexTypeMark : public ov::op::util::FrameworkNode { public: OPENVINO_OP("ComplexTypeMark", "util", ov::op::util::FrameworkNode); @@ -27,6 +28,8 @@ class ComplexTypeMark : public ov::op::util::FrameworkNode { validate_and_infer_types(); } + ~ComplexTypeMark() override; + void validate_and_infer_types() override { set_output_type(0, ov::element::dynamic, PartialShape::dynamic()); } diff --git a/src/frontends/common/include/openvino/frontend/decoder.hpp b/src/frontends/common/include/openvino/frontend/decoder.hpp index 46afa8aee1cfe9..7794cc23b94b04 100644 --- a/src/frontends/common/include/openvino/frontend/decoder.hpp +++ b/src/frontends/common/include/openvino/frontend/decoder.hpp @@ -49,9 +49,9 @@ struct Union; } // namespace type /// Plays a role of node, block and module decoder -class IDecoder { +class FRONTEND_API IDecoder { public: - virtual ~IDecoder() = default; + virtual ~IDecoder(); }; class FRONTEND_API DecoderBase : public IDecoder { diff --git a/src/frontends/common/include/openvino/frontend/graph_iterator.hpp b/src/frontends/common/include/openvino/frontend/graph_iterator.hpp index 054173f1f41bdb..d26895c6a05abb 100644 --- a/src/frontends/common/include/openvino/frontend/graph_iterator.hpp +++ b/src/frontends/common/include/openvino/frontend/graph_iterator.hpp @@ -10,7 +10,6 @@ namespace ov { namespace frontend { -namespace tensorflow { /// Abstract representation for an input model graph that gives nodes in topologically sorted order class FRONTEND_API GraphIterator : ::ov::RuntimeAttribute { @@ -34,9 +33,6 @@ class FRONTEND_API GraphIterator : ::ov::RuntimeAttribute { /// \brief Return a pointer to a decoder of the current node virtual std::shared_ptr get_decoder() const = 0; - /// \brief Destructor - virtual ~GraphIterator() = default; - /// \brief Checks if the main model graph contains a function of the requested name in the library /// Returns GraphIterator to this function and nullptr, if it does not exist virtual std::shared_ptr get_body_graph_iterator(const std::string& func_name) const = 0; @@ -48,16 +44,11 @@ class FRONTEND_API GraphIterator : ::ov::RuntimeAttribute { virtual std::vector get_output_names() const = 0; /// \brief Returns a map from internal tensor name to (user-defined) external name for inputs - virtual std::map get_input_names_map() const { - return {}; - } + virtual std::map get_input_names_map() const; /// \brief Returns a map from internal tensor name to (user-defined) external name for outputs - virtual std::map get_output_names_map() const { - return {}; - } + virtual std::map get_output_names_map() const; }; -} // namespace tensorflow } // namespace frontend } // namespace ov diff --git a/src/frontends/common/include/openvino/frontend/input_model.hpp b/src/frontends/common/include/openvino/frontend/input_model.hpp index f679a28d41aca5..5ea01dba5ea97a 100644 --- a/src/frontends/common/include/openvino/frontend/input_model.hpp +++ b/src/frontends/common/include/openvino/frontend/input_model.hpp @@ -51,7 +51,7 @@ class FRONTEND_API InputModel { InputModel& operator=(const InputModel&) = delete; InputModel& operator=(InputModel&&) = delete; - virtual ~InputModel() = default; + virtual ~InputModel(); ///// Searching for places ///// diff --git a/src/frontends/common/include/openvino/frontend/node_context.hpp b/src/frontends/common/include/openvino/frontend/node_context.hpp index 2fb607f3644b16..9d6bb78789298b 100644 --- a/src/frontends/common/include/openvino/frontend/node_context.hpp +++ b/src/frontends/common/include/openvino/frontend/node_context.hpp @@ -18,7 +18,7 @@ class FRONTEND_API NodeContext { public: // TODO: Why this ctor is explicit when get_op_type is virtual so m_op_type looks to be a custom implementation explicit NodeContext(const std::string& op_type) : m_op_type(op_type) {} - virtual ~NodeContext() = default; + virtual ~NodeContext(); /// \brief Returns a number of inputs virtual size_t get_input_size() const { diff --git a/src/frontends/common/include/openvino/frontend/place.hpp b/src/frontends/common/include/openvino/frontend/place.hpp index ecaed4cd93b2da..be661149dc09e5 100644 --- a/src/frontends/common/include/openvino/frontend/place.hpp +++ b/src/frontends/common/include/openvino/frontend/place.hpp @@ -61,7 +61,7 @@ class FRONTEND_API Place { public: typedef std::shared_ptr Ptr; - virtual ~Place() = 0; + virtual ~Place(); /// \brief All associated names (synonyms) that identify this place in the graph in a /// framework specific way diff --git a/src/frontends/common/src/complex_type_mark.cpp b/src/frontends/common/src/complex_type_mark.cpp new file mode 100644 index 00000000000000..25ccb1fe4a2095 --- /dev/null +++ b/src/frontends/common/src/complex_type_mark.cpp @@ -0,0 +1,9 @@ +// Copyright (C) 2018-2025 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "openvino/frontend/complex_type_mark.hpp" + +using namespace ov::frontend; + +ComplexTypeMark::~ComplexTypeMark() = default; diff --git a/src/frontends/common/src/decoder.cpp b/src/frontends/common/src/decoder.cpp index b9f4b27da2ce99..f793a3fd2f47e7 100644 --- a/src/frontends/common/src/decoder.cpp +++ b/src/frontends/common/src/decoder.cpp @@ -6,4 +6,6 @@ using namespace ov::frontend; -DecoderBase::~DecoderBase() = default; \ No newline at end of file +IDecoder::~IDecoder() = default; + +DecoderBase::~DecoderBase() = default; diff --git a/src/frontends/common/src/graph_iterator.cpp b/src/frontends/common/src/graph_iterator.cpp new file mode 100644 index 00000000000000..c1293a7812a8a0 --- /dev/null +++ b/src/frontends/common/src/graph_iterator.cpp @@ -0,0 +1,15 @@ +// Copyright (C) 2018-2025 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "openvino/frontend/graph_iterator.hpp" + +using namespace ov::frontend; + +std::map GraphIterator::get_input_names_map() const { + return {}; +} + +std::map GraphIterator::get_output_names_map() const { + return {}; +} diff --git a/src/frontends/common/src/hash_table.cpp b/src/frontends/common/src/hash_table.cpp index f01abd3c9d5bbe..4c8a465e4152a8 100644 --- a/src/frontends/common/src/hash_table.cpp +++ b/src/frontends/common/src/hash_table.cpp @@ -6,4 +6,4 @@ using namespace ov::frontend; -HashTable::~HashTable(){}; +HashTable::~HashTable() = default; diff --git a/src/frontends/common/src/input_model.cpp b/src/frontends/common/src/input_model.cpp index f2c52f2eb696d1..11d474aaec4bcb 100644 --- a/src/frontends/common/src/input_model.cpp +++ b/src/frontends/common/src/input_model.cpp @@ -12,6 +12,8 @@ using namespace ov; using namespace ov::frontend; +InputModel::~InputModel() = default; + std::vector InputModel::get_inputs() const { if (!m_actual) { return {}; diff --git a/src/frontends/common/src/node_context.cpp b/src/frontends/common/src/node_context.cpp new file mode 100644 index 00000000000000..91c8c8c911ca9e --- /dev/null +++ b/src/frontends/common/src/node_context.cpp @@ -0,0 +1,9 @@ +// Copyright (C) 2018-2025 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "openvino/frontend/node_context.hpp" + +using namespace ov::frontend; + +NodeContext::~NodeContext() = default; diff --git a/src/frontends/common/src/variable.cpp b/src/frontends/common/src/variable.cpp index 9c82520d568bd2..b0fb30280080f3 100644 --- a/src/frontends/common/src/variable.cpp +++ b/src/frontends/common/src/variable.cpp @@ -6,4 +6,4 @@ using namespace ov::frontend; -Variable::~Variable(){}; +Variable::~Variable() = default; diff --git a/src/frontends/jax/include/openvino/frontend/jax/decoder.hpp b/src/frontends/jax/include/openvino/frontend/jax/decoder.hpp index 2cddb8b936d860..252feedb9f6115 100644 --- a/src/frontends/jax/include/openvino/frontend/jax/decoder.hpp +++ b/src/frontends/jax/include/openvino/frontend/jax/decoder.hpp @@ -11,12 +11,13 @@ #include "openvino/core/node.hpp" #include "openvino/core/node_vector.hpp" #include "openvino/frontend/decoder.hpp" +#include "openvino/frontend/jax/visibility.hpp" namespace ov { namespace frontend { namespace jax { -class JaxDecoder : public IDecoder { +class JAX_FRONTEND_API JaxDecoder : public IDecoder { public: virtual OutputVector as_constant() const = 0; @@ -64,6 +65,8 @@ class JaxDecoder : public IDecoder { /// If there is no query for specific sub-graph it shouldn't be converted // node_visitor is a function that will be fed by nodes in subgraph for all nodes in graph virtual void visit_subgraph(std::function)> node_visitor) const = 0; + + ~JaxDecoder() override; }; } // namespace jax diff --git a/src/frontends/jax/include/openvino/frontend/jax/extension/conversion.hpp b/src/frontends/jax/include/openvino/frontend/jax/extension/conversion.hpp index 490177dde53e5d..2fb18cd4907fe1 100644 --- a/src/frontends/jax/include/openvino/frontend/jax/extension/conversion.hpp +++ b/src/frontends/jax/include/openvino/frontend/jax/extension/conversion.hpp @@ -13,7 +13,7 @@ namespace ov { namespace frontend { namespace jax { -class JAX_API ConversionExtension : public ConversionExtensionBase { +class JAX_FRONTEND_API ConversionExtension : public ConversionExtensionBase { public: using Ptr = std::shared_ptr; diff --git a/src/frontends/jax/include/openvino/frontend/jax/frontend.hpp b/src/frontends/jax/include/openvino/frontend/jax/frontend.hpp index e40d6b772b95fa..94a6a859f76c04 100644 --- a/src/frontends/jax/include/openvino/frontend/jax/frontend.hpp +++ b/src/frontends/jax/include/openvino/frontend/jax/frontend.hpp @@ -14,7 +14,7 @@ namespace ov { namespace frontend { namespace jax { -class JAX_API FrontEnd : public ov::frontend::FrontEnd { +class JAX_FRONTEND_API FrontEnd : public ov::frontend::FrontEnd { public: using Ptr = std::shared_ptr; FrontEnd(); diff --git a/src/frontends/jax/include/openvino/frontend/jax/visibility.hpp b/src/frontends/jax/include/openvino/frontend/jax/visibility.hpp index 609248d4fc964e..f5c62f99c6a7c7 100644 --- a/src/frontends/jax/include/openvino/frontend/jax/visibility.hpp +++ b/src/frontends/jax/include/openvino/frontend/jax/visibility.hpp @@ -7,14 +7,14 @@ #include "openvino/frontend/visibility.hpp" #ifdef OPENVINO_STATIC_LIBRARY -# define JAX_API -# define JAX_C_API +# define JAX_FRONTEND_API +# define JAX_FRONTEND_C_API #else # ifdef openvino_jax_frontend_EXPORTS -# define JAX_API OPENVINO_CORE_EXPORTS -# define JAX_C_API OPENVINO_EXTERN_C OPENVINO_CORE_EXPORTS +# define JAX_FRONTEND_API OPENVINO_CORE_EXPORTS +# define JAX_FRONTEND_C_API OPENVINO_EXTERN_C OPENVINO_CORE_EXPORTS # else -# define JAX_API OPENVINO_CORE_IMPORTS -# define JAX_C_API OPENVINO_EXTERN_C OPENVINO_CORE_IMPORTS +# define JAX_FRONTEND_API OPENVINO_CORE_IMPORTS +# define JAX_FRONTEND_C_API OPENVINO_EXTERN_C OPENVINO_CORE_IMPORTS # endif // openvino_jax_frontend_EXPORTS #endif // OPENVINO_STATIC_LIBRARY diff --git a/src/frontends/jax/src/decoder.cpp b/src/frontends/jax/src/decoder.cpp new file mode 100644 index 00000000000000..d3eda7de215c37 --- /dev/null +++ b/src/frontends/jax/src/decoder.cpp @@ -0,0 +1,7 @@ +// Copyright (C) 2018-2025 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "openvino/frontend/jax/decoder.hpp" + +ov::frontend::jax::JaxDecoder::~JaxDecoder() = default; diff --git a/src/frontends/jax/src/jax.cpp b/src/frontends/jax/src/jax.cpp index 62fdbb1f01797e..4fbb08a4099b01 100644 --- a/src/frontends/jax/src/jax.cpp +++ b/src/frontends/jax/src/jax.cpp @@ -6,11 +6,11 @@ #include "openvino/frontend/jax/visibility.hpp" #include "openvino/frontend/manager.hpp" -JAX_C_API ov::frontend::FrontEndVersion get_api_version() { +JAX_FRONTEND_C_API ov::frontend::FrontEndVersion get_api_version() { return OV_FRONTEND_API_VERSION; } -JAX_C_API void* get_front_end_data() { +JAX_FRONTEND_C_API void* get_front_end_data() { auto res = new ov::frontend::FrontEndPluginInfo(); res->m_name = "jax"; res->m_creator = []() { diff --git a/src/frontends/paddle/include/openvino/frontend/paddle/extension/conversion.hpp b/src/frontends/paddle/include/openvino/frontend/paddle/extension/conversion.hpp index f27ddd55169b6c..d1b32052eb08bb 100644 --- a/src/frontends/paddle/include/openvino/frontend/paddle/extension/conversion.hpp +++ b/src/frontends/paddle/include/openvino/frontend/paddle/extension/conversion.hpp @@ -13,7 +13,7 @@ namespace ov { namespace frontend { namespace paddle { -class PADDLE_API ConversionExtension : public ConversionExtensionBase { +class PADDLE_FRONTEND_API ConversionExtension : public ConversionExtensionBase { public: using Ptr = std::shared_ptr; diff --git a/src/frontends/paddle/include/openvino/frontend/paddle/frontend.hpp b/src/frontends/paddle/include/openvino/frontend/paddle/frontend.hpp index 54bf8961c48c8b..77b59aa4ca695d 100644 --- a/src/frontends/paddle/include/openvino/frontend/paddle/frontend.hpp +++ b/src/frontends/paddle/include/openvino/frontend/paddle/frontend.hpp @@ -21,7 +21,7 @@ namespace paddle { class OpPlace; class TensorPlace; -class PADDLE_API FrontEnd : public ov::frontend::FrontEnd { +class PADDLE_FRONTEND_API FrontEnd : public ov::frontend::FrontEnd { public: using Ptr = std::shared_ptr; FrontEnd(); diff --git a/src/frontends/paddle/include/openvino/frontend/paddle/visibility.hpp b/src/frontends/paddle/include/openvino/frontend/paddle/visibility.hpp index d2430e9489a282..e9ea45c727cea4 100644 --- a/src/frontends/paddle/include/openvino/frontend/paddle/visibility.hpp +++ b/src/frontends/paddle/include/openvino/frontend/paddle/visibility.hpp @@ -7,14 +7,14 @@ #include "openvino/frontend/exception.hpp" #ifdef OPENVINO_STATIC_LIBRARY -# define PADDLE_API -# define PADDLE_C_API +# define PADDLE_FRONTEND_API +# define PADDLE_FRONTEND_C_API #else # ifdef openvino_paddle_frontend_EXPORTS -# define PADDLE_API OPENVINO_CORE_EXPORTS -# define PADDLE_C_API OPENVINO_EXTERN_C OPENVINO_CORE_EXPORTS +# define PADDLE_FRONTEND_API OPENVINO_CORE_EXPORTS +# define PADDLE_FRONTEND_C_API OPENVINO_EXTERN_C OPENVINO_CORE_EXPORTS # else -# define PADDLE_API OPENVINO_CORE_IMPORTS -# define PADDLE_C_API OPENVINO_EXTERN_C OPENVINO_CORE_IMPORTS +# define PADDLE_FRONTEND_API OPENVINO_CORE_IMPORTS +# define PADDLE_FRONTEND_C_API OPENVINO_EXTERN_C OPENVINO_CORE_IMPORTS # endif // openvino_paddle_frontend_EXPORTS #endif // OPENVINO_STATIC_LIBRARY diff --git a/src/frontends/paddle/src/frontend.cpp b/src/frontends/paddle/src/frontend.cpp index 22d5547489e723..c20852ebff655d 100644 --- a/src/frontends/paddle/src/frontend.cpp +++ b/src/frontends/paddle/src/frontend.cpp @@ -586,11 +586,11 @@ void FrontEnd::normalize(const std::shared_ptr& model) const { } // namespace frontend } // namespace ov -PADDLE_C_API FrontEndVersion get_api_version() { +PADDLE_FRONTEND_C_API FrontEndVersion get_api_version() { return OV_FRONTEND_API_VERSION; } -PADDLE_C_API void* get_front_end_data() { +PADDLE_FRONTEND_C_API void* get_front_end_data() { FrontEndPluginInfo* res = new FrontEndPluginInfo(); res->m_name = "paddle"; res->m_creator = []() { diff --git a/src/frontends/pytorch/include/openvino/frontend/pytorch/decoder.hpp b/src/frontends/pytorch/include/openvino/frontend/pytorch/decoder.hpp index 3da741be645cc5..97546c03534c0a 100644 --- a/src/frontends/pytorch/include/openvino/frontend/pytorch/decoder.hpp +++ b/src/frontends/pytorch/include/openvino/frontend/pytorch/decoder.hpp @@ -6,6 +6,7 @@ #include "openvino/core/node.hpp" #include "openvino/frontend/decoder.hpp" +#include "openvino/frontend/pytorch/visibility.hpp" namespace ov { namespace frontend { @@ -14,8 +15,10 @@ namespace pytorch { using DecoderRTInfo = std::unordered_map; /// Plays a role of node, block and module decoder (kind of temporary fat API) -class TorchDecoder : public IDecoder { +class PYTORCH_FRONTEND_API TorchDecoder : public IDecoder { public: + ~TorchDecoder() override; + // Do not search for input in tensor map; try to access it as a constant of specified type T and return its value // Using Any here is an easy way to avoid template definition, returned object is supposed to be of one of the // fundamental types like int, float etc. diff --git a/src/frontends/pytorch/include/openvino/frontend/pytorch/extension/conversion.hpp b/src/frontends/pytorch/include/openvino/frontend/pytorch/extension/conversion.hpp index 6c321ccd22df05..cf1f8632045a46 100644 --- a/src/frontends/pytorch/include/openvino/frontend/pytorch/extension/conversion.hpp +++ b/src/frontends/pytorch/include/openvino/frontend/pytorch/extension/conversion.hpp @@ -13,7 +13,7 @@ namespace ov { namespace frontend { namespace pytorch { -class PYTORCH_API ConversionExtension : public ConversionExtensionBase { +class PYTORCH_FRONTEND_API ConversionExtension : public ConversionExtensionBase { public: using Ptr = std::shared_ptr; diff --git a/src/frontends/pytorch/include/openvino/frontend/pytorch/frontend.hpp b/src/frontends/pytorch/include/openvino/frontend/pytorch/frontend.hpp index 76baa62a334dcb..6575aeb4fd983e 100644 --- a/src/frontends/pytorch/include/openvino/frontend/pytorch/frontend.hpp +++ b/src/frontends/pytorch/include/openvino/frontend/pytorch/frontend.hpp @@ -14,7 +14,7 @@ namespace ov { namespace frontend { namespace pytorch { -class PYTORCH_API FrontEnd : public ov::frontend::FrontEnd { +class PYTORCH_FRONTEND_API FrontEnd : public ov::frontend::FrontEnd { public: using Ptr = std::shared_ptr; FrontEnd(); diff --git a/src/frontends/pytorch/include/openvino/frontend/pytorch/visibility.hpp b/src/frontends/pytorch/include/openvino/frontend/pytorch/visibility.hpp index 3911ad8693bcf0..da35017bb868fa 100644 --- a/src/frontends/pytorch/include/openvino/frontend/pytorch/visibility.hpp +++ b/src/frontends/pytorch/include/openvino/frontend/pytorch/visibility.hpp @@ -7,14 +7,14 @@ #include "openvino/frontend/visibility.hpp" #ifdef OPENVINO_STATIC_LIBRARY -# define PYTORCH_API -# define PYTORCH_C_API +# define PYTORCH_FRONTEND_API +# define PYTORCH_FRONTEND_C_API #else # ifdef openvino_pytorch_frontend_EXPORTS -# define PYTORCH_API OPENVINO_CORE_EXPORTS -# define PYTORCH_C_API OPENVINO_EXTERN_C OPENVINO_CORE_EXPORTS +# define PYTORCH_FRONTEND_API OPENVINO_CORE_EXPORTS +# define PYTORCH_FRONTEND_C_API OPENVINO_EXTERN_C OPENVINO_CORE_EXPORTS # else -# define PYTORCH_API OPENVINO_CORE_IMPORTS -# define PYTORCH_C_API OPENVINO_EXTERN_C OPENVINO_CORE_IMPORTS +# define PYTORCH_FRONTEND_API OPENVINO_CORE_IMPORTS +# define PYTORCH_FRONTEND_C_API OPENVINO_EXTERN_C OPENVINO_CORE_IMPORTS # endif // openvino_pytorch_frontend_EXPORTS #endif // OPENVINO_STATIC_LIBRARY diff --git a/src/frontends/pytorch/src/decoder.cpp b/src/frontends/pytorch/src/decoder.cpp new file mode 100644 index 00000000000000..b07e4cbbd8c3f5 --- /dev/null +++ b/src/frontends/pytorch/src/decoder.cpp @@ -0,0 +1,7 @@ +// Copyright (C) 2018-2025 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "openvino/frontend/pytorch/decoder.hpp" + +ov::frontend::pytorch::TorchDecoder::~TorchDecoder() = default; diff --git a/src/frontends/pytorch/src/frontend.cpp b/src/frontends/pytorch/src/frontend.cpp index 04ba9a9c92c281..49e407d2a5010b 100644 --- a/src/frontends/pytorch/src/frontend.cpp +++ b/src/frontends/pytorch/src/frontend.cpp @@ -396,14 +396,15 @@ ov::frontend::InputModel::Ptr FrontEnd::load_impl(const std::vector& va size_t extra_variants_num = variants.size() > 0 && variants[variants.size() - 1].is() ? 1 : 0; FRONT_END_GENERAL_CHECK(variants.size() == 1 + extra_variants_num, "PyTorch Frontend supports exactly one parameter in model representation, got ", - std::to_string(variants.size()), + variants.size(), " instead."); FRONT_END_GENERAL_CHECK(variants[0].is>(), "PyTorch Frontend doesn't support provided model type. Please provide supported model " "object using Python API."); auto decoder = variants[0].as>(); + FRONT_END_GENERAL_CHECK(decoder, "Couldn't cast ov::Any to std::shared_ptr"); auto tdecoder = std::dynamic_pointer_cast(decoder); - FRONT_END_GENERAL_CHECK(tdecoder, "Couldn't cast ov::Any to TorchDecoder"); + FRONT_END_GENERAL_CHECK(tdecoder, "Couldn't cast IDecoder to TorchDecoder"); return std::make_shared(tdecoder); } diff --git a/src/frontends/pytorch/src/pytorch.cpp b/src/frontends/pytorch/src/pytorch.cpp index 967fb43aa5840e..82dda9f5a84a4a 100644 --- a/src/frontends/pytorch/src/pytorch.cpp +++ b/src/frontends/pytorch/src/pytorch.cpp @@ -6,11 +6,11 @@ #include "openvino/frontend/pytorch/frontend.hpp" #include "openvino/frontend/pytorch/visibility.hpp" -PYTORCH_C_API ov::frontend::FrontEndVersion get_api_version() { +PYTORCH_FRONTEND_C_API ov::frontend::FrontEndVersion get_api_version() { return OV_FRONTEND_API_VERSION; } -PYTORCH_C_API void* get_front_end_data() { +PYTORCH_FRONTEND_C_API void* get_front_end_data() { auto res = new ov::frontend::FrontEndPluginInfo(); res->m_name = "pytorch"; res->m_creator = []() { diff --git a/src/frontends/pytorch/src/transforms/aten_index_put_replacer.hpp b/src/frontends/pytorch/src/transforms/aten_index_put_replacer.hpp index ee887004fa30f4..6a795b2d1d4f48 100644 --- a/src/frontends/pytorch/src/transforms/aten_index_put_replacer.hpp +++ b/src/frontends/pytorch/src/transforms/aten_index_put_replacer.hpp @@ -4,7 +4,6 @@ #pragma once -#include "openvino/frontend/pytorch/visibility.hpp" #include "openvino/pass/graph_rewrite.hpp" #include "openvino/pass/pass.hpp" @@ -13,7 +12,7 @@ namespace frontend { namespace pytorch { namespace pass { -class PYTORCH_API AtenIndexPutReplacer : public ov::pass::MatcherPass { +class AtenIndexPutReplacer : public ov::pass::MatcherPass { public: OPENVINO_MATCHER_PASS_RTTI("ov::frontend::pytorch::pass::AtenIndexPutReplacer"); AtenIndexPutReplacer(); diff --git a/src/frontends/pytorch/src/transforms/aten_index_replacer.hpp b/src/frontends/pytorch/src/transforms/aten_index_replacer.hpp index 2aa81063f4e05f..5d1eb662dc687b 100644 --- a/src/frontends/pytorch/src/transforms/aten_index_replacer.hpp +++ b/src/frontends/pytorch/src/transforms/aten_index_replacer.hpp @@ -4,7 +4,6 @@ #pragma once -#include "openvino/frontend/pytorch/visibility.hpp" #include "openvino/pass/graph_rewrite.hpp" #include "openvino/pass/pass.hpp" @@ -14,7 +13,7 @@ namespace pytorch { namespace pass { // This transformation replaces pattern prim::ListConstruct->aten::index -class PYTORCH_API AtenIndexToSelect : public ov::pass::MatcherPass { +class AtenIndexToSelect : public ov::pass::MatcherPass { public: OPENVINO_MATCHER_PASS_RTTI("ov::frontend::pytorch::pass::AtenIndexToSelect"); AtenIndexToSelect(); diff --git a/src/frontends/tensorflow/include/openvino/frontend/tensorflow/extension/conversion.hpp b/src/frontends/tensorflow/include/openvino/frontend/tensorflow/extension/conversion.hpp index 0b6b2aa5414fc4..cec9d2b872c345 100644 --- a/src/frontends/tensorflow/include/openvino/frontend/tensorflow/extension/conversion.hpp +++ b/src/frontends/tensorflow/include/openvino/frontend/tensorflow/extension/conversion.hpp @@ -13,7 +13,7 @@ namespace ov { namespace frontend { namespace tensorflow { -class TENSORFLOW_API ConversionExtension : public ConversionExtensionBase { +class TENSORFLOW_FRONTEND_API ConversionExtension : public ConversionExtensionBase { public: using Ptr = std::shared_ptr; diff --git a/src/frontends/tensorflow/include/openvino/frontend/tensorflow/frontend.hpp b/src/frontends/tensorflow/include/openvino/frontend/tensorflow/frontend.hpp index 8ba6326b493236..d0bd54b07f8cc8 100644 --- a/src/frontends/tensorflow/include/openvino/frontend/tensorflow/frontend.hpp +++ b/src/frontends/tensorflow/include/openvino/frontend/tensorflow/frontend.hpp @@ -21,7 +21,7 @@ namespace ov { namespace frontend { namespace tensorflow { -class TENSORFLOW_API FrontEnd : public ov::frontend::FrontEnd { +class TENSORFLOW_FRONTEND_API FrontEnd : public ov::frontend::FrontEnd { public: using Ptr = std::shared_ptr; FrontEnd(); diff --git a/src/frontends/tensorflow/include/openvino/frontend/tensorflow/graph_iterator.hpp b/src/frontends/tensorflow/include/openvino/frontend/tensorflow/graph_iterator.hpp new file mode 100644 index 00000000000000..079b423dab3f28 --- /dev/null +++ b/src/frontends/tensorflow/include/openvino/frontend/tensorflow/graph_iterator.hpp @@ -0,0 +1,17 @@ +// Copyright (C) 2018-2025 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#pragma once + +#include "openvino/frontend/graph_iterator.hpp" + +namespace ov { +namespace frontend { +namespace tensorflow { + +using ov::frontend::GraphIterator; + +} // namespace tensorflow +} // namespace frontend +} // namespace ov diff --git a/src/frontends/tensorflow/include/openvino/frontend/tensorflow/node_context.hpp b/src/frontends/tensorflow/include/openvino/frontend/tensorflow/node_context.hpp index 84ab6dac099916..1f475aee50831f 100644 --- a/src/frontends/tensorflow/include/openvino/frontend/tensorflow/node_context.hpp +++ b/src/frontends/tensorflow/include/openvino/frontend/tensorflow/node_context.hpp @@ -19,7 +19,7 @@ class TranslateSession; /// Keep necessary data for a single node in the original FW graph to facilitate /// conversion process in the rules code. -class TENSORFLOW_API NodeContext : public ov::frontend::NodeContext { +class TENSORFLOW_FRONTEND_API NodeContext : public ov::frontend::NodeContext { public: using Ptr = std::shared_ptr; NodeContext(const std::shared_ptr& decoder, diff --git a/src/frontends/tensorflow/include/openvino/frontend/tensorflow/special_types.hpp b/src/frontends/tensorflow/include/openvino/frontend/tensorflow/special_types.hpp index c72ad868f2dfad..4a5f9384ed7604 100644 --- a/src/frontends/tensorflow/include/openvino/frontend/tensorflow/special_types.hpp +++ b/src/frontends/tensorflow/include/openvino/frontend/tensorflow/special_types.hpp @@ -11,7 +11,7 @@ namespace frontend { namespace tensorflow { // Type which is used to express empty list without any specific type -class TENSORFLOW_API EmptyList {}; +class TENSORFLOW_FRONTEND_API EmptyList {}; } // namespace tensorflow } // namespace frontend diff --git a/src/frontends/tensorflow/include/openvino/frontend/tensorflow/visibility.hpp b/src/frontends/tensorflow/include/openvino/frontend/tensorflow/visibility.hpp index 72359026d76d08..9901169bf3ec74 100644 --- a/src/frontends/tensorflow/include/openvino/frontend/tensorflow/visibility.hpp +++ b/src/frontends/tensorflow/include/openvino/frontend/tensorflow/visibility.hpp @@ -7,14 +7,14 @@ #include "openvino/frontend/exception.hpp" #ifdef OPENVINO_STATIC_LIBRARY -# define TENSORFLOW_API -# define TENSORFLOW_C_API +# define TENSORFLOW_FRONTEND_API +# define TENSORFLOW_FRONTEND_C_API #else # ifdef openvino_tensorflow_frontend_EXPORTS -# define TENSORFLOW_API OPENVINO_CORE_EXPORTS -# define TENSORFLOW_C_API OPENVINO_EXTERN_C OPENVINO_CORE_EXPORTS +# define TENSORFLOW_FRONTEND_API OPENVINO_CORE_EXPORTS +# define TENSORFLOW_FRONTEND_C_API OPENVINO_EXTERN_C OPENVINO_CORE_EXPORTS # else -# define TENSORFLOW_API OPENVINO_CORE_IMPORTS -# define TENSORFLOW_C_API OPENVINO_EXTERN_C OPENVINO_CORE_IMPORTS +# define TENSORFLOW_FRONTEND_API OPENVINO_CORE_IMPORTS +# define TENSORFLOW_FRONTEND_C_API OPENVINO_EXTERN_C OPENVINO_CORE_IMPORTS # endif // openvino_tensorflow_frontend_EXPORTS #endif // OPENVINO_STATIC_LIBRARY diff --git a/src/frontends/tensorflow/src/tensorflow.cpp b/src/frontends/tensorflow/src/tensorflow.cpp index 9a3ab3b242828e..7c9e2f727b6aa7 100644 --- a/src/frontends/tensorflow/src/tensorflow.cpp +++ b/src/frontends/tensorflow/src/tensorflow.cpp @@ -6,11 +6,11 @@ #include "openvino/frontend/tensorflow/frontend.hpp" #include "openvino/frontend/tensorflow/visibility.hpp" -TENSORFLOW_C_API ov::frontend::FrontEndVersion get_api_version() { +TENSORFLOW_FRONTEND_C_API ov::frontend::FrontEndVersion get_api_version() { return OV_FRONTEND_API_VERSION; } -TENSORFLOW_C_API void* get_front_end_data() { +TENSORFLOW_FRONTEND_C_API void* get_front_end_data() { auto res = new ov::frontend::FrontEndPluginInfo(); res->m_name = "tf"; res->m_creator = []() { diff --git a/src/frontends/tensorflow_common/src/CMakeLists.txt b/src/frontends/tensorflow_common/src/CMakeLists.txt index 5151468feba839..646496a7e2384f 100644 --- a/src/frontends/tensorflow_common/src/CMakeLists.txt +++ b/src/frontends/tensorflow_common/src/CMakeLists.txt @@ -24,7 +24,7 @@ set_target_properties(${TARGET_NAME} PROPERTIES INTERPROCEDURAL_OPTIMIZATION_RELEASE ${ENABLE_LTO}) target_link_libraries(${TARGET_NAME} PRIVATE openvino::util - PUBLIC openvino::core::dev) + PUBLIC openvino::core::dev openvino::runtime) target_include_directories(${TARGET_NAME} PUBLIC $ diff --git a/src/frontends/tensorflow_lite/include/openvino/frontend/tensorflow_lite/decoder.hpp b/src/frontends/tensorflow_lite/include/openvino/frontend/tensorflow_lite/decoder.hpp index 49d6f7d576ecf8..424cec1f4d773b 100644 --- a/src/frontends/tensorflow_lite/include/openvino/frontend/tensorflow_lite/decoder.hpp +++ b/src/frontends/tensorflow_lite/include/openvino/frontend/tensorflow_lite/decoder.hpp @@ -14,7 +14,7 @@ namespace ov { namespace frontend { namespace tensorflow_lite { -struct TENSORFLOW_LITE_API TensorMetaInfo { +struct TENSORFLOW_LITE_FRONTEND_API TensorMetaInfo { std::shared_ptr m_quantization_info; std::shared_ptr m_sparsity_info; ov::PartialShape m_partial_shape; @@ -23,11 +23,14 @@ struct TENSORFLOW_LITE_API TensorMetaInfo { std::string m_tensor_name; }; -class TENSORFLOW_LITE_API DecoderBase : public ov::frontend::DecoderBase {}; +class TENSORFLOW_LITE_FRONTEND_API DecoderBase : public ov::frontend::DecoderBase { +public: + ~DecoderBase() override; +}; // DecoderBaseOperation corresponds to operation node to retrieve its attributes and information about input and output // tensors -class TENSORFLOW_LITE_API DecoderBaseOperation : public ov::frontend::tensorflow_lite::DecoderBase { +class TENSORFLOW_LITE_FRONTEND_API DecoderBaseOperation : public ov::frontend::tensorflow_lite::DecoderBase { public: /// \brief Get input tensor name by index /// Operation nodes are connected between each other by tensors. @@ -67,11 +70,13 @@ class TENSORFLOW_LITE_API DecoderBaseOperation : public ov::frontend::tensorflow /// \brief Get a number of outputs virtual size_t get_output_size() const = 0; + + ~DecoderBaseOperation() override; }; // DecoderBaseTensor corresponds to tensor node to retrieve information about type, shapem quantization and sparsity // information -class TENSORFLOW_LITE_API DecoderBaseTensor : public ov::frontend::tensorflow_lite::DecoderBase { +class TENSORFLOW_LITE_FRONTEND_API DecoderBaseTensor : public ov::frontend::tensorflow_lite::DecoderBase { public: /// \brief Get tensor info virtual TensorMetaInfo get_tensor_info() const = 0; @@ -87,6 +92,8 @@ class TENSORFLOW_LITE_API DecoderBaseTensor : public ov::frontend::tensorflow_li /// it must be from 0 to m-1, where m - number of outputs in the model /// if it is not input, returns -1 virtual int64_t get_output_idx() const = 0; + + ~DecoderBaseTensor() override; }; } // namespace tensorflow_lite diff --git a/src/frontends/tensorflow_lite/include/openvino/frontend/tensorflow_lite/extension/conversion.hpp b/src/frontends/tensorflow_lite/include/openvino/frontend/tensorflow_lite/extension/conversion.hpp index 4121f10d98968d..1f87626918277c 100644 --- a/src/frontends/tensorflow_lite/include/openvino/frontend/tensorflow_lite/extension/conversion.hpp +++ b/src/frontends/tensorflow_lite/include/openvino/frontend/tensorflow_lite/extension/conversion.hpp @@ -12,7 +12,7 @@ namespace ov { namespace frontend { namespace tensorflow_lite { -class TENSORFLOW_LITE_API ConversionExtension : public ConversionExtensionBase { +class TENSORFLOW_LITE_FRONTEND_API ConversionExtension : public ConversionExtensionBase { public: using Ptr = std::shared_ptr; diff --git a/src/frontends/tensorflow_lite/include/openvino/frontend/tensorflow_lite/frontend.hpp b/src/frontends/tensorflow_lite/include/openvino/frontend/tensorflow_lite/frontend.hpp index 4487509cd3864b..e2ec2943296a57 100644 --- a/src/frontends/tensorflow_lite/include/openvino/frontend/tensorflow_lite/frontend.hpp +++ b/src/frontends/tensorflow_lite/include/openvino/frontend/tensorflow_lite/frontend.hpp @@ -22,7 +22,7 @@ namespace tensorflow_lite { using CreatorFunction = std::function; using TranslatorDictionaryType = std::map; -class TENSORFLOW_LITE_API FrontEnd : public ov::frontend::FrontEnd { +class TENSORFLOW_LITE_FRONTEND_API FrontEnd : public ov::frontend::FrontEnd { public: FrontEnd(); /// \brief Completely convert the model diff --git a/src/frontends/tensorflow_lite/include/openvino/frontend/tensorflow_lite/graph_iterator.hpp b/src/frontends/tensorflow_lite/include/openvino/frontend/tensorflow_lite/graph_iterator.hpp index 35eb43af74c2d9..0b76336d822fe8 100644 --- a/src/frontends/tensorflow_lite/include/openvino/frontend/tensorflow_lite/graph_iterator.hpp +++ b/src/frontends/tensorflow_lite/include/openvino/frontend/tensorflow_lite/graph_iterator.hpp @@ -24,7 +24,7 @@ namespace tensorflow_lite { /// DecoderBaseOperation (for op 1), ..., DecoderBaseOperation (for op k), /// where n - number of inputs in the model, m - number of outputs in the model k - number of operation nodes. /// NOTE: constants are ignored and no decoder object is returned for constant. -class TENSORFLOW_LITE_API GraphIterator : ::ov::RuntimeAttribute { +class TENSORFLOW_LITE_FRONTEND_API GraphIterator : ::ov::RuntimeAttribute { public: using Ptr = std::shared_ptr; diff --git a/src/frontends/tensorflow_lite/include/openvino/frontend/tensorflow_lite/node_context.hpp b/src/frontends/tensorflow_lite/include/openvino/frontend/tensorflow_lite/node_context.hpp index faa496353c662c..77b1b1b02c0639 100644 --- a/src/frontends/tensorflow_lite/include/openvino/frontend/tensorflow_lite/node_context.hpp +++ b/src/frontends/tensorflow_lite/include/openvino/frontend/tensorflow_lite/node_context.hpp @@ -16,7 +16,7 @@ using SubGraphFuncs = std::vector()>>; /// Keep necessary data for a single node in the original FW graph to facilitate /// conversion process in the rules code. -class TENSORFLOW_LITE_API NodeContext : public ov::frontend::NodeContext { +class TENSORFLOW_LITE_FRONTEND_API NodeContext : public ov::frontend::NodeContext { public: using Ptr = std::shared_ptr; NodeContext(const std::shared_ptr& decoder, const OutputVector& inputs) diff --git a/src/frontends/tensorflow_lite/include/openvino/frontend/tensorflow_lite/quantization_info.hpp b/src/frontends/tensorflow_lite/include/openvino/frontend/tensorflow_lite/quantization_info.hpp index d9232b8d580a53..835aa242c3673d 100644 --- a/src/frontends/tensorflow_lite/include/openvino/frontend/tensorflow_lite/quantization_info.hpp +++ b/src/frontends/tensorflow_lite/include/openvino/frontend/tensorflow_lite/quantization_info.hpp @@ -15,13 +15,11 @@ namespace ov { namespace frontend { namespace tensorflow_lite { -class TENSORFLOW_LITE_API QuantizationInfo : public ov::RuntimeAttribute { +class TENSORFLOW_LITE_FRONTEND_API QuantizationInfo : public ov::RuntimeAttribute { public: OPENVINO_RTTI("QuantizationInfo", "0", RuntimeAttribute); QuantizationInfo() = default; - explicit QuantizationInfo(const std::vector& scale, - const std::vector& zero_point, - const int64_t& axis) + QuantizationInfo(const std::vector& scale, const std::vector& zero_point, const int64_t& axis) : m_scale(scale), m_zero_point(zero_point), m_axis(axis) {} diff --git a/src/frontends/tensorflow_lite/include/openvino/frontend/tensorflow_lite/sparsity_info.hpp b/src/frontends/tensorflow_lite/include/openvino/frontend/tensorflow_lite/sparsity_info.hpp index 440d6a81059c9d..bfcd1d9fc08f41 100644 --- a/src/frontends/tensorflow_lite/include/openvino/frontend/tensorflow_lite/sparsity_info.hpp +++ b/src/frontends/tensorflow_lite/include/openvino/frontend/tensorflow_lite/sparsity_info.hpp @@ -16,7 +16,7 @@ namespace ov { namespace frontend { namespace tensorflow_lite { -class TENSORFLOW_LITE_API SparsityInfo : public ov::RuntimeAttribute { +class TENSORFLOW_LITE_FRONTEND_API SparsityInfo : public ov::RuntimeAttribute { public: OPENVINO_RTTI("SparsityInfo", "0", RuntimeAttribute); @@ -28,13 +28,13 @@ class TENSORFLOW_LITE_API SparsityInfo : public ov::RuntimeAttribute { }; SparsityInfo() = default; - explicit SparsityInfo(const std::vector& shape, - const std::vector& traversal_order, - const std::vector& block_map, - const std::vector& dim_format, - const std::vector& data_desc, - const ov::element::Type target_type, - const uint8_t* values) + SparsityInfo(const std::vector& shape, + const std::vector& traversal_order, + const std::vector& block_map, + const std::vector& dim_format, + const std::vector& data_desc, + const ov::element::Type target_type, + const uint8_t* values) : m_shape(shape), m_traversal_order(traversal_order), m_block_map(block_map), diff --git a/src/frontends/tensorflow_lite/include/openvino/frontend/tensorflow_lite/visibility.hpp b/src/frontends/tensorflow_lite/include/openvino/frontend/tensorflow_lite/visibility.hpp index 381936419fb3aa..116c593ebfe9c9 100644 --- a/src/frontends/tensorflow_lite/include/openvino/frontend/tensorflow_lite/visibility.hpp +++ b/src/frontends/tensorflow_lite/include/openvino/frontend/tensorflow_lite/visibility.hpp @@ -7,14 +7,14 @@ #include "openvino/frontend/exception.hpp" #ifdef OPENVINO_STATIC_LIBRARY -# define TENSORFLOW_LITE_API -# define TENSORFLOW_LITE_C_API +# define TENSORFLOW_LITE_FRONTEND_API +# define TENSORFLOW_LITE_FRONTEND_C_API #else # ifdef openvino_tensorflow_lite_frontend_EXPORTS -# define TENSORFLOW_LITE_API OPENVINO_CORE_EXPORTS -# define TENSORFLOW_LITE_C_API OPENVINO_EXTERN_C OPENVINO_CORE_EXPORTS +# define TENSORFLOW_LITE_FRONTEND_API OPENVINO_CORE_EXPORTS +# define TENSORFLOW_LITE_FRONTEND_C_API OPENVINO_EXTERN_C OPENVINO_CORE_EXPORTS # else -# define TENSORFLOW_LITE_API OPENVINO_CORE_IMPORTS -# define TENSORFLOW_LITE_C_API OPENVINO_EXTERN_C OPENVINO_CORE_IMPORTS +# define TENSORFLOW_LITE_FRONTEND_API OPENVINO_CORE_IMPORTS +# define TENSORFLOW_LITE_FRONTEND_C_API OPENVINO_EXTERN_C OPENVINO_CORE_IMPORTS # endif // openvino_tensorflow_lite_frontend_EXPORTS #endif // OPENVINO_STATIC_LIBRARY diff --git a/src/frontends/tensorflow_lite/src/decoder.cpp b/src/frontends/tensorflow_lite/src/decoder.cpp new file mode 100644 index 00000000000000..e9ce02275e5961 --- /dev/null +++ b/src/frontends/tensorflow_lite/src/decoder.cpp @@ -0,0 +1,13 @@ +// Copyright (C) 2018-2025 Intel Corporation +// SPDX-License-Identifier: Apache-2.0 +// + +#include "openvino/frontend/tensorflow_lite/decoder.hpp" + +using namespace ov::frontend::tensorflow_lite; + +DecoderBase::~DecoderBase() = default; + +DecoderBaseOperation::~DecoderBaseOperation() = default; + +DecoderBaseTensor::~DecoderBaseTensor() = default; diff --git a/src/frontends/tensorflow_lite/src/tensorflow_lite.cpp b/src/frontends/tensorflow_lite/src/tensorflow_lite.cpp index 2008a5bdc712c6..4d0b247f8708ef 100644 --- a/src/frontends/tensorflow_lite/src/tensorflow_lite.cpp +++ b/src/frontends/tensorflow_lite/src/tensorflow_lite.cpp @@ -6,11 +6,11 @@ #include "openvino/frontend/tensorflow_lite/frontend.hpp" #include "openvino/frontend/tensorflow_lite/visibility.hpp" -TENSORFLOW_LITE_C_API ov::frontend::FrontEndVersion get_api_version() { +TENSORFLOW_LITE_FRONTEND_C_API ov::frontend::FrontEndVersion get_api_version() { return OV_FRONTEND_API_VERSION; } -TENSORFLOW_LITE_C_API void* get_front_end_data() { +TENSORFLOW_LITE_FRONTEND_C_API void* get_front_end_data() { auto res = new ov::frontend::FrontEndPluginInfo(); res->m_name = "tflite"; res->m_creator = []() {