OpenVINO™ is an open source toolkit for optimizing and deploying AI inference
C++ aicomputer-visiondeep-learningdeploy-aidiffusion-modelsgenerative-aigood-first-issueinferencellm-inferencenatural-language-processingnlpopenvinooptimize-aiperformance-boostrecommendation-systemspeech-recognitionstable-diffusiontransformersyolo
[Snippets] Fix GCC 15 warning in SetBufferRegGroup (#37375)
Vladislav Golubev765dc66b5a27
diff --git a/src/common/snippets/include/snippets/lowered/pass/set_buffer_reg_group.hpp b/src/common/snippets/include/snippets/lowered/pass/set_buffer_reg_group.hppindex cc436231812..253380e571a 100644--- a/src/common/snippets/include/snippets/lowered/pass/set_buffer_reg_group.hpp+++ b/src/common/snippets/include/snippets/lowered/pass/set_buffer_reg_group.hpp@@ -58,7 +58,8 @@ public:private:using BufferPool = std::vector<BufferExpressionPtr>;using BufferMap = std::map<BufferExpressionPtr, UnifiedLoopInfo::LoopPortInfo>;- using BufferIndices = std::unordered_map<BufferExpressionPtr, size_t>;+ // Here we use raw pointers to avoid GCC 15 -Warray-bounds false positive error+ using BufferIndices = std::unordered_map<const BufferExpression*, size_t>;/*** @brief Create adjacency matrix for Buffer system. See comment in the method for more details.* @param loop_manager the loop managerdiff --git a/src/common/snippets/src/lowered/pass/set_buffer_reg_group.cpp b/src/common/snippets/src/lowered/pass/set_buffer_reg_group.cppindex 36ecf3affaf..d7321f6a772 100644--- a/src/common/snippets/src/lowered/pass/set_buffer_reg_group.cpp+++ b/src/common/snippets/src/lowered/pass/set_buffer_reg_group.cpp@@ -73,8 +73,8 @@ void SetBufferRegGroup::update_adj_matrix(const BufferMap::value_type& lhs,const BufferIndices& buffer_indices,size_t buffer_count,std::vector<bool>& adj) {- const auto lhs_idx = buffer_indices.at(lhs.first);- const auto rhs_idx = buffer_indices.at(rhs.first);+ const auto lhs_idx = buffer_indices.at(lhs.first.get());+ const auto rhs_idx = buffer_indices.at(rhs.first.get());// Already adjacent - skipif (adj[index(buffer_count, rhs_idx, lhs_idx)]) {return;@@ -246,7 +246,7 @@ bool SetBufferRegGroup::run(LinearIR& linear_ir,BufferIndices buffer_indices;buffer_indices.reserve(buffer_pool.size());for (size_t i = 0; i < buffer_pool.size(); ++i) {- buffer_indices.emplace(buffer_pool[i], i);+ buffer_indices.emplace(buffer_pool[i].get(), i);}// Creation of Adj matrix