Skip to content

OpenVINO™ is an open source toolkit for optimizing and deploying AI inference

Fixed more C++ RTTI on macOS (#28636)

Ilya Lavrenov5469038a043f
diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.yml
index 0fbc20cf195..7f2beea9d5a 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 b60daefa442..7c148a98787 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 1a5edab7de7..8c97d0d4916 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 b0e333657f9..46e6bdebedc 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 <pybind11/pybind11.h>
#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 d223a400ea2..526be24b989 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<ov::frontend::IDecoder>(py_obj)) {
return py::cast<std::shared_ptr<ov::frontend::IDecoder>>(py_obj);
- // TF FrontEnd GraphIterator
- } else if (py::isinstance<ov::frontend::tensorflow::GraphIterator>(py_obj)) {
- return py::cast<std::shared_ptr<ov::frontend::tensorflow::GraphIterator>>(py_obj);
+ // FrontEnd GraphIterator
+ } else if (py::isinstance<ov::frontend::GraphIterator>(py_obj)) {
+ return py::cast<std::shared_ptr<ov::frontend::GraphIterator>>(py_obj);
// Custom FrontEnd Types
} else if (py::isinstance<ov::frontend::type::Tensor>(py_obj)) {
return py::cast<ov::frontend::type::Tensor>(py_obj);
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 e7a89f4f3e9..b2300423762 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 @@ public:
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/graph_iterator.hpp b/src/frontends/common/include/openvino/frontend/graph_iterator.hpp
index 9b05849c78e..d26895c6a05 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 {
@@ -51,6 +50,5 @@ public:
virtual std::map<std::string, std::string> get_output_names_map() const;
};
-} // namespace tensorflow
} // namespace frontend
} // namespace ov
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 00000000000..25ccb1fe4a2
--- /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/graph_iterator.cpp b/src/frontends/common/src/graph_iterator.cpp
index 1a97e35448c..c1293a7812a 100644
--- a/src/frontends/common/src/graph_iterator.cpp
+++ b/src/frontends/common/src/graph_iterator.cpp
@@ -4,7 +4,7 @@
#include "openvino/frontend/graph_iterator.hpp"
-using namespace ov::frontend::tensorflow;
+using namespace ov::frontend;
std::map<std::string, std::string> GraphIterator::get_input_names_map() const {
return {};
diff --git a/src/frontends/jax/include/openvino/frontend/jax/decoder.hpp b/src/frontends/jax/include/openvino/frontend/jax/decoder.hpp
index 2cddb8b936d..252feedb9f6 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 @@ public:
/// 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<void(std::shared_ptr<JaxDecoder>)> 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 490177dde53..2fb18cd4907 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<ConversionExtension>;
diff --git a/src/frontends/jax/include/openvino/frontend/jax/frontend.hpp b/src/frontends/jax/include/openvino/frontend/jax/frontend.hpp
index e40d6b772b9..94a6a859f76 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>;
FrontEnd();
diff --git a/src/frontends/jax/include/openvino/frontend/jax/visibility.hpp b/src/frontends/jax/include/openvino/frontend/jax/visibility.hpp
index 609248d4fc9..f5c62f99c6a 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 00000000000..d3eda7de215
--- /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 62fdbb1f017..4fbb08a4099 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 f27ddd55169..d1b32052eb0 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<ConversionExtension>;
diff --git a/src/frontends/paddle/include/openvino/frontend/paddle/frontend.hpp b/src/frontends/paddle/include/openvino/frontend/paddle/frontend.hpp
index 54bf8961c48..77b59aa4ca6 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>;
FrontEnd();
diff --git a/src/frontends/paddle/include/openvino/frontend/paddle/visibility.hpp b/src/frontends/paddle/include/openvino/frontend/paddle/visibility.hpp
index d2430e9489a..e9ea45c727c 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 22d5547489e..c20852ebff6 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<ov::Model>& 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 3da741be645..97546c03534 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<std::string, ov::Any>;
/// 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 6c321ccd22d..cf1f8632045 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<ConversionExtension>;
diff --git a/src/frontends/pytorch/include/openvino/frontend/pytorch/frontend.hpp b/src/frontends/pytorch/include/openvino/frontend/pytorch/frontend.hpp
index 76baa62a334..6575aeb4fd9 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>;
FrontEnd();
diff --git a/src/frontends/pytorch/include/openvino/frontend/pytorch/visibility.hpp b/src/frontends/pytorch/include/openvino/frontend/pytorch/visibility.hpp
index 3911ad8693b..da35017bb86 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 00000000000..b07e4cbbd8c
--- /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 6debdb8c333..29a81e65ea7 100644
--- a/src/frontends/pytorch/src/frontend.cpp
+++ b/src/frontends/pytorch/src/frontend.cpp
@@ -403,8 +403,9 @@ ov::frontend::InputModel::Ptr FrontEnd::load_impl(const std::vector<ov::Any>& va
"PyTorch Frontend doesn't support provided model type. Please provide supported model "
"object using Python API.");
auto decoder = variants[0].as<std::shared_ptr<IDecoder>>();
+ FRONT_END_GENERAL_CHECK(decoder, "Couldn't cast ov::Any to std::shared_ptr<IDecoder>");
auto tdecoder = std::dynamic_pointer_cast<TorchDecoder>(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<pytorch::InputModel>(tdecoder);
}
diff --git a/src/frontends/pytorch/src/pytorch.cpp b/src/frontends/pytorch/src/pytorch.cpp
index 967fb43aa58..82dda9f5a84 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 ee887004fa3..6a795b2d1d4 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 2aa81063f4e..5d1eb662dc6 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 0b6b2aa5414..cec9d2b872c 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<ConversionExtension>;
diff --git a/src/frontends/tensorflow/include/openvino/frontend/tensorflow/frontend.hpp b/src/frontends/tensorflow/include/openvino/frontend/tensorflow/frontend.hpp
index 8ba6326b493..d0bd54b07f8 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>;
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 00000000000..079b423dab3
--- /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 84ab6dac099..1f475aee508 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>;
NodeContext(const std::shared_ptr<DecoderBase>& 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 c72ad868f2d..4a5f9384ed7 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 72359026d76..9901169bf3e 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 9a3ab3b2428..7c9e2f727b6 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_lite/include/openvino/frontend/tensorflow_lite/decoder.hpp b/src/frontends/tensorflow_lite/include/openvino/frontend/tensorflow_lite/decoder.hpp
index 49d6f7d576e..424cec1f4d7 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<QuantizationInfo> m_quantization_info;
std::shared_ptr<SparsityInfo> 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 @@ public:
/// \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 @@ public:
/// 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 4121f10d989..1f876269182 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<ConversionExtension>;
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 4487509cd38..e2ec2943296 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<ov::OutputVector(const ov::frontend::tensorflow_lite::NodeContext&)>;
using TranslatorDictionaryType = std::map<std::string, CreatorFunction>;
-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 35eb43af74c..0b76336d822 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<GraphIterator>;
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 faa496353c6..77b1b1b02c0 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<std::function<std::shared_ptr<ov::Model>()>>;
/// 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>;
NodeContext(const std::shared_ptr<DecoderBase>& 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 d9232b8d580..835aa242c36 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<float>& scale,
- const std::vector<int64_t>& zero_point,
- const int64_t& axis)
+ QuantizationInfo(const std::vector<float>& scale, const std::vector<int64_t>& 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 440d6a81059..bfcd1d9fc08 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 @@ public:
};
SparsityInfo() = default;
- explicit SparsityInfo(const std::vector<int32_t>& shape,
- const std::vector<int32_t>& traversal_order,
- const std::vector<int32_t>& block_map,
- const std::vector<uint16_t>& dim_format,
- const std::vector<SparsityDataDesc>& data_desc,
- const ov::element::Type target_type,
- const uint8_t* values)
+ SparsityInfo(const std::vector<int32_t>& shape,
+ const std::vector<int32_t>& traversal_order,
+ const std::vector<int32_t>& block_map,
+ const std::vector<uint16_t>& dim_format,
+ const std::vector<SparsityDataDesc>& 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 381936419fb..116c593ebfe 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 00000000000..e9ce02275e5
--- /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 2008a5bdc71..4d0b247f870 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 = []() {