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
[CPU] Replace custom ways to suppress unused variable warnings with [[maybe_unused]] (#29896)
Arseniy Obolenskiy3ceeeb52d643
diff --git a/src/plugins/intel_cpu/src/emitters/plugin/x64/jit_load_store_emitters.cpp b/src/plugins/intel_cpu/src/emitters/plugin/x64/jit_load_store_emitters.cppindex 1ea12d5d430..b580a3784c8 100644--- a/src/plugins/intel_cpu/src/emitters/plugin/x64/jit_load_store_emitters.cpp+++ b/src/plugins/intel_cpu/src/emitters/plugin/x64/jit_load_store_emitters.cpp@@ -231,13 +231,9 @@ void jit_load_emitter::emit_isa(const Xbyak::Reg64& reg_src, const int out_vec_i*/template <typename Vmm>void jit_load_emitter::load_bytes(const Vmm& vmm, const Xbyak::Reg64& reg, int offset, int load_size) const {- constexpr bool is_xmm = std::is_same<Vmm, Xbyak::Xmm>::value;- constexpr bool is_ymm = std::is_same<Vmm, Xbyak::Ymm>::value;- constexpr bool is_zmm = std::is_same<Vmm, Xbyak::Zmm>::value;-- MAYBE_UNUSED(is_xmm);- MAYBE_UNUSED(is_ymm);- MAYBE_UNUSED(is_zmm);+ [[maybe_unused]] constexpr bool is_xmm = std::is_same<Vmm, Xbyak::Xmm>::value;+ [[maybe_unused]] constexpr bool is_ymm = std::is_same<Vmm, Xbyak::Ymm>::value;+ [[maybe_unused]] constexpr bool is_zmm = std::is_same<Vmm, Xbyak::Zmm>::value;// Ensure data fits completely inside the Xmm/Ymm/Zmm registerif (load_size < 0 || load_size > 64) {@@ -448,13 +444,9 @@ void jit_load_emitter::load_bytes_to_dword_extension(const Vmm& vmm,int offset,bool is_signed,int load_size) const {- constexpr bool is_xmm = std::is_same<Vmm, Xbyak::Xmm>::value;- constexpr bool is_ymm = std::is_same<Vmm, Xbyak::Ymm>::value;- constexpr bool is_zmm = std::is_same<Vmm, Xbyak::Zmm>::value;-- MAYBE_UNUSED(is_xmm);- MAYBE_UNUSED(is_ymm);- MAYBE_UNUSED(is_zmm);+ [[maybe_unused]] constexpr bool is_xmm = std::is_same<Vmm, Xbyak::Xmm>::value;+ [[maybe_unused]] constexpr bool is_ymm = std::is_same<Vmm, Xbyak::Ymm>::value;+ [[maybe_unused]] constexpr bool is_zmm = std::is_same<Vmm, Xbyak::Zmm>::value;// Ensure extended double words fit inside Zmm (32 * load_size <= 512)// For Ymm register, load capacity is halved (32 * load_size <= 256)@@ -550,13 +542,9 @@ void jit_load_emitter::load_words_to_dword_extension(const Vmm& vmm,int offset,ov::element::Type prc,int load_size) const {- constexpr bool is_xmm = std::is_same<Vmm, Xbyak::Xmm>::value;- constexpr bool is_ymm = std::is_same<Vmm, Xbyak::Ymm>::value;- constexpr bool is_zmm = std::is_same<Vmm, Xbyak::Zmm>::value;-- MAYBE_UNUSED(is_xmm);- MAYBE_UNUSED(is_ymm);- MAYBE_UNUSED(is_zmm);+ [[maybe_unused]] constexpr bool is_xmm = std::is_same<Vmm, Xbyak::Xmm>::value;+ [[maybe_unused]] constexpr bool is_ymm = std::is_same<Vmm, Xbyak::Ymm>::value;+ [[maybe_unused]] constexpr bool is_zmm = std::is_same<Vmm, Xbyak::Zmm>::value;bool is_bf16 = (prc == ov::element::bf16);bool is_f16 = (prc == ov::element::f16);@@ -885,13 +873,9 @@ void jit_store_emitter::emit_isa(const int in_vec_idx, const Xbyak::Reg64& reg_d*/template <typename Vmm>void jit_store_emitter::store_bytes(const Xbyak::Reg64& reg, int offset, int store_size) const {- constexpr bool is_xmm = std::is_same<Vmm, Xbyak::Xmm>::value;- constexpr bool is_ymm = std::is_same<Vmm, Xbyak::Ymm>::value;- constexpr bool is_zmm = std::is_same<Vmm, Xbyak::Zmm>::value;-- MAYBE_UNUSED(is_xmm);- MAYBE_UNUSED(is_ymm);- MAYBE_UNUSED(is_zmm);+ [[maybe_unused]] constexpr bool is_xmm = std::is_same<Vmm, Xbyak::Xmm>::value;+ [[maybe_unused]] constexpr bool is_ymm = std::is_same<Vmm, Xbyak::Ymm>::value;+ [[maybe_unused]] constexpr bool is_zmm = std::is_same<Vmm, Xbyak::Zmm>::value;// Ensure data fits completely inside the Xmm/Ymm/Zmm registerif (store_size < 0 || store_size > 64) {@@ -1055,13 +1039,9 @@ void jit_store_emitter::store_dword_to_byte_extension(const Xbyak::Reg64& reg,int offset,bool is_signed,int store_num) const {- constexpr bool is_xmm = std::is_same<Vmm, Xbyak::Xmm>::value;- constexpr bool is_ymm = std::is_same<Vmm, Xbyak::Ymm>::value;- constexpr bool is_zmm = std::is_same<Vmm, Xbyak::Zmm>::value;-- MAYBE_UNUSED(is_xmm);- MAYBE_UNUSED(is_ymm);- MAYBE_UNUSED(is_zmm);+ [[maybe_unused]] constexpr bool is_xmm = std::is_same<Vmm, Xbyak::Xmm>::value;+ [[maybe_unused]] constexpr bool is_ymm = std::is_same<Vmm, Xbyak::Ymm>::value;+ [[maybe_unused]] constexpr bool is_zmm = std::is_same<Vmm, Xbyak::Zmm>::value;// Ensure data fits completely inside the Xmm/Ymm/Zmm register// At most 8 dwords can fit inside the Ymm register@@ -1225,13 +1205,9 @@ void jit_store_emitter::store_dword_to_word_extension(const Xbyak::Reg64& reg,const bool is_f16 = (precision == ov::element::f16);const bool is_signed = precision.is_signed();- constexpr bool is_xmm = std::is_same<Vmm, Xbyak::Xmm>::value;- constexpr bool is_ymm = std::is_same<Vmm, Xbyak::Ymm>::value;- constexpr bool is_zmm = std::is_same<Vmm, Xbyak::Zmm>::value;-- MAYBE_UNUSED(is_xmm);- MAYBE_UNUSED(is_ymm);- MAYBE_UNUSED(is_zmm);+ [[maybe_unused]] constexpr bool is_xmm = std::is_same<Vmm, Xbyak::Xmm>::value;+ [[maybe_unused]] constexpr bool is_ymm = std::is_same<Vmm, Xbyak::Ymm>::value;+ [[maybe_unused]] constexpr bool is_zmm = std::is_same<Vmm, Xbyak::Zmm>::value;// Ensure data fits completely inside the Xmm/Ymm/Zmm register// At most 4 dwords can fit inside the Xmm registerdiff --git a/src/plugins/intel_cpu/src/graph.cpp b/src/plugins/intel_cpu/src/graph.cppindex 255bcf060c6..fbc98931f4c 100644--- a/src/plugins/intel_cpu/src/graph.cpp+++ b/src/plugins/intel_cpu/src/graph.cpp@@ -973,8 +973,7 @@ static EdgeClusters FormEdgeClusters(const std::vector<EdgePtr>& graphEdges) {};for (auto& edge : graphEdges) {- const auto clusterIdx = addToCluster(edge);- MAYBE_UNUSED(clusterIdx);+ [[maybe_unused]] const auto clusterIdx = addToCluster(edge);DEBUG_LOG("Added edge: ", *edge, " to cluster: ", clusterIdx);}diff --git a/src/plugins/intel_cpu/src/memory_control.cpp b/src/plugins/intel_cpu/src/memory_control.cppindex 1f2cdf4bf68..a32b8ab1c10 100644--- a/src/plugins/intel_cpu/src/memory_control.cpp+++ b/src/plugins/intel_cpu/src/memory_control.cpp@@ -161,8 +161,7 @@ public:using BlockType = MemoryBlockWithReuse;public:- void insert(const MemoryRegion& reg, const std::vector<size_t>& syncInds) override {- (void)syncInds;+ void insert(const MemoryRegion& reg, [[maybe_unused]] const std::vector<size_t>& syncInds) override {auto block = make_unique<BlockType>();CPU_DEBUG_CAP_ENABLE(m_blocks.emplace_back(*block);)m_solution.insert({reg.id, makeDnnlMemoryBlock(std::move(block))});@@ -192,8 +191,7 @@ private:class MemoryManagerStatic : public IMemoryManager {public:- void insert(const MemoryRegion& reg, const std::vector<size_t>& syncInds) override {- (void)syncInds;+ void insert(const MemoryRegion& reg, [[maybe_unused]] const std::vector<size_t>& syncInds) override {OPENVINO_ASSERT(reg.size >= 0, getClassName(), ": got undefined block size");m_boxes.emplace_back(MemorySolver::Box{reg.start, reg.finish, reg.size, reg.id});reset_flag = true;diff --git a/src/plugins/intel_cpu/src/node.h b/src/plugins/intel_cpu/src/node.hindex 3529bfca82c..8a701d895c6 100644--- a/src/plugins/intel_cpu/src/node.h+++ b/src/plugins/intel_cpu/src/node.h@@ -559,8 +559,7 @@ public:* The main use case are nodes with nested graphs.* Use this method to make nested graphs a part of global allocation procedure*/- virtual int registerToAllocationContext(int offset, AllocationContext& context) {- (void)context; // nothing to register by default+ virtual int registerToAllocationContext(int offset, [[maybe_unused]] AllocationContext& context) {return offset;}diff --git a/src/plugins/intel_cpu/src/nodes/conv.cpp b/src/plugins/intel_cpu/src/nodes/conv.cppindex 5c9d68532b1..f16b0fed833 100644--- a/src/plugins/intel_cpu/src/nodes/conv.cpp+++ b/src/plugins/intel_cpu/src/nodes/conv.cpp@@ -536,12 +536,14 @@ void Convolution::getSupportedDescriptors() {MemoryDescPtr in_candidate, out_candidate;memory::format_tag nspc =ndims == 3 ? memory::format_tag::nwc : (ndims == 4 ? memory::format_tag::nhwc : memory::format_tag::ndhwc);- memory::format_tag ncsp =+ [[maybe_unused]] memory::format_tag ncsp =ndims == 3 ? memory::format_tag::ncw : (ndims == 4 ? memory::format_tag::nchw : memory::format_tag::ncdhw);- memory::format_tag nCsp8c = ndims == 3 ? memory::format_tag::nCw8c- : (ndims == 4 ? memory::format_tag::nChw8c : memory::format_tag::nCdhw8c);- memory::format_tag nCsp16c = ndims == 3 ? memory::format_tag::nCw16c- : (ndims == 4 ? memory::format_tag::nChw16c : memory::format_tag::nCdhw16c);+ [[maybe_unused]] memory::format_tag nCsp8c =+ ndims == 3 ? memory::format_tag::nCw8c+ : (ndims == 4 ? memory::format_tag::nChw8c : memory::format_tag::nCdhw8c);+ [[maybe_unused]] memory::format_tag nCsp16c =+ ndims == 3 ? memory::format_tag::nCw16c+ : (ndims == 4 ? memory::format_tag::nChw16c : memory::format_tag::nCdhw16c);if (canBeExecutedInInt8()) {DEBUG_LOG(getName(), "Creating I8 descriptor");@@ -655,9 +657,6 @@ void Convolution::getSupportedDescriptors() {createDescriptor({in_candidate}, {out_candidate});}#else- (void)ncsp;- (void)nCsp8c;- (void)nCsp16c;in_candidate = std::make_shared<DnnlBlockedMemoryDesc>(inputShape, inputDataType, nspc);out_candidate = std::make_shared<DnnlBlockedMemoryDesc>(outputShape, outputDataType, nspc);diff --git a/src/plugins/intel_cpu/src/nodes/executors/common/common_utils.hpp b/src/plugins/intel_cpu/src/nodes/executors/common/common_utils.hppindex 32931217295..eabd2aa9f99 100644--- a/src/plugins/intel_cpu/src/nodes/executors/common/common_utils.hpp+++ b/src/plugins/intel_cpu/src/nodes/executors/common/common_utils.hpp@@ -10,12 +10,11 @@#include <vector>#include "nodes/executors/memory_arguments.hpp"-#include "utils/cpp/maybe_unused.hpp"#include "utils/cpu_utils.hpp"namespace ov::intel_cpu {-OV_CPU_MAYBE_UNUSED_FUNCTION static std::vector<float> getDeQuantizedScales(const MemoryArgs& memory) {+[[maybe_unused]] static std::vector<float> getDeQuantizedScales(const MemoryArgs& memory) {if (!memory.count(ARG_DST_DEQ_SCALE)) {return {};}diff --git a/src/plugins/intel_cpu/src/nodes/executors/fullyconnected_implementations.cpp b/src/plugins/intel_cpu/src/nodes/executors/fullyconnected_implementations.cppindex 06284fb1d94..a4c7e7e57ae 100644--- a/src/plugins/intel_cpu/src/nodes/executors/fullyconnected_implementations.cpp+++ b/src/plugins/intel_cpu/src/nodes/executors/fullyconnected_implementations.cpp@@ -27,7 +27,6 @@#include "nodes/executors/precision_translation.hpp"#include "nodes/executors/type_mask.hpp"#include "openvino/core/type/element_type.hpp"-#include "utils/cpp/maybe_unused.hpp"#include "utils/debug_capabilities.h"#if defined(OV_CPU_WITH_KLEIDIAI)@@ -211,15 +210,15 @@ std::optional<executor::Config<Attrs>> requiresFallbackCommon(const executor::Coreturn std::optional<executor::Config<Attrs>>(FCConfig{optimalDescriptors, config.attrs, config.postOps});}-OV_CPU_MAYBE_UNUSED_FUNCTION static inline bool noWeightsDecompression(const FCConfig& config) {+[[maybe_unused]] static inline bool noWeightsDecompression(const FCConfig& config) {return !DnnlFCPrimitive::useWeightsDecompressionImpl(srcType(config), weiType(config), config.attrs.modelType);}-OV_CPU_MAYBE_UNUSED_FUNCTION static inline bool noSparseDecompression(const FCConfig& config) {+[[maybe_unused]] static inline bool noSparseDecompression(const FCConfig& config) {return !(config.attrs.sparseWeights);}-OV_CPU_MAYBE_UNUSED_FUNCTION static inline bool noPostOps(const FCConfig& config) {+[[maybe_unused]] static inline bool noPostOps(const FCConfig& config) {return config.postOps.empty();}diff --git a/src/plugins/intel_cpu/src/nodes/executors/graph_emitter.hpp b/src/plugins/intel_cpu/src/nodes/executors/graph_emitter.hppindex ae0a7a28c1a..2ddacb269a9 100644--- a/src/plugins/intel_cpu/src/nodes/executors/graph_emitter.hpp+++ b/src/plugins/intel_cpu/src/nodes/executors/graph_emitter.hpp@@ -100,14 +100,13 @@ public:GraphEmitter<Attrs> graphEmitter(config.descs, config.attrs, config.postOps, memory, context, name);- const auto& graphExecutor =+ [[maybe_unused]] const auto& graphExecutor =graphEmitter.createGraph(fallbackConfig.descs, fallbackConfig.attrs, fallbackConfig.postOps, context).ensureAttrsMatch().ensureSrcDescsMatch().ensureDstDescsMatch().ensurePostOpsMatch().emit();- (void)graphExecutor;OPENVINO_THROW("Fallback logic is not implemented yet"); // return graphExecutor;}diff --git a/src/plugins/intel_cpu/src/nodes/executors/precision_translation.hpp b/src/plugins/intel_cpu/src/nodes/executors/precision_translation.hppindex 8f1a96afd28..76fcefd8cde 100644--- a/src/plugins/intel_cpu/src/nodes/executors/precision_translation.hpp+++ b/src/plugins/intel_cpu/src/nodes/executors/precision_translation.hpp@@ -31,20 +31,16 @@ struct bypass {template <ov::element::Type_t type>struct just {- ov::element::Type operator()(const std::vector<ov::element::Type>& types, size_t idx) const {- // ignore everything- (void)types;- (void)idx;+ ov::element::Type operator()([[maybe_unused]] const std::vector<ov::element::Type>& types,+ [[maybe_unused]] size_t idx) const {return type;}};template <>struct just<TypeMaskAlias::fxx> {- ov::element::Type operator()(const std::vector<ov::element::Type>& types, size_t idx) const {- // ignore everything- (void)types;- (void)idx;+ ov::element::Type operator()([[maybe_unused]] const std::vector<ov::element::Type>& types,+ [[maybe_unused]] size_t idx) const {return defaultFloatPrecision();}};diff --git a/src/plugins/intel_cpu/src/nodes/experimental_detectron_generate_proposals_single_image.cpp b/src/plugins/intel_cpu/src/nodes/experimental_detectron_generate_proposals_single_image.cppindex 7b8b22cc9b9..394f46f9c4b 100644--- a/src/plugins/intel_cpu/src/nodes/experimental_detectron_generate_proposals_single_image.cpp+++ b/src/plugins/intel_cpu/src/nodes/experimental_detectron_generate_proposals_single_image.cpp@@ -27,12 +27,7 @@ struct Indexer4d {int dim23_;int dim123_;- explicit Indexer4d(int dim0, int dim1, int dim2, int dim3)- : dim3_(dim3),- dim23_(dim2 * dim3),- dim123_(dim1 * dim2 * dim3) {- (void)dim0;- }+ explicit Indexer4d(int dim1, int dim2, int dim3) : dim3_(dim3), dim23_(dim2 * dim3), dim123_(dim1 * dim2 * dim3) {}int operator()(int i, int j, int k, int n) const {return i * dim123_ + j * dim23_ + k * dim3_ + n;@@ -52,10 +47,10 @@ void refine_anchors(const float* deltas,const float min_box_W,const float max_delta_log_wh,float coordinates_offset) {- Indexer4d delta_idx(anchors_num, 4, bottom_H, bottom_W);- Indexer4d score_idx(anchors_num, 1, bottom_H, bottom_W);- Indexer4d proposal_idx(bottom_H, bottom_W, anchors_num, 5);- Indexer4d anchor_idx(bottom_H, bottom_W, anchors_num, 4);+ Indexer4d delta_idx(4, bottom_H, bottom_W);+ Indexer4d score_idx(1, bottom_H, bottom_W);+ Indexer4d proposal_idx(bottom_W, anchors_num, 5);+ Indexer4d anchor_idx(bottom_W, anchors_num, 4);parallel_for2d(bottom_H, bottom_W, [&](int h, int w) {for (int anchor = 0; anchor < anchors_num; ++anchor) {diff --git a/src/plugins/intel_cpu/src/nodes/generate_proposals.cpp b/src/plugins/intel_cpu/src/nodes/generate_proposals.cppindex 18b5a7c630d..a5c473a3644 100644--- a/src/plugins/intel_cpu/src/nodes/generate_proposals.cpp+++ b/src/plugins/intel_cpu/src/nodes/generate_proposals.cpp@@ -28,12 +28,7 @@ struct Indexer4d {int dim23_;int dim123_;- explicit Indexer4d(int dim0, int dim1, int dim2, int dim3)- : dim3_(dim3),- dim23_(dim2 * dim3),- dim123_(dim1 * dim2 * dim3) {- (void)dim0;- }+ explicit Indexer4d(int dim1, int dim2, int dim3) : dim3_(dim3), dim23_(dim2 * dim3), dim123_(dim1 * dim2 * dim3) {}int operator()(int i, int j, int k, int n) const {return i * dim123_ + j * dim23_ + k * dim3_ + n;@@ -53,10 +48,10 @@ void refine_anchors(const float* deltas,const float min_box_W,const float max_delta_log_wh,float coordinates_offset) {- Indexer4d delta_idx(anchors_num, 4, bottom_H, bottom_W);- Indexer4d score_idx(anchors_num, 1, bottom_H, bottom_W);- Indexer4d proposal_idx(bottom_H, bottom_W, anchors_num, 6);- Indexer4d anchor_idx(bottom_H, bottom_W, anchors_num, 4);+ Indexer4d delta_idx(4, bottom_H, bottom_W);+ Indexer4d score_idx(1, bottom_H, bottom_W);+ Indexer4d proposal_idx(bottom_W, anchors_num, 6);+ Indexer4d anchor_idx(bottom_W, anchors_num, 4);parallel_for2d(bottom_H, bottom_W, [&](int h, int w) {for (int anchor = 0; anchor < anchors_num; ++anchor) {diff --git a/src/plugins/intel_cpu/src/nodes/llm_mlp.cpp b/src/plugins/intel_cpu/src/nodes/llm_mlp.cppindex bb1f22806f5..cd858f959df 100644--- a/src/plugins/intel_cpu/src/nodes/llm_mlp.cpp+++ b/src/plugins/intel_cpu/src/nodes/llm_mlp.cpp@@ -592,8 +592,7 @@ void LLMMLP::createPrimitive() {}}-void LLMMLP::execute(const dnnl::stream& strm) {- MAYBE_UNUSED(strm);+void LLMMLP::execute([[maybe_unused]] const dnnl::stream& strm) {m_executor->execute();}diff --git a/src/plugins/intel_cpu/src/nodes/qkv_proj.cpp b/src/plugins/intel_cpu/src/nodes/qkv_proj.cppindex 72c08758bc7..45de01a80e3 100644--- a/src/plugins/intel_cpu/src/nodes/qkv_proj.cpp+++ b/src/plugins/intel_cpu/src/nodes/qkv_proj.cpp@@ -326,8 +326,7 @@ void QKVProjection::createPrimitive() {}}-void QKVProjection::execute(const dnnl::stream& strm) {- MAYBE_UNUSED(strm);+void QKVProjection::execute([[maybe_unused]] const dnnl::stream& strm) {m_executor->execute();}diff --git a/src/plugins/intel_cpu/src/nodes/rnn.cpp b/src/plugins/intel_cpu/src/nodes/rnn.cppindex 87eb45e54ea..93d8b521a77 100644--- a/src/plugins/intel_cpu/src/nodes/rnn.cpp+++ b/src/plugins/intel_cpu/src/nodes/rnn.cpp@@ -1408,13 +1408,13 @@ void RNN::prepareParams() {primArgs[DNNL_ARG_SCRATCHPAD] = scratchpadMem->getPrimitive();}-std::shared_ptr<MemoryDesc> RNN::getSrcMemDesc(const dnnl::primitive_desc& prim_desc, size_t idx) const {- (void)prim_desc;+std::shared_ptr<MemoryDesc> RNN::getSrcMemDesc([[maybe_unused]] const dnnl::primitive_desc& prim_desc,+ size_t idx) const {return supportedPrimitiveDescriptors[0].getConfig().inConfs[idx].getMemDesc();}-std::shared_ptr<MemoryDesc> RNN::getDstMemDesc(const dnnl::primitive_desc& prim_desc, size_t idx) const {- (void)prim_desc;+std::shared_ptr<MemoryDesc> RNN::getDstMemDesc([[maybe_unused]] const dnnl::primitive_desc& prim_desc,+ size_t idx) const {return supportedPrimitiveDescriptors[0].getConfig().outConfs[idx].getMemDesc();}diff --git a/src/plugins/intel_cpu/src/nodes/rope.cpp b/src/plugins/intel_cpu/src/nodes/rope.cppindex 5643a000d4a..4447a5bb257 100644--- a/src/plugins/intel_cpu/src/nodes/rope.cpp+++ b/src/plugins/intel_cpu/src/nodes/rope.cpp@@ -30,13 +30,10 @@ RoPE::RoPE(const std::shared_ptr<ov::Node>& op, const GraphContext::CPtr& contexm_config = node->get_config();}-static std::shared_ptr<kernel::JitKernelBase> createJitKernel(const jit_rotary_compile_params& param,- bool check_vec_size2 = false) {+static std::shared_ptr<kernel::JitKernelBase> createJitKernel([[maybe_unused]] const jit_rotary_compile_params& param,+ [[maybe_unused]] bool check_vec_size2 = false) {std::shared_ptr<kernel::JitKernelBase> res;- MAYBE_UNUSED(param);- MAYBE_UNUSED(check_vec_size2);-#if defined(OPENVINO_ARCH_X86_64)if (dnnl::impl::cpu::x64::mayiuse(dnnl::impl::cpu::x64::avx512_core)) {@@ -72,17 +69,11 @@ static std::shared_ptr<kernel::JitKernelBase> createJitKernel(const jit_rotary_creturn res;}-static void execJitKernel(const std::shared_ptr<kernel::JitKernelBase>& ker,- const void* src,- void* dst,- const float* cos,- const float* sin) {- MAYBE_UNUSED(ker);- MAYBE_UNUSED(src);- MAYBE_UNUSED(dst);- MAYBE_UNUSED(cos);- MAYBE_UNUSED(sin);-+static void execJitKernel([[maybe_unused]] const std::shared_ptr<kernel::JitKernelBase>& ker,+ [[maybe_unused]] const void* src,+ [[maybe_unused]] void* dst,+ [[maybe_unused]] const float* cos,+ [[maybe_unused]] const float* sin) {#if defined(OPENVINO_ARCH_X86_64)jit_rotary_call_args call_args;diff --git a/src/plugins/intel_cpu/src/transformations/transformation_pipeline.cpp b/src/plugins/intel_cpu/src/transformations/transformation_pipeline.cppindex ccfe2f5312a..fe236a4bb82 100644--- a/src/plugins/intel_cpu/src/transformations/transformation_pipeline.cpp+++ b/src/plugins/intel_cpu/src/transformations/transformation_pipeline.cpp@@ -1377,7 +1377,7 @@ void Transformations::MainSnippets() {snippets::pass::TokenizeSnippets);auto mm_supports_transpose_b = [this]([[maybe_unused]] const std::shared_ptr<const ov::Node>& n) {- MAYBE_UNUSED(config.inferencePrecision);+ [[maybe_unused]] const auto& inferencePrecision = config.inferencePrecision;// Note: BrgemmTPP doesn't support transposed KN natively// so we should extract transposes for the corresponding matmul nodes#if defined(SNIPPETS_LIBXSMM_TPP)@@ -1394,7 +1394,7 @@ void Transformations::MainSnippets() {}ov::element::TypeVector precisions;auto push_precision = [&](const ov::element::Type& precision) {- if (config.inferencePrecision == ov::element::bf16 && precision == ov::element::f32)+ if (inferencePrecision == ov::element::bf16 && precision == ov::element::f32)precisions.push_back(ov::element::bf16);elseprecisions.push_back(precision);diff --git a/src/plugins/intel_cpu/src/transformations/transformation_pipeline.h b/src/plugins/intel_cpu/src/transformations/transformation_pipeline.hindex a5d01a56a81..ce3dcd4def6 100644--- a/src/plugins/intel_cpu/src/transformations/transformation_pipeline.h+++ b/src/plugins/intel_cpu/src/transformations/transformation_pipeline.h@@ -22,9 +22,7 @@ class Transformations {public:Transformations(std::shared_ptr<ov::Model> initialModel, const Config& config): model(std::move(initialModel)),- config(config) {- CPU_DEBUG_CAPS_MAYBE_UNUSED(this->config);- }+ config(config) {}void UpToLpt();void CpuSpecificOpSet();diff --git a/src/plugins/intel_cpu/src/utils/cpp/maybe_unused.hpp b/src/plugins/intel_cpu/src/utils/cpp/maybe_unused.hppdeleted file mode 100644index 1bbe4ad8da0..00000000000--- a/src/plugins/intel_cpu/src/utils/cpp/maybe_unused.hpp+++ /dev/null@@ -1,22 +0,0 @@-// Copyright (C) 2023 Intel Corporation-// SPDX-License-Identifier: Apache-2.0-//--#pragma once-// Define a macro to silence "unused variable" warnings-#if defined(__GNUC__) || defined(__clang__)-# define OV_CPU_MAYBE_UNUSED(x) ((void)(x))-#elif defined(_MSC_VER)-# define OV_CPU_MAYBE_UNUSED(x) __pragma(warning(suppress : 4100)) x-#else-# define OV_CPU_MAYBE_UNUSED(x) ((void)(x))-#endif--// Define a macro to silence "unused function" warnings-#if defined(__GNUC__) || defined(__clang__)-# define OV_CPU_MAYBE_UNUSED_FUNCTION __attribute__((unused))-#elif defined(_MSC_VER)-# define OV_CPU_MAYBE_UNUSED_FUNCTION __pragma(warning(suppress : 4505))-#else-# define OV_CPU_MAYBE_UNUSED_FUNCTION-#endifdiff --git a/src/plugins/intel_cpu/src/utils/debug_capabilities.h b/src/plugins/intel_cpu/src/utils/debug_capabilities.hindex 9bd4be9081e..02ad35f5437 100644--- a/src/plugins/intel_cpu/src/utils/debug_capabilities.h+++ b/src/plugins/intel_cpu/src/utils/debug_capabilities.h@@ -294,7 +294,3 @@ bool getEnvBool(const char* name);# define CPU_DEBUG_CAPS_ALWAYS_TRUE(x) x#endif // CPU_DEBUG_CAPS--// To avoid "unused variable" warnings `when debug caps-// need more information than non-debug caps version-#define CPU_DEBUG_CAPS_MAYBE_UNUSED(x) (void)x