Skip to content

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

[Build] Fix gcc15 build issues for OpenVINO build (#36030)

Pawel Raasza20bb269a0b0
diff --git a/src/common/snippets/src/lowered/pass/mha_parallel_wa_optimizer.cpp b/src/common/snippets/src/lowered/pass/mha_parallel_wa_optimizer.cpp
index 4b4c4883286..6e4ebe377b1 100644
--- a/src/common/snippets/src/lowered/pass/mha_parallel_wa_optimizer.cpp
+++ b/src/common/snippets/src/lowered/pass/mha_parallel_wa_optimizer.cpp
@@ -174,7 +174,7 @@ std::unordered_set<lowered::ExpressionPtr> MHAParallelWAOptimizer::find_applicab
auto brgemm_it = std::find_if(linear_ir->begin(), linear_ir->end(), is_brgemm);
std::unordered_set<lowered::ExpressionPtr> brgemms;
while (brgemm_it != linear_ir->end()) {
- brgemms.insert(*brgemm_it);
+ brgemms.insert(lowered::ExpressionPtr(*brgemm_it));
brgemm_it = std::find_if(std::next(brgemm_it), linear_ir->end(), is_brgemm);
}
const auto& loop_manager = linear_ir->get_loop_manager();
diff --git a/src/common/snippets/src/pass/propagate_precision.cpp b/src/common/snippets/src/pass/propagate_precision.cpp
index 9aea5203694..f07fd5985d5 100644
--- a/src/common/snippets/src/pass/propagate_precision.cpp
+++ b/src/common/snippets/src/pass/propagate_precision.cpp
@@ -38,7 +38,7 @@ bool ov::snippets::pass::PropagatePrecision::run_on_model(const std::shared_ptr<
std::unordered_map<std::shared_ptr<ov::opset1::Result>, element::Type> result_types;
auto results = m->get_results();
for (auto& result : results) {
- result_types.emplace(result, result->get_input_element_type(0));
+ result_types.emplace(std::shared_ptr<ov::opset1::Result>(result), result->get_input_element_type(0));
}
bool was_updated = false;
diff --git a/src/common/snippets/src/utils/utils.cpp b/src/common/snippets/src/utils/utils.cpp
index 6e1654aeb24..b5605cec84d 100644
--- a/src/common/snippets/src/utils/utils.cpp
+++ b/src/common/snippets/src/utils/utils.cpp
@@ -460,7 +460,7 @@ void visit_path(const lowered::ExpressionPtr& expr,
auto continue_traversal = [&](const lowered::ExpressionPtr& expr) {
if (visited.count(expr) == 0) {
exprs.push_front(expr);
- visited.insert(expr);
+ visited.insert(lowered::ExpressionPtr(expr));
}
};
diff --git a/src/common/transformations/src/transformations/common_optimizations/dimension_tracking.cpp b/src/common/transformations/src/transformations/common_optimizations/dimension_tracking.cpp
index 1f513dbc7ac..98537062021 100644
--- a/src/common/transformations/src/transformations/common_optimizations/dimension_tracking.cpp
+++ b/src/common/transformations/src/transformations/common_optimizations/dimension_tracking.cpp
@@ -43,7 +43,7 @@ void ov::batch_util::mark_batch(const std::shared_ptr<v0::Parameter>& parameter,
for (auto& dim : shape) {
const auto& dim_symbol = dim.get_symbol();
if (batches.count(dim_symbol) && mapped_batches.count(dim_symbol)) {
- intersection_in_all_three_sources_of_batch.insert(dim_symbol);
+ intersection_in_all_three_sources_of_batch.insert(std::shared_ptr<Symbol>(dim_symbol));
} else {
dim.set_symbol(nullptr);
}
@@ -76,7 +76,9 @@ void ov::batch_util::mark_layout_independent_batch(const std::shared_ptr<v0::Par
for (const auto& dim : parameter->get_partial_shape()) {
if (const auto& symbol = dim.get_symbol()) {
if (std::find(r_symbols.begin(), r_symbols.end(), symbol) != r_symbols.end()) {
- mark_batch(parameter, map, {symbol});
+ std::unordered_set<std::shared_ptr<Symbol>> batches;
+ batches.insert(std::shared_ptr<Symbol>(symbol));
+ mark_batch(parameter, map, batches);
return;
}
}
@@ -126,8 +128,11 @@ P2Btype ov::batch_util::find_batch(const std::shared_ptr<ov::Model>& f) {
const auto& batch_dim_symbol = shape[batch_placement.second].get_symbol();
if (batch_dim_symbol == nullptr)
mark_no_batch(parameter, parameter_to_batch_symbols);
- else
- mark_batch(parameter, parameter_to_batch_symbols, {batch_dim_symbol});
+ else {
+ std::unordered_set<std::shared_ptr<Symbol>> batches;
+ batches.insert(std::shared_ptr<Symbol>(batch_dim_symbol));
+ mark_batch(parameter, parameter_to_batch_symbols, batches);
+ }
continue; // batch was or was not found at this point -- there is no point in searching further }
}
// node is not layout obvious -- checking if dims were propagated through
diff --git a/src/core/tests/CMakeLists.txt b/src/core/tests/CMakeLists.txt
index 4dcf6030c8f..362a3c2ac50 100644
--- a/src/core/tests/CMakeLists.txt
+++ b/src/core/tests/CMakeLists.txt
@@ -62,6 +62,12 @@ target_compile_definitions(${TARGET_NAME}
FRONTEND_LIB_SUFFIX="${FRONTEND_NAME_SUFFIX}${OV_BUILD_POSTFIX}${CMAKE_SHARED_LIBRARY_SUFFIX}"
)
+if(ENABLE_LTO AND CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 15)
+ # GCC 15's lto1 emits false-positive -Wstringop-overflow/-Wstringop-overread warnings during the LTO link phase
+ # when openvino_xml_util objects are processed. Suppress at the linker level for this test binary only.
+ target_link_options(${TARGET_NAME} PRIVATE -Wno-stringop-overflow -Wno-stringop-overread)
+endif()
+
if(RISCV64)
# for std::atomic_bool
target_link_libraries(${TARGET_NAME} PRIVATE atomic)
diff --git a/src/core/tests/type_prop/interpolate.cpp b/src/core/tests/type_prop/interpolate.cpp
index d5ef2588f6b..8f5c50d0dbc 100644
--- a/src/core/tests/type_prop/interpolate.cpp
+++ b/src/core/tests/type_prop/interpolate.cpp
@@ -26,8 +26,8 @@ TEST(type_prop, interpolate_v0_default_ctor) {
op::v0::Interpolate::Attributes attrs;
attrs.axes = AxisSet{2, 3};
- attrs.pads_begin = {0, 0, 0, 0};
- attrs.pads_end = {0, 0, 0, 0};
+ attrs.pads_begin = std::vector<size_t>{0, 0, 0, 0};
+ attrs.pads_end = std::vector<size_t>{0, 0, 0, 0};
auto interp = std::make_shared<op::v0::Interpolate>();
interp->set_arguments(OutputVector{image, target_shape});
@@ -45,8 +45,8 @@ TEST(type_prop, interpolate_v0_all_inputs_dynamic_rank) {
op::v0::Interpolate::Attributes attrs;
attrs.axes = AxisSet{2, 3};
- attrs.pads_begin = {0, 0, 0, 0};
- attrs.pads_end = {0, 0, 0, 0};
+ attrs.pads_begin = std::vector<size_t>{0, 0, 0, 0};
+ attrs.pads_end = std::vector<size_t>{0, 0, 0, 0};
auto interp = std::make_shared<ov::op::v0::Interpolate>(image, target_shape, attrs);
@@ -60,8 +60,8 @@ TEST(type_prop, interpolate_v0_all_inputs_static_rank) {
op::v0::Interpolate::Attributes attrs;
attrs.axes = AxisSet{2, 3};
- attrs.pads_begin = {0, 0, 0, 0};
- attrs.pads_end = {0, 0, 0, 0};
+ attrs.pads_begin = std::vector<size_t>{0, 0, 0, 0};
+ attrs.pads_end = std::vector<size_t>{0, 0, 0, 0};
auto interp = std::make_shared<ov::op::v0::Interpolate>(image, target_shape, attrs);
@@ -75,8 +75,8 @@ TEST(type_prop, interpolate_v0_target_shape_not_constant) {
op::v0::Interpolate::Attributes attrs;
attrs.axes = AxisSet{3, 1};
- attrs.pads_begin = {0, 0, 0, 0};
- attrs.pads_end = {0, 0, 0, 0};
+ attrs.pads_begin = std::vector<size_t>{0, 0, 0, 0};
+ attrs.pads_end = std::vector<size_t>{0, 0, 0, 0};
auto interp = std::make_shared<ov::op::v0::Interpolate>(image, target_shape, attrs);
@@ -96,8 +96,8 @@ TEST(type_prop, interpolate_v0_target_shape_as_shape_of) {
op::v0::Interpolate::Attributes attrs;
attrs.axes = AxisSet{3, 1};
- attrs.pads_begin = {0, 0, 1, 0};
- attrs.pads_end = {0, 2, 0, 0};
+ attrs.pads_begin = std::vector<size_t>{0, 0, 1, 0};
+ attrs.pads_end = std::vector<size_t>{0, 2, 0, 0};
auto interp = std::make_shared<op::v0::Interpolate>(image, target_shape, attrs);
EXPECT_EQ(interp->get_element_type(), element::f64);
@@ -145,8 +145,8 @@ TEST(type_prop, interpolate_v4) {
attrs.coordinate_transformation_mode = CoordinateTransformMode::HALF_PIXEL;
attrs.nearest_mode = Nearest_mode::ROUND_PREFER_FLOOR;
attrs.antialias = false;
- attrs.pads_begin = {0, 0, 0, 0};
- attrs.pads_end = {0, 0, 0, 0};
+ attrs.pads_begin = std::vector<size_t>{0, 0, 0, 0};
+ attrs.pads_end = std::vector<size_t>{0, 0, 0, 0};
attrs.cube_coeff = -0.75;
auto interp = std::make_shared<op::v4::Interpolate>(image, target_shape, scales, axes, attrs);
@@ -170,8 +170,8 @@ TEST(type_prop, interpolate_v4_non_constant_axes_scales) {
attrs.coordinate_transformation_mode = CoordinateTransformMode::HALF_PIXEL;
attrs.nearest_mode = Nearest_mode::ROUND_PREFER_FLOOR;
attrs.antialias = false;
- attrs.pads_begin = {0, 0, 0, 0};
- attrs.pads_end = {0, 0, 0, 0};
+ attrs.pads_begin = std::vector<size_t>{0, 0, 0, 0};
+ attrs.pads_end = std::vector<size_t>{0, 0, 0, 0};
attrs.cube_coeff = -0.75;
auto interp = std::make_shared<op::v4::Interpolate>(image, target_shape, scales, axes, attrs);
@@ -196,8 +196,8 @@ TEST(type_prop, interpolate_v4_non_constant_axes_sizes) {
attrs.coordinate_transformation_mode = CoordinateTransformMode::HALF_PIXEL;
attrs.nearest_mode = Nearest_mode::ROUND_PREFER_FLOOR;
attrs.antialias = false;
- attrs.pads_begin = {0, 0, 0, 0};
- attrs.pads_end = {0, 0, 0, 0};
+ attrs.pads_begin = std::vector<size_t>{0, 0, 0, 0};
+ attrs.pads_end = std::vector<size_t>{0, 0, 0, 0};
attrs.cube_coeff = -0.75;
auto interp = std::make_shared<op::v4::Interpolate>(image, target_shape, scales, axes, attrs);
@@ -218,8 +218,8 @@ TEST(type_prop, interpolate_v4_img_dynamic_rank) {
attrs.coordinate_transformation_mode = CoordinateTransformMode::HALF_PIXEL;
attrs.nearest_mode = Nearest_mode::ROUND_PREFER_FLOOR;
attrs.antialias = false;
- attrs.pads_begin = {0, 0, 0, 0};
- attrs.pads_end = {0, 0, 0, 0};
+ attrs.pads_begin = std::vector<size_t>{0, 0, 0, 0};
+ attrs.pads_end = std::vector<size_t>{0, 0, 0, 0};
attrs.cube_coeff = -0.75;
auto interp = std::make_shared<op::v4::Interpolate>(image, target_shape, scales, axes, attrs);
@@ -242,8 +242,8 @@ TEST(type_prop, interpolate_v4_partial_static_rank) {
attrs.coordinate_transformation_mode = CoordinateTransformMode::HALF_PIXEL;
attrs.nearest_mode = Nearest_mode::ROUND_PREFER_FLOOR;
attrs.antialias = false;
- attrs.pads_begin = {0, 1, 0, 0};
- attrs.pads_end = {0, 1, 0, 0};
+ attrs.pads_begin = std::vector<size_t>{0, 1, 0, 0};
+ attrs.pads_end = std::vector<size_t>{0, 1, 0, 0};
attrs.cube_coeff = -0.75;
auto interp = std::make_shared<op::v4::Interpolate>(image, target_shape, scales, axes, attrs);
@@ -268,8 +268,8 @@ TEST(type_prop, interpolate_v4_img_intervals_use_scales) {
attrs.coordinate_transformation_mode = CoordinateTransformMode::HALF_PIXEL;
attrs.nearest_mode = Nearest_mode::ROUND_PREFER_FLOOR;
attrs.antialias = false;
- attrs.pads_begin = {0, 0, 0, 1};
- attrs.pads_end = {1, 1, 0, 1};
+ attrs.pads_begin = std::vector<size_t>{0, 0, 0, 1};
+ attrs.pads_end = std::vector<size_t>{1, 1, 0, 1};
attrs.cube_coeff = -0.75;
auto interp = std::make_shared<op::v4::Interpolate>(image, target_shape, scales, axes, attrs);
@@ -296,8 +296,8 @@ TEST(type_prop, interpolate_v4_use_sizes_as_shape_of) {
attrs.coordinate_transformation_mode = CoordinateTransformMode::HALF_PIXEL;
attrs.nearest_mode = Nearest_mode::ROUND_PREFER_FLOOR;
attrs.antialias = false;
- attrs.pads_begin = {0, 0, 0, 0};
- attrs.pads_end = {0, 0, 0, 0};
+ attrs.pads_begin = std::vector<size_t>{0, 0, 0, 0};
+ attrs.pads_end = std::vector<size_t>{0, 0, 0, 0};
attrs.cube_coeff = -0.75;
auto interp = std::make_shared<op::v4::Interpolate>(image, target_shape, scales, axes, attrs);
@@ -322,8 +322,8 @@ TEST(type_prop, interpolate_v4_use_scales_interval_shapes) {
attrs.coordinate_transformation_mode = CoordinateTransformMode::HALF_PIXEL;
attrs.nearest_mode = Nearest_mode::ROUND_PREFER_FLOOR;
attrs.antialias = false;
- attrs.pads_begin = {0, 0, 0, 0, 0};
- attrs.pads_end = {0, 0, 0, 0, 0};
+ attrs.pads_begin = std::vector<size_t>{0, 0, 0, 0, 0};
+ attrs.pads_end = std::vector<size_t>{0, 0, 0, 0, 0};
attrs.cube_coeff = -0.75;
auto interp = std::make_shared<op::v4::Interpolate>(image, target_shape, scales, axes, attrs);
@@ -341,8 +341,8 @@ TEST(type_prop, interpolate_v4_target_shapes_gt_axes_number) {
ov::op::util::InterpolateBase::InterpolateAttrs attrs;
attrs.shape_calculation_mode = ov::op::util::InterpolateBase::ShapeCalcMode::SIZES;
- attrs.pads_begin = {0, 0, 0, 0};
- attrs.pads_end = {0, 0, 0, 0};
+ attrs.pads_begin = std::vector<size_t>{0, 0, 0, 0};
+ attrs.pads_end = std::vector<size_t>{0, 0, 0, 0};
auto interp = std::make_shared<op::v4::Interpolate>(image, target_shape, scales, axes, attrs);
EXPECT_EQ(interp->get_element_type(), element::f32);
@@ -357,8 +357,8 @@ TEST(type_prop, interpolate_v4_scales_gt_axes_number) {
ov::op::util::InterpolateBase::InterpolateAttrs attrs;
attrs.shape_calculation_mode = ov::op::util::InterpolateBase::ShapeCalcMode::SCALES;
- attrs.pads_begin = {0, 0, 0, 0};
- attrs.pads_end = {0, 0, 0, 0};
+ attrs.pads_begin = std::vector<size_t>{0, 0, 0, 0};
+ attrs.pads_end = std::vector<size_t>{0, 0, 0, 0};
auto interp = std::make_shared<op::v4::Interpolate>(image, target_shape, scales, axes, attrs);
EXPECT_EQ(interp->get_element_type(), element::f32);
@@ -374,8 +374,8 @@ TEST(type_prop, interpolate_v4_incorrect_mode) {
ov::op::util::InterpolateBase::InterpolateAttrs attrs;
attrs.shape_calculation_mode = ov::op::util::InterpolateBase::ShapeCalcMode::SCALES;
attrs.mode = ov::op::util::InterpolateBase::InterpolateMode::BICUBIC_PILLOW;
- attrs.pads_begin = {0, 0, 0, 0};
- attrs.pads_end = {0, 0, 0, 0};
+ attrs.pads_begin = std::vector<size_t>{0, 0, 0, 0};
+ attrs.pads_end = std::vector<size_t>{0, 0, 0, 0};
OV_EXPECT_THROW(auto interp = std::make_shared<ov::op::v4::Interpolate>(image, target_shape, scales, axes, attrs),
ov::NodeValidationFailure,
@@ -395,8 +395,8 @@ TEST(type_prop, interpolate_v4_target_shape_not_1d) {
ov::op::util::InterpolateBase::InterpolateAttrs attrs;
attrs.shape_calculation_mode = ov::op::util::InterpolateBase::ShapeCalcMode::SIZES;
attrs.mode = ov::op::util::InterpolateBase::InterpolateMode::NEAREST;
- attrs.pads_begin = {0, 0, 0, 0};
- attrs.pads_end = {0, 0, 0, 0};
+ attrs.pads_begin = std::vector<size_t>{0, 0, 0, 0};
+ attrs.pads_end = std::vector<size_t>{0, 0, 0, 0};
OV_EXPECT_THROW(std::ignore = std::make_shared<ov::op::v4::Interpolate>(
image,
@@ -426,8 +426,8 @@ TEST(type_prop, interpolate_v4_scales_not_1d) {
ov::op::util::InterpolateBase::InterpolateAttrs attrs;
attrs.shape_calculation_mode = ov::op::util::InterpolateBase::ShapeCalcMode::SCALES;
attrs.mode = ov::op::util::InterpolateBase::InterpolateMode::NEAREST;
- attrs.pads_begin = {0, 0, 0, 0};
- attrs.pads_end = {0, 0, 0, 0};
+ attrs.pads_begin = std::vector<size_t>{0, 0, 0, 0};
+ attrs.pads_end = std::vector<size_t>{0, 0, 0, 0};
OV_EXPECT_THROW(std::ignore = std::make_shared<ov::op::v4::Interpolate>(
image,
@@ -457,8 +457,8 @@ TEST(type_prop, interpolate_v4_axes_not_1d) {
ov::op::util::InterpolateBase::InterpolateAttrs attrs;
attrs.shape_calculation_mode = ov::op::util::InterpolateBase::ShapeCalcMode::SCALES;
attrs.mode = ov::op::util::InterpolateBase::InterpolateMode::NEAREST;
- attrs.pads_begin = {0, 0, 0, 0};
- attrs.pads_end = {0, 0, 0, 0};
+ attrs.pads_begin = std::vector<size_t>{0, 0, 0, 0};
+ attrs.pads_end = std::vector<size_t>{0, 0, 0, 0};
OV_EXPECT_THROW(std::ignore = std::make_shared<ov::op::v4::Interpolate>(
image,
diff --git a/src/core/xml_util/CMakeLists.txt b/src/core/xml_util/CMakeLists.txt
index a4bf6a3362b..1995ffe2b8f 100644
--- a/src/core/xml_util/CMakeLists.txt
+++ b/src/core/xml_util/CMakeLists.txt
@@ -11,7 +11,6 @@ file(GLOB_RECURSE PUBLIC_HEADERS ${TARGET_INCLUDE_DIR}/*.hpp)
# Create named folders for the sources within the .vcproj
# Empty name lists them directly under the .vcproj
-
source_group("src" FILES ${LIBRARY_SRC})
source_group("include" FILES ${PUBLIC_HEADERS})
@@ -27,6 +26,7 @@ target_include_directories(${TARGET_NAME} PUBLIC
ov_add_clang_format_target(${TARGET_NAME}_clang FOR_TARGETS ${TARGET_NAME})
target_link_libraries(${TARGET_NAME} PRIVATE openvino::runtime)
+
# LTO
set_target_properties(${TARGET_NAME} PROPERTIES INTERPROCEDURAL_OPTIMIZATION_RELEASE ${ENABLE_LTO})
@@ -37,8 +37,7 @@ endif()
ov_build_target_faster(${TARGET_NAME} PCH)
# developer package
-
ov_install_static_lib(${TARGET_NAME} ${OV_CPACK_COMP_CORE})
ov_developer_package_export_targets(TARGET ${TARGET_NAME}
- INSTALL_INCLUDE_DIRECTORIES "${TARGET_INCLUDE_DIR}/")
+ INSTALL_INCLUDE_DIRECTORIES "${TARGET_INCLUDE_DIR}/")
diff --git a/src/plugins/intel_cpu/src/graph_optimizer.cpp b/src/plugins/intel_cpu/src/graph_optimizer.cpp
index b2e6a1ca476..79897cb6e77 100644
--- a/src/plugins/intel_cpu/src/graph_optimizer.cpp
+++ b/src/plugins/intel_cpu/src/graph_optimizer.cpp
@@ -3494,7 +3494,7 @@ void GraphOptimizer::TailNodesPrecisionOptimize(Graph& graph) {
std::unordered_set<NodePtr> visited;
const NodePtr& cur = node;
while (cur) {
- if (!visited.insert(cur).second) {
+ if (!visited.insert(NodePtr(cur)).second) {
break;
}
size_t parentNum = cur->getParentEdges().size();
diff --git a/src/plugins/intel_cpu/src/transformations/cpu_opset/common/pass/move_readvalue_inputs_to_subgraph.cpp b/src/plugins/intel_cpu/src/transformations/cpu_opset/common/pass/move_readvalue_inputs_to_subgraph.cpp
index c5bc2d2c6b5..ceae3b88936 100644
--- a/src/plugins/intel_cpu/src/transformations/cpu_opset/common/pass/move_readvalue_inputs_to_subgraph.cpp
+++ b/src/plugins/intel_cpu/src/transformations/cpu_opset/common/pass/move_readvalue_inputs_to_subgraph.cpp
@@ -87,7 +87,7 @@ ov::intel_cpu::MoveReadValueInputsToSubgraph::MoveReadValueInputsToSubgraph() {
}
if (any_child_on_output_path) {
- visited_path_to_output.insert(node);
+ visited_path_to_output.insert(std::shared_ptr<ov::Node>(node));
found_output = any_child_on_output_path;
}
};
@@ -113,11 +113,11 @@ ov::intel_cpu::MoveReadValueInputsToSubgraph::MoveReadValueInputsToSubgraph() {
if (found_output) {
inputs.emplace_back(node);
- visited_path_to_output.insert(node);
+ visited_path_to_output.emplace(std::shared_ptr<ov::Node>(node));
return;
}
- visited_path_to_rv.insert(node);
+ visited_path_to_rv.emplace(std::shared_ptr<ov::Node>(node));
// Cache to subgraph_nodes
subgraph_nodes.emplace_back(node);
diff --git a/src/plugins/intel_gpu/include/intel_gpu/runtime/tensor.hpp b/src/plugins/intel_gpu/include/intel_gpu/runtime/tensor.hpp
index e4dc0bfb8e4..7c8de8ed5f1 100644
--- a/src/plugins/intel_gpu/include/intel_gpu/runtime/tensor.hpp
+++ b/src/plugins/intel_gpu/include/intel_gpu/runtime/tensor.hpp
@@ -283,14 +283,14 @@ public:
/// @brief Copy construction.
tensor(const tensor& other)
: tensor(0) {
- std::copy_n(other._sizes, tensor_dim_max, _sizes);
+ std::copy(std::cbegin(other._sizes), std::cend(other._sizes), std::begin(_sizes));
}
/// @brief Copy assignment.
tensor& operator=(const tensor& other) {
if (this == &other)
return *this;
- std::copy_n(other._sizes, tensor_dim_max, _sizes);
+ std::copy(std::cbegin(other._sizes), std::cend(other._sizes), std::begin(_sizes));
return *this;
}
diff --git a/src/plugins/intel_npu/src/plugin/npuw/partitioning/online/graph.cpp b/src/plugins/intel_npu/src/plugin/npuw/partitioning/online/graph.cpp
index d9bf20259c4..a71cecc14d1 100644
--- a/src/plugins/intel_npu/src/plugin/npuw/partitioning/online/graph.cpp
+++ b/src/plugins/intel_npu/src/plugin/npuw/partitioning/online/graph.cpp
@@ -1,4 +1,3 @@
-//
// Copyright (C) 2018-2026 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
@@ -93,8 +92,8 @@ own::ade::EdgeHandle own::ade::Graph::link(const own::ade::NodeHandle& src, cons
auto edge = std::make_shared<own::ade::Edge>(src, dst);
own::ade::EdgeHandle eh{edge};
m_edges.emplace(edge.get(), MetaPtr<own::ade::Edge>{edge, own::ade::Meta{}});
- src->m_dst_edges.insert(eh);
- dst->m_src_edges.insert(eh);
+ src->m_dst_edges.insert(own::ade::EdgeHandle(eh));
+ dst->m_src_edges.insert(own::ade::EdgeHandle(eh));
dst->src_nodes_cache_dirty = true;
return eh;
}
@@ -147,7 +146,7 @@ std::vector<own::ade::NodeHandle> own::ade::Graph::nodes() const {
void own::ade::Graph::dfs(own::ade::NodeHandle& nh,
std::unordered_set<own::ade::NodeHandle>& visited,
std::stack<own::ade::NodeHandle>& stack) const {
- visited.insert(nh);
+ visited.insert(own::ade::NodeHandle(nh));
auto dst_nodes = nh->dstNodes();
// FIXME: this was introduced to make the graph
diff --git a/src/plugins/intel_npu/src/plugin/npuw/partitioning/online/graph.hpp b/src/plugins/intel_npu/src/plugin/npuw/partitioning/online/graph.hpp
index 6f83a95c1c6..8a358aade2d 100644
--- a/src/plugins/intel_npu/src/plugin/npuw/partitioning/online/graph.hpp
+++ b/src/plugins/intel_npu/src/plugin/npuw/partitioning/online/graph.hpp
@@ -1,4 +1,3 @@
-//
// Copyright (C) 2018-2026 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
diff --git a/src/plugins/intel_npu/src/plugin/npuw/partitioning/online/group.cpp b/src/plugins/intel_npu/src/plugin/npuw/partitioning/online/group.cpp
index 0692c9d8798..b7c7b1fdbff 100644
--- a/src/plugins/intel_npu/src/plugin/npuw/partitioning/online/group.cpp
+++ b/src/plugins/intel_npu/src/plugin/npuw/partitioning/online/group.cpp
@@ -32,9 +32,9 @@ Group::Group(const std::shared_ptr<ov::Node>& node,
m_id(gid),
m_graph(g),
m_snapshot(snapshot) {
- m_input_layers.insert(node);
- m_output_layers.insert(node);
- m_content.insert(node);
+ m_input_layers.insert(std::shared_ptr<ov::Node>(node));
+ m_output_layers.insert(std::shared_ptr<ov::Node>(node));
+ m_content.insert(std::shared_ptr<ov::Node>(node));
}
Group::Group(size_t gid,
@@ -57,14 +57,14 @@ void Group::includeExtraLayers(detail::OVNodeSet& input_layers,
auto target_input = layer->get_input_source_output(i);
auto layer_parent = target_input.get_node()->shared_from_this();
if (ov::op::util::is_parameter(layer_parent)) {
- input_layers.insert(layer);
+ input_layers.insert(std::shared_ptr<ov::Node>(layer));
}
// Also include Converts
if (!isOp(layer_parent)) {
if (!ov::op::util::is_constant(layer_parent) && !ov::op::util::is_parameter(layer_parent) &&
!ov::op::util::is_output(layer_parent)) {
NPUW_ASSERT(ov::is_type<ov::op::v0::Convert>(layer_parent));
- extra_content.insert(layer_parent);
+ extra_content.insert(std::shared_ptr<ov::Node>(layer_parent));
}
}
}
@@ -73,14 +73,14 @@ void Group::includeExtraLayers(detail::OVNodeSet& input_layers,
for (const auto& target_output : target_outputs) {
auto layer_child = target_output.get_node()->shared_from_this();
if (ov::op::util::is_output(layer_child)) {
- output_layers.insert(layer);
+ output_layers.insert(std::shared_ptr<ov::Node>(layer));
}
}
}
}
for (const auto& layer : extra_content) {
- content.insert(layer);
+ content.insert(std::shared_ptr<ov::Node>(layer));
}
}
@@ -144,17 +144,17 @@ const std::unordered_set<std::shared_ptr<ov::Node>>& Group::getOutputs() const {
}
void Group::addInput(const std::shared_ptr<ov::Node>& node) {
- m_input_layers.insert(node);
+ m_input_layers.insert(std::shared_ptr<ov::Node>(node));
m_mic_io_valid = false;
}
void Group::addOutput(const std::shared_ptr<ov::Node>& node) {
- m_output_layers.insert(node);
+ m_output_layers.insert(std::shared_ptr<ov::Node>(node));
m_mic_io_valid = false;
}
void Group::addContent(const std::shared_ptr<ov::Node>& node) {
- m_content.insert(node);
+ m_content.insert(std::shared_ptr<ov::Node>(node));
}
size_t Group::getId() const {
@@ -188,12 +188,12 @@ void Group::updateInputLayers(const Group::GPtr& gptr_other) {
auto node_prod = locked_snapshot->getNodeProducers(layer);
for (const auto& prod : node_prod) {
if (m_content.find(prod) == m_content.end()) {
- selected.insert(prod);
+ selected.insert(std::shared_ptr<ov::Node>(prod));
}
}
for (const auto& l : selected) {
if (isOp(l)) {
- m_input_layers.insert(layer);
+ m_input_layers.insert(std::shared_ptr<ov::Node>(layer));
}
}
}
@@ -219,7 +219,7 @@ void Group::updateOutputLayers(const Group::GPtr& gptr_other) {
}
}
if (!reject) {
- m_output_layers.insert(layer);
+ m_output_layers.insert(std::shared_ptr<ov::Node>(layer));
}
}
}
@@ -280,7 +280,7 @@ void Group::fuseWith(const Group::GPtr& gptr_cons) {
// Merge 2 contents together
for (const auto& layer : gptr_cons->m_content) {
- m_content.insert(layer);
+ m_content.insert(std::shared_ptr<ov::Node>(layer));
}
takeFlags(gptr_cons);
@@ -301,7 +301,7 @@ void Group::fuseInputs(const std::pair<Group::GPtr, Group::GPtr>& gptr_inputs) {
// Update ov::node to own::ade::NodeHandle map and merge all contents together
for (const auto& layer : absorbed_group->m_content) {
node_to_gr->at(layer) = absorbing_group;
- absorbing_group->m_content.insert(layer);
+ absorbing_group->m_content.insert(std::shared_ptr<ov::Node>(layer));
}
absorbing_group->takeFlags(absorbed_group);
absorbing_group->updateInputLayers(absorbed_group);
@@ -350,7 +350,7 @@ bool Group::hasCycle(const Group::GPtr& gptr_cons) const {
// skip self during this iter
if (!(m_nh == prod)) {
st.push(prod);
- visited.insert(prod); // mark at push time to avoid duplicate pushes
+ visited.insert(own::ade::NodeHandle(prod)); // mark at push time to avoid duplicate pushes
}
}
@@ -366,7 +366,7 @@ bool Group::hasCycle(const Group::GPtr& gptr_cons) const {
for (const auto& prod : nh->srcNodes()) {
if (!visited.count(prod)) {
st.push(prod);
- visited.insert(prod); // mark at push time
+ visited.insert(own::ade::NodeHandle(prod)); // mark at push time
}
}
}
diff --git a/thirdparty/gtest/CMakeLists.txt b/thirdparty/gtest/CMakeLists.txt
index 39137262a40..bcf3a36f345 100644
--- a/thirdparty/gtest/CMakeLists.txt
+++ b/thirdparty/gtest/CMakeLists.txt
@@ -57,4 +57,12 @@ foreach(target gtest gtest_main gmock gmock_main)
# disable warnings
ov_disable_all_warnings(${target})
set_target_properties(${target} PROPERTIES FOLDER thirdparty)
+
+ # thirdparty/dependencies.cmake enables CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE for the whole thirdparty scope
+ # when ENABLE_LTO=ON. Override it per-target for gtest: GCC 15's lto1 emits a false-positive
+ # -Wstringop-overflow through the std::unordered_set<std::string> insertion path in UnitTestFilter
+ # gtest does not benefit from LTO;
+ if(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 15)
+ set_target_properties(${target} PROPERTIES INTERPROCEDURAL_OPTIMIZATION_RELEASE FALSE)
+ endif()
endforeach()