Skip to content

Commit 5469038

Browse files
Fixed more C++ RTTI on macOS (openvinotoolkit#28636)
### Details: - *item1* - *...* ### Tickets: - *ticket-id*
1 parent 485833c commit 5469038

File tree

45 files changed

+154
-90
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+154
-90
lines changed

.github/workflows/mac.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ on:
44
schedule:
55
# at 00:00 on workdays
66
- cron: '0 0 * * 1,2,3,4,5'
7-
#pull_request:
7+
# pull_request:
88
# paths-ignore:
99
# - '**/docs/**'
1010
# - 'docs/**'
1111
# - '**/**.md'
1212
# - '**.md'
1313
# - '**/layer_tests_summary/**'
1414
# - '**/conformance/**'
15-
#push:
15+
# push:
1616
# paths-ignore:
1717
# - '**/docs/**'
1818
# - 'docs/**'

.github/workflows/mac_arm64.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ on:
44
schedule:
55
# at 00:00 on workdays
66
- cron: '0 0 * * 1,2,3,4,5'
7-
#pull_request:
7+
# pull_request:
88
# paths-ignore:
99
# - '**/docs/**'
1010
# - 'docs/**'
1111
# - '**/**.md'
1212
# - '**.md'
1313
# - '**/layer_tests_summary/**'
1414
# - '**/conformance/**'
15-
#push:
15+
# push:
1616
# paths-ignore:
1717
# - '**/docs/**'
1818
# - 'docs/**'

src/bindings/python/src/pyopenvino/frontend/tensorflow/graph_iterator.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#include "graph_iterator.hpp"
1010

11-
#include "openvino/frontend/graph_iterator.hpp"
11+
#include "openvino/frontend/tensorflow/graph_iterator.hpp"
1212

1313
namespace py = pybind11;
1414

src/bindings/python/src/pyopenvino/frontend/tensorflow/graph_iterator.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#include <pybind11/pybind11.h>
88

99
#include "openvino/frontend/decoder.hpp"
10-
#include "openvino/frontend/graph_iterator.hpp"
10+
#include "openvino/frontend/tensorflow/graph_iterator.hpp"
1111

1212
namespace py = pybind11;
1313

src/bindings/python/src/pyopenvino/utils/utils.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -454,9 +454,9 @@ ov::Any py_object_to_any(const py::object& py_obj) {
454454
// FrontEnd Decoder
455455
} else if (py::isinstance<ov::frontend::IDecoder>(py_obj)) {
456456
return py::cast<std::shared_ptr<ov::frontend::IDecoder>>(py_obj);
457-
// TF FrontEnd GraphIterator
458-
} else if (py::isinstance<ov::frontend::tensorflow::GraphIterator>(py_obj)) {
459-
return py::cast<std::shared_ptr<ov::frontend::tensorflow::GraphIterator>>(py_obj);
457+
// FrontEnd GraphIterator
458+
} else if (py::isinstance<ov::frontend::GraphIterator>(py_obj)) {
459+
return py::cast<std::shared_ptr<ov::frontend::GraphIterator>>(py_obj);
460460
// Custom FrontEnd Types
461461
} else if (py::isinstance<ov::frontend::type::Tensor>(py_obj)) {
462462
return py::cast<ov::frontend::type::Tensor>(py_obj);

src/frontends/common/include/openvino/frontend/complex_type_mark.hpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#pragma once
66

77
#include "openvino/core/type/element_type.hpp"
8+
#include "openvino/frontend/visibility.hpp"
89
#include "openvino/op/util/framework_node.hpp"
910

1011
namespace ov {
@@ -17,7 +18,7 @@ namespace frontend {
1718
// into a floating-point tensor [N1, N2, ..., Nk, 2]
1819
// where a slice with index [..., 0] represents a real part and
1920
// a slice with index [..., 1] represents a imaginary part.
20-
class ComplexTypeMark : public ov::op::util::FrameworkNode {
21+
class FRONTEND_API ComplexTypeMark : public ov::op::util::FrameworkNode {
2122
public:
2223
OPENVINO_OP("ComplexTypeMark", "util", ov::op::util::FrameworkNode);
2324

@@ -27,6 +28,8 @@ class ComplexTypeMark : public ov::op::util::FrameworkNode {
2728
validate_and_infer_types();
2829
}
2930

31+
~ComplexTypeMark() override;
32+
3033
void validate_and_infer_types() override {
3134
set_output_type(0, ov::element::dynamic, PartialShape::dynamic());
3235
}

src/frontends/common/include/openvino/frontend/graph_iterator.hpp

-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
namespace ov {
1212
namespace frontend {
13-
namespace tensorflow {
1413

1514
/// Abstract representation for an input model graph that gives nodes in topologically sorted order
1615
class FRONTEND_API GraphIterator : ::ov::RuntimeAttribute {
@@ -51,6 +50,5 @@ class FRONTEND_API GraphIterator : ::ov::RuntimeAttribute {
5150
virtual std::map<std::string, std::string> get_output_names_map() const;
5251
};
5352

54-
} // namespace tensorflow
5553
} // namespace frontend
5654
} // namespace ov
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// Copyright (C) 2018-2025 Intel Corporation
2+
// SPDX-License-Identifier: Apache-2.0
3+
//
4+
5+
#include "openvino/frontend/complex_type_mark.hpp"
6+
7+
using namespace ov::frontend;
8+
9+
ComplexTypeMark::~ComplexTypeMark() = default;

src/frontends/common/src/graph_iterator.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
#include "openvino/frontend/graph_iterator.hpp"
66

7-
using namespace ov::frontend::tensorflow;
7+
using namespace ov::frontend;
88

99
std::map<std::string, std::string> GraphIterator::get_input_names_map() const {
1010
return {};

src/frontends/jax/include/openvino/frontend/jax/decoder.hpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,13 @@
1111
#include "openvino/core/node.hpp"
1212
#include "openvino/core/node_vector.hpp"
1313
#include "openvino/frontend/decoder.hpp"
14+
#include "openvino/frontend/jax/visibility.hpp"
1415

1516
namespace ov {
1617
namespace frontend {
1718
namespace jax {
1819

19-
class JaxDecoder : public IDecoder {
20+
class JAX_FRONTEND_API JaxDecoder : public IDecoder {
2021
public:
2122
virtual OutputVector as_constant() const = 0;
2223

@@ -64,6 +65,8 @@ class JaxDecoder : public IDecoder {
6465
/// If there is no query for specific sub-graph it shouldn't be converted
6566
// node_visitor is a function that will be fed by nodes in subgraph for all nodes in graph
6667
virtual void visit_subgraph(std::function<void(std::shared_ptr<JaxDecoder>)> node_visitor) const = 0;
68+
69+
~JaxDecoder() override;
6770
};
6871

6972
} // namespace jax

src/frontends/jax/include/openvino/frontend/jax/extension/conversion.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ namespace ov {
1313
namespace frontend {
1414
namespace jax {
1515

16-
class JAX_API ConversionExtension : public ConversionExtensionBase {
16+
class JAX_FRONTEND_API ConversionExtension : public ConversionExtensionBase {
1717
public:
1818
using Ptr = std::shared_ptr<ConversionExtension>;
1919

src/frontends/jax/include/openvino/frontend/jax/frontend.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ namespace ov {
1414
namespace frontend {
1515
namespace jax {
1616

17-
class JAX_API FrontEnd : public ov::frontend::FrontEnd {
17+
class JAX_FRONTEND_API FrontEnd : public ov::frontend::FrontEnd {
1818
public:
1919
using Ptr = std::shared_ptr<FrontEnd>;
2020
FrontEnd();

src/frontends/jax/include/openvino/frontend/jax/visibility.hpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77
#include "openvino/frontend/visibility.hpp"
88

99
#ifdef OPENVINO_STATIC_LIBRARY
10-
# define JAX_API
11-
# define JAX_C_API
10+
# define JAX_FRONTEND_API
11+
# define JAX_FRONTEND_C_API
1212
#else
1313
# ifdef openvino_jax_frontend_EXPORTS
14-
# define JAX_API OPENVINO_CORE_EXPORTS
15-
# define JAX_C_API OPENVINO_EXTERN_C OPENVINO_CORE_EXPORTS
14+
# define JAX_FRONTEND_API OPENVINO_CORE_EXPORTS
15+
# define JAX_FRONTEND_C_API OPENVINO_EXTERN_C OPENVINO_CORE_EXPORTS
1616
# else
17-
# define JAX_API OPENVINO_CORE_IMPORTS
18-
# define JAX_C_API OPENVINO_EXTERN_C OPENVINO_CORE_IMPORTS
17+
# define JAX_FRONTEND_API OPENVINO_CORE_IMPORTS
18+
# define JAX_FRONTEND_C_API OPENVINO_EXTERN_C OPENVINO_CORE_IMPORTS
1919
# endif // openvino_jax_frontend_EXPORTS
2020
#endif // OPENVINO_STATIC_LIBRARY

src/frontends/jax/src/decoder.cpp

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// Copyright (C) 2018-2025 Intel Corporation
2+
// SPDX-License-Identifier: Apache-2.0
3+
//
4+
5+
#include "openvino/frontend/jax/decoder.hpp"
6+
7+
ov::frontend::jax::JaxDecoder::~JaxDecoder() = default;

src/frontends/jax/src/jax.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
#include "openvino/frontend/jax/visibility.hpp"
77
#include "openvino/frontend/manager.hpp"
88

9-
JAX_C_API ov::frontend::FrontEndVersion get_api_version() {
9+
JAX_FRONTEND_C_API ov::frontend::FrontEndVersion get_api_version() {
1010
return OV_FRONTEND_API_VERSION;
1111
}
1212

13-
JAX_C_API void* get_front_end_data() {
13+
JAX_FRONTEND_C_API void* get_front_end_data() {
1414
auto res = new ov::frontend::FrontEndPluginInfo();
1515
res->m_name = "jax";
1616
res->m_creator = []() {

src/frontends/paddle/include/openvino/frontend/paddle/extension/conversion.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ namespace ov {
1313
namespace frontend {
1414
namespace paddle {
1515

16-
class PADDLE_API ConversionExtension : public ConversionExtensionBase {
16+
class PADDLE_FRONTEND_API ConversionExtension : public ConversionExtensionBase {
1717
public:
1818
using Ptr = std::shared_ptr<ConversionExtension>;
1919

src/frontends/paddle/include/openvino/frontend/paddle/frontend.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ namespace paddle {
2121
class OpPlace;
2222
class TensorPlace;
2323

24-
class PADDLE_API FrontEnd : public ov::frontend::FrontEnd {
24+
class PADDLE_FRONTEND_API FrontEnd : public ov::frontend::FrontEnd {
2525
public:
2626
using Ptr = std::shared_ptr<FrontEnd>;
2727
FrontEnd();

src/frontends/paddle/include/openvino/frontend/paddle/visibility.hpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77
#include "openvino/frontend/exception.hpp"
88

99
#ifdef OPENVINO_STATIC_LIBRARY
10-
# define PADDLE_API
11-
# define PADDLE_C_API
10+
# define PADDLE_FRONTEND_API
11+
# define PADDLE_FRONTEND_C_API
1212
#else
1313
# ifdef openvino_paddle_frontend_EXPORTS
14-
# define PADDLE_API OPENVINO_CORE_EXPORTS
15-
# define PADDLE_C_API OPENVINO_EXTERN_C OPENVINO_CORE_EXPORTS
14+
# define PADDLE_FRONTEND_API OPENVINO_CORE_EXPORTS
15+
# define PADDLE_FRONTEND_C_API OPENVINO_EXTERN_C OPENVINO_CORE_EXPORTS
1616
# else
17-
# define PADDLE_API OPENVINO_CORE_IMPORTS
18-
# define PADDLE_C_API OPENVINO_EXTERN_C OPENVINO_CORE_IMPORTS
17+
# define PADDLE_FRONTEND_API OPENVINO_CORE_IMPORTS
18+
# define PADDLE_FRONTEND_C_API OPENVINO_EXTERN_C OPENVINO_CORE_IMPORTS
1919
# endif // openvino_paddle_frontend_EXPORTS
2020
#endif // OPENVINO_STATIC_LIBRARY

src/frontends/paddle/src/frontend.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -586,11 +586,11 @@ void FrontEnd::normalize(const std::shared_ptr<ov::Model>& model) const {
586586
} // namespace frontend
587587
} // namespace ov
588588

589-
PADDLE_C_API FrontEndVersion get_api_version() {
589+
PADDLE_FRONTEND_C_API FrontEndVersion get_api_version() {
590590
return OV_FRONTEND_API_VERSION;
591591
}
592592

593-
PADDLE_C_API void* get_front_end_data() {
593+
PADDLE_FRONTEND_C_API void* get_front_end_data() {
594594
FrontEndPluginInfo* res = new FrontEndPluginInfo();
595595
res->m_name = "paddle";
596596
res->m_creator = []() {

src/frontends/pytorch/include/openvino/frontend/pytorch/decoder.hpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
#include "openvino/core/node.hpp"
88
#include "openvino/frontend/decoder.hpp"
9+
#include "openvino/frontend/pytorch/visibility.hpp"
910

1011
namespace ov {
1112
namespace frontend {
@@ -14,8 +15,10 @@ namespace pytorch {
1415
using DecoderRTInfo = std::unordered_map<std::string, ov::Any>;
1516

1617
/// Plays a role of node, block and module decoder (kind of temporary fat API)
17-
class TorchDecoder : public IDecoder {
18+
class PYTORCH_FRONTEND_API TorchDecoder : public IDecoder {
1819
public:
20+
~TorchDecoder() override;
21+
1922
// Do not search for input in tensor map; try to access it as a constant of specified type T and return its value
2023
// Using Any here is an easy way to avoid template definition, returned object is supposed to be of one of the
2124
// fundamental types like int, float etc.

src/frontends/pytorch/include/openvino/frontend/pytorch/extension/conversion.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ namespace ov {
1313
namespace frontend {
1414
namespace pytorch {
1515

16-
class PYTORCH_API ConversionExtension : public ConversionExtensionBase {
16+
class PYTORCH_FRONTEND_API ConversionExtension : public ConversionExtensionBase {
1717
public:
1818
using Ptr = std::shared_ptr<ConversionExtension>;
1919

src/frontends/pytorch/include/openvino/frontend/pytorch/frontend.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ namespace ov {
1414
namespace frontend {
1515
namespace pytorch {
1616

17-
class PYTORCH_API FrontEnd : public ov::frontend::FrontEnd {
17+
class PYTORCH_FRONTEND_API FrontEnd : public ov::frontend::FrontEnd {
1818
public:
1919
using Ptr = std::shared_ptr<FrontEnd>;
2020
FrontEnd();

src/frontends/pytorch/include/openvino/frontend/pytorch/visibility.hpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77
#include "openvino/frontend/visibility.hpp"
88

99
#ifdef OPENVINO_STATIC_LIBRARY
10-
# define PYTORCH_API
11-
# define PYTORCH_C_API
10+
# define PYTORCH_FRONTEND_API
11+
# define PYTORCH_FRONTEND_C_API
1212
#else
1313
# ifdef openvino_pytorch_frontend_EXPORTS
14-
# define PYTORCH_API OPENVINO_CORE_EXPORTS
15-
# define PYTORCH_C_API OPENVINO_EXTERN_C OPENVINO_CORE_EXPORTS
14+
# define PYTORCH_FRONTEND_API OPENVINO_CORE_EXPORTS
15+
# define PYTORCH_FRONTEND_C_API OPENVINO_EXTERN_C OPENVINO_CORE_EXPORTS
1616
# else
17-
# define PYTORCH_API OPENVINO_CORE_IMPORTS
18-
# define PYTORCH_C_API OPENVINO_EXTERN_C OPENVINO_CORE_IMPORTS
17+
# define PYTORCH_FRONTEND_API OPENVINO_CORE_IMPORTS
18+
# define PYTORCH_FRONTEND_C_API OPENVINO_EXTERN_C OPENVINO_CORE_IMPORTS
1919
# endif // openvino_pytorch_frontend_EXPORTS
2020
#endif // OPENVINO_STATIC_LIBRARY

src/frontends/pytorch/src/decoder.cpp

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// Copyright (C) 2018-2025 Intel Corporation
2+
// SPDX-License-Identifier: Apache-2.0
3+
//
4+
5+
#include "openvino/frontend/pytorch/decoder.hpp"
6+
7+
ov::frontend::pytorch::TorchDecoder::~TorchDecoder() = default;

src/frontends/pytorch/src/frontend.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -403,8 +403,9 @@ ov::frontend::InputModel::Ptr FrontEnd::load_impl(const std::vector<ov::Any>& va
403403
"PyTorch Frontend doesn't support provided model type. Please provide supported model "
404404
"object using Python API.");
405405
auto decoder = variants[0].as<std::shared_ptr<IDecoder>>();
406+
FRONT_END_GENERAL_CHECK(decoder, "Couldn't cast ov::Any to std::shared_ptr<IDecoder>");
406407
auto tdecoder = std::dynamic_pointer_cast<TorchDecoder>(decoder);
407-
FRONT_END_GENERAL_CHECK(tdecoder, "Couldn't cast ov::Any to TorchDecoder");
408+
FRONT_END_GENERAL_CHECK(tdecoder, "Couldn't cast IDecoder to TorchDecoder");
408409
return std::make_shared<pytorch::InputModel>(tdecoder);
409410
}
410411

src/frontends/pytorch/src/pytorch.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
#include "openvino/frontend/pytorch/frontend.hpp"
77
#include "openvino/frontend/pytorch/visibility.hpp"
88

9-
PYTORCH_C_API ov::frontend::FrontEndVersion get_api_version() {
9+
PYTORCH_FRONTEND_C_API ov::frontend::FrontEndVersion get_api_version() {
1010
return OV_FRONTEND_API_VERSION;
1111
}
1212

13-
PYTORCH_C_API void* get_front_end_data() {
13+
PYTORCH_FRONTEND_C_API void* get_front_end_data() {
1414
auto res = new ov::frontend::FrontEndPluginInfo();
1515
res->m_name = "pytorch";
1616
res->m_creator = []() {

src/frontends/pytorch/src/transforms/aten_index_put_replacer.hpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
#pragma once
66

7-
#include "openvino/frontend/pytorch/visibility.hpp"
87
#include "openvino/pass/graph_rewrite.hpp"
98
#include "openvino/pass/pass.hpp"
109

@@ -13,7 +12,7 @@ namespace frontend {
1312
namespace pytorch {
1413
namespace pass {
1514

16-
class PYTORCH_API AtenIndexPutReplacer : public ov::pass::MatcherPass {
15+
class AtenIndexPutReplacer : public ov::pass::MatcherPass {
1716
public:
1817
OPENVINO_MATCHER_PASS_RTTI("ov::frontend::pytorch::pass::AtenIndexPutReplacer");
1918
AtenIndexPutReplacer();

src/frontends/pytorch/src/transforms/aten_index_replacer.hpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
#pragma once
66

7-
#include "openvino/frontend/pytorch/visibility.hpp"
87
#include "openvino/pass/graph_rewrite.hpp"
98
#include "openvino/pass/pass.hpp"
109

@@ -14,7 +13,7 @@ namespace pytorch {
1413
namespace pass {
1514

1615
// This transformation replaces pattern prim::ListConstruct->aten::index
17-
class PYTORCH_API AtenIndexToSelect : public ov::pass::MatcherPass {
16+
class AtenIndexToSelect : public ov::pass::MatcherPass {
1817
public:
1918
OPENVINO_MATCHER_PASS_RTTI("ov::frontend::pytorch::pass::AtenIndexToSelect");
2019
AtenIndexToSelect();

src/frontends/tensorflow/include/openvino/frontend/tensorflow/extension/conversion.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ namespace ov {
1313
namespace frontend {
1414
namespace tensorflow {
1515

16-
class TENSORFLOW_API ConversionExtension : public ConversionExtensionBase {
16+
class TENSORFLOW_FRONTEND_API ConversionExtension : public ConversionExtensionBase {
1717
public:
1818
using Ptr = std::shared_ptr<ConversionExtension>;
1919

0 commit comments

Comments
 (0)