Skip to content

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

[GHA] Use clang formatter 18.1.8 instead of 18.1.3 (#31162)

Pawel Raasz3018dd358a94
diff --git a/.github/workflows/code_style.yml b/.github/workflows/code_style.yml
index 4aaf7b210c3..e4565ba9181 100644
--- a/.github/workflows/code_style.yml
+++ b/.github/workflows/code_style.yml
@@ -21,8 +21,9 @@ jobs:
- name: Install clang-format-18
run: |
- sudo apt update
- sudo apt --assume-yes install clang-format-18
+ wget https://apt.llvm.org/llvm.sh
+ chmod +x llvm.sh
+ sudo ./llvm.sh 18
# Run cmake with extra options to cover as much source code as possible:
# - -DENABLE_PROFILING_ITT=ON -DSELECTIVE_BUILD=COLLECT to enable codestyle check for ITT collector
@@ -57,8 +58,11 @@ jobs:
- name: Install clang-format-18 and cross-compilation dependencies
run: |
+ wget https://apt.llvm.org/llvm.sh
+ chmod +x llvm.sh
+ sudo ./llvm.sh 18
sudo apt update
- sudo apt --assume-yes install binutils-aarch64-linux-gnu gcc-aarch64-linux-gnu g++-aarch64-linux-gnu scons clang-format-18
+ sudo apt --assume-yes install binutils-aarch64-linux-gnu gcc-aarch64-linux-gnu g++-aarch64-linux-gnu scons
# Run cmake with extra options to cover as much source code as possible:
# - -DENABLE_PROFILING_ITT=ON -DSELECTIVE_BUILD=COLLECT to enable codestyle check for ITT collector
@@ -93,8 +97,11 @@ jobs:
- name: Install clang-format-18 and cross-compilation dependencies
run: |
+ wget https://apt.llvm.org/llvm.sh
+ chmod +x llvm.sh
+ sudo ./llvm.sh 18
sudo apt update
- sudo apt --assume-yes install gcc-riscv64-linux-gnu g++-riscv64-linux-gnu binutils-riscv64-linux-gnu clang-format-18
+ sudo apt --assume-yes install gcc-riscv64-linux-gnu g++-riscv64-linux-gnu binutils-riscv64-linux-gnu
# Run cmake with extra options to cover as much source code as possible:
# - -DENABLE_PROFILING_ITT=ON -DSELECTIVE_BUILD=COLLECT to enable codestyle check for ITT collector
diff --git a/src/bindings/js/node/src/preprocess/input_info.cpp b/src/bindings/js/node/src/preprocess/input_info.cpp
index 25bdffb4ce0..162fb88773a 100644
--- a/src/bindings/js/node/src/preprocess/input_info.cpp
+++ b/src/bindings/js/node/src/preprocess/input_info.cpp
@@ -8,7 +8,7 @@
#include "node/include/preprocess/input_tensor_info.hpp"
#include "node/include/preprocess/preprocess_steps.hpp"
-InputInfo::InputInfo(const Napi::CallbackInfo& info) : Napi::ObjectWrap<InputInfo>(info), _input_info(nullptr){};
+InputInfo::InputInfo(const Napi::CallbackInfo& info) : Napi::ObjectWrap<InputInfo>(info), _input_info(nullptr) {};
Napi::Function InputInfo::get_class_constructor(Napi::Env env) {
return DefineClass(env,
diff --git a/src/bindings/js/node/src/preprocess/input_model_info.cpp b/src/bindings/js/node/src/preprocess/input_model_info.cpp
index 669e052d945..d2004ebcfb0 100644
--- a/src/bindings/js/node/src/preprocess/input_model_info.cpp
+++ b/src/bindings/js/node/src/preprocess/input_model_info.cpp
@@ -8,7 +8,7 @@
InputModelInfo::InputModelInfo(const Napi::CallbackInfo& info)
: Napi::ObjectWrap<InputModelInfo>(info),
- _model_info(nullptr){};
+ _model_info(nullptr) {};
Napi::Function InputModelInfo::get_class_constructor(Napi::Env env) {
return DefineClass(env, "InputModelInfo", {InstanceMethod("setLayout", &InputModelInfo::set_layout)});
diff --git a/src/bindings/js/node/src/preprocess/input_tensor_info.cpp b/src/bindings/js/node/src/preprocess/input_tensor_info.cpp
index 66528466b40..54d829a27bb 100644
--- a/src/bindings/js/node/src/preprocess/input_tensor_info.cpp
+++ b/src/bindings/js/node/src/preprocess/input_tensor_info.cpp
@@ -8,7 +8,7 @@
InputTensorInfo::InputTensorInfo(const Napi::CallbackInfo& info)
: Napi::ObjectWrap<InputTensorInfo>(info),
- _tensor_info(nullptr){};
+ _tensor_info(nullptr) {};
Napi::Function InputTensorInfo::get_class_constructor(Napi::Env env) {
return DefineClass(env,
diff --git a/src/bindings/js/node/src/preprocess/output_info.cpp b/src/bindings/js/node/src/preprocess/output_info.cpp
index 05208e77159..dd50e0dd68b 100644
--- a/src/bindings/js/node/src/preprocess/output_info.cpp
+++ b/src/bindings/js/node/src/preprocess/output_info.cpp
@@ -6,7 +6,7 @@
#include "node/include/errors.hpp"
#include "node/include/preprocess/output_tensor_info.hpp"
-OutputInfo::OutputInfo(const Napi::CallbackInfo& info) : Napi::ObjectWrap<OutputInfo>(info), _output_info(nullptr){};
+OutputInfo::OutputInfo(const Napi::CallbackInfo& info) : Napi::ObjectWrap<OutputInfo>(info), _output_info(nullptr) {};
Napi::Function OutputInfo::get_class_constructor(Napi::Env env) {
return DefineClass(env, "OutputInfo", {InstanceMethod("tensor", &OutputInfo::tensor)});
diff --git a/src/bindings/js/node/src/preprocess/output_tensor_info.cpp b/src/bindings/js/node/src/preprocess/output_tensor_info.cpp
index aec37fe0999..3ae57a1240f 100644
--- a/src/bindings/js/node/src/preprocess/output_tensor_info.cpp
+++ b/src/bindings/js/node/src/preprocess/output_tensor_info.cpp
@@ -8,7 +8,7 @@
OutputTensorInfo::OutputTensorInfo(const Napi::CallbackInfo& info)
: Napi::ObjectWrap<OutputTensorInfo>(info),
- _tensor_info(nullptr){};
+ _tensor_info(nullptr) {};
Napi::Function OutputTensorInfo::get_class_constructor(Napi::Env env) {
return DefineClass(env,
diff --git a/src/bindings/js/node/src/preprocess/preprocess_steps.cpp b/src/bindings/js/node/src/preprocess/preprocess_steps.cpp
index 2f59479e192..34903cca917 100644
--- a/src/bindings/js/node/src/preprocess/preprocess_steps.cpp
+++ b/src/bindings/js/node/src/preprocess/preprocess_steps.cpp
@@ -5,7 +5,7 @@
PreProcessSteps::PreProcessSteps(const Napi::CallbackInfo& info)
: Napi::ObjectWrap<PreProcessSteps>(info),
- _preprocess_info(nullptr){};
+ _preprocess_info(nullptr) {};
Napi::Function PreProcessSteps::get_class_constructor(Napi::Env env) {
return DefineClass(env, "PreProcessSteps", {InstanceMethod("resize", &PreProcessSteps::resize)});
diff --git a/src/common/snippets/src/shape_inference/shape_inference.cpp b/src/common/snippets/src/shape_inference/shape_inference.cpp
index f312a869ce0..cf14ed94333 100644
--- a/src/common/snippets/src/shape_inference/shape_inference.cpp
+++ b/src/common/snippets/src/shape_inference/shape_inference.cpp
@@ -59,24 +59,18 @@ ShapeInferPtr IShapeInferSnippetsFactory::get_specific_op_shape_infer(
return {};
}
-#define SHAPE_INFER_PREDEFINED(OP, InferType) \
- { \
- OP::get_type_info_static(), []([[maybe_unused]] const std::shared_ptr<ov::Node>& n) { \
- return std::make_shared<InferType>(); \
- } \
- }
-#define SHAPE_INFER_OP_SPECIFIC(OP) \
- { \
- OP::get_type_info_static(), [](const std::shared_ptr<ov::Node>& n) { \
- return std::make_shared<OP::ShapeInfer>(n); \
- } \
- }
-#define SHAPE_INFER_OP_SPECIFIC_EXTERNAL(OP, InferType) \
- { \
- OP::get_type_info_static(), [](const std::shared_ptr<ov::Node>& n) { \
- return std::make_shared<InferType>(n); \
- } \
- }
+#define SHAPE_INFER_PREDEFINED(OP, InferType) \
+ {OP::get_type_info_static(), []([[maybe_unused]] const std::shared_ptr<ov::Node>& n) { \
+ return std::make_shared<InferType>(); \
+ }}
+#define SHAPE_INFER_OP_SPECIFIC(OP) \
+ {OP::get_type_info_static(), [](const std::shared_ptr<ov::Node>& n) { \
+ return std::make_shared<OP::ShapeInfer>(n); \
+ }}
+#define SHAPE_INFER_OP_SPECIFIC_EXTERNAL(OP, InferType) \
+ {OP::get_type_info_static(), [](const std::shared_ptr<ov::Node>& n) { \
+ return std::make_shared<InferType>(n); \
+ }}
const IShapeInferSnippetsFactory::TRegistry IShapeInferSnippetsFactory::registry{
SHAPE_INFER_PREDEFINED(op::ConvertTruncation, PassThroughShapeInfer),
diff --git a/src/common/transformations/include/transformations/common_optimizations/simplify_shape_of_sub_graph.hpp b/src/common/transformations/include/transformations/common_optimizations/simplify_shape_of_sub_graph.hpp
index 8d70d3894dd..4a0954d309d 100644
--- a/src/common/transformations/include/transformations/common_optimizations/simplify_shape_of_sub_graph.hpp
+++ b/src/common/transformations/include/transformations/common_optimizations/simplify_shape_of_sub_graph.hpp
@@ -42,7 +42,7 @@ public:
class ov::pass::SimplifyShapeOfSubGraph : public ov::pass::ModelPass {
public:
OPENVINO_MODEL_PASS_RTTI("SimplifyShapeOfSubGraph");
- explicit SimplifyShapeOfSubGraph(bool use_shapes = true) : m_use_shapes(use_shapes){};
+ explicit SimplifyShapeOfSubGraph(bool use_shapes = true) : m_use_shapes(use_shapes) {};
bool run_on_model(const std::shared_ptr<ov::Model>& m) override;
private:
diff --git a/src/core/include/openvino/pass/pattern/op/optional.hpp b/src/core/include/openvino/pass/pattern/op/optional.hpp
index 093ce793713..4085829927f 100644
--- a/src/core/include/openvino/pass/pattern/op/optional.hpp
+++ b/src/core/include/openvino/pass/pattern/op/optional.hpp
@@ -54,7 +54,7 @@ public:
/// \param patterns The pattern to match a graph.
Optional(const std::vector<DiscreteTypeInfo>& type_infos, const OutputVector& inputs = {})
: Pattern(inputs),
- optional_types(type_infos){};
+ optional_types(type_infos) {};
template <typename TPredicate>
Optional(const std::vector<DiscreteTypeInfo>& type_infos, const OutputVector& inputs, const TPredicate& pred)
diff --git a/src/core/reference/src/utils/philox_generator.cpp b/src/core/reference/src/utils/philox_generator.cpp
index cfb33cb5522..c0797a712f5 100644
--- a/src/core/reference/src/utils/philox_generator.cpp
+++ b/src/core/reference/src/utils/philox_generator.cpp
@@ -64,7 +64,7 @@ void PhiloxGenerator::set_operator_seed(const uint64_t op_seed) {
}
// ====== MockPhiloxGenerator functions ======
-MockPhiloxGenerator::MockPhiloxGenerator() : PhiloxGenerator(op::PhiloxAlignment::MOCK, 0, 0, {0, 0}){};
+MockPhiloxGenerator::MockPhiloxGenerator() : PhiloxGenerator(op::PhiloxAlignment::MOCK, 0, 0, {0, 0}) {};
std::pair<uint64_t, uint64_t> MockPhiloxGenerator::get_next_state() {
return get_previous_state();
diff --git a/src/core/src/pattern/op/predicate.cpp b/src/core/src/pattern/op/predicate.cpp
index 20d55a54c27..7455a39733f 100644
--- a/src/core/src/pattern/op/predicate.cpp
+++ b/src/core/src/pattern/op/predicate.cpp
@@ -8,11 +8,11 @@
namespace ov::pass::pattern {
-PatternSymbolValue::PatternSymbolValue() : m_value(){};
-PatternSymbolValue::PatternSymbolValue(const std::shared_ptr<ov::Symbol>& s) : m_value(s){};
-PatternSymbolValue::PatternSymbolValue(int64_t i) : m_value(i){};
-PatternSymbolValue::PatternSymbolValue(double d) : m_value(d){};
-PatternSymbolValue::PatternSymbolValue(const std::vector<PatternSymbolValue>& g) : m_value(g){};
+PatternSymbolValue::PatternSymbolValue() : m_value() {};
+PatternSymbolValue::PatternSymbolValue(const std::shared_ptr<ov::Symbol>& s) : m_value(s) {};
+PatternSymbolValue::PatternSymbolValue(int64_t i) : m_value(i) {};
+PatternSymbolValue::PatternSymbolValue(double d) : m_value(d) {};
+PatternSymbolValue::PatternSymbolValue(const std::vector<PatternSymbolValue>& g) : m_value(g) {};
bool PatternSymbolValue::is_dynamic() const {
return is_valid() && m_value.is<std::shared_ptr<ov::Symbol>>();
diff --git a/src/core/src/type/float4_e2m1.cpp b/src/core/src/type/float4_e2m1.cpp
index ee5316aa515..b841d180e8d 100644
--- a/src/core/src/type/float4_e2m1.cpp
+++ b/src/core/src/type/float4_e2m1.cpp
@@ -102,7 +102,7 @@ uint8_t f32_to_f4e2m1_bits(const float value) {
}
} // namespace
-float4_e2m1::float4_e2m1(const float value) : m_value(f32_to_f4e2m1_bits(value)){};
+float4_e2m1::float4_e2m1(const float value) : m_value(f32_to_f4e2m1_bits(value)) {};
float4_e2m1::operator float() const {
return f4e2m1_to_f32_lut[m_value];
diff --git a/src/core/src/type/float8_e5m2.cpp b/src/core/src/type/float8_e5m2.cpp
index 59f64f8c55d..c4e887840ce 100644
--- a/src/core/src/type/float8_e5m2.cpp
+++ b/src/core/src/type/float8_e5m2.cpp
@@ -37,7 +37,7 @@ float8_e5m2::float8_e5m2(uint32_t sign, uint32_t biased_exponent, uint32_t fract
: m_value((sign & 0x01) << (f8e5m2_e_size + f8e5m2_m_size) |
(biased_exponent & (f8e5m2_e_mask >> f8e5m2_m_size)) << f8e5m2_m_size | (fraction & f8e5m2_m_mask)) {}
-float8_e5m2::float8_e5m2(const float value) : m_value(f32_to_f8e5m2_bits(value)){};
+float8_e5m2::float8_e5m2(const float value) : m_value(f32_to_f8e5m2_bits(value)) {};
float8_e5m2::operator float() const {
return static_cast<float>(float16::from_bits((static_cast<uint16_t>(m_value) << byte_shift)));
diff --git a/src/core/src/type/float8_e8m0.cpp b/src/core/src/type/float8_e8m0.cpp
index 503d23975e3..22b83765118 100644
--- a/src/core/src/type/float8_e8m0.cpp
+++ b/src/core/src/type/float8_e8m0.cpp
@@ -44,7 +44,7 @@ uint8_t f32_to_f8e8m0_bits(const float value) {
}
} // namespace
-float8_e8m0::float8_e8m0(const float value) : m_value(f32_to_f8e8m0_bits(value)){};
+float8_e8m0::float8_e8m0(const float value) : m_value(f32_to_f8e8m0_bits(value)) {};
float8_e8m0::operator float() const {
constexpr auto f8e8m0_2_power_negative_127 = std::numeric_limits<ov::float8_e8m0>::min();
diff --git a/src/frontends/paddle/src/op/lstm.cpp b/src/frontends/paddle/src/op/lstm.cpp
index 57a79d5fbd7..a96b48ca58e 100644
--- a/src/frontends/paddle/src/op/lstm.cpp
+++ b/src/frontends/paddle/src/op/lstm.cpp
@@ -142,7 +142,7 @@ struct LSTMAttributes {
: m_direction(node.get_attribute<bool>("is_bidirec") ? ov::op::RecurrentSequenceDirection::BIDIRECTIONAL
: ov::op::RecurrentSequenceDirection::FORWARD),
m_hidden_size(node.get_attribute<int32_t>("hidden_size")),
- m_layers(node.get_attribute<int32_t>("num_layers")){};
+ m_layers(node.get_attribute<int32_t>("num_layers")) {};
ov::op::RecurrentSequenceDirection m_direction;
int32_t m_hidden_size;
diff --git a/src/frontends/tensorflow_lite/src/tensor_lite_place.hpp b/src/frontends/tensorflow_lite/src/tensor_lite_place.hpp
index 284546e6cb0..e4e3444047e 100644
--- a/src/frontends/tensorflow_lite/src/tensor_lite_place.hpp
+++ b/src/frontends/tensorflow_lite/src/tensor_lite_place.hpp
@@ -28,7 +28,7 @@ public:
: ov::frontend::tensorflow::TensorPlace(input_model, pshape, type, names),
m_quantization(quantization),
m_sparsity(sparsity),
- m_data(m_sparsity == nullptr || m_sparsity->is_disabled() ? data : m_sparsity->dense_data()){};
+ m_data(m_sparsity == nullptr || m_sparsity->is_disabled() ? data : m_sparsity->dense_data()) {};
void translate(ov::Output<ov::Node>& output, bool convert_tensor_attrs_to_nodes = false);
diff --git a/src/plugins/intel_cpu/src/cpu_memory.h b/src/plugins/intel_cpu/src/cpu_memory.h
index 2e46543f304..c8a02a185d5 100644
--- a/src/plugins/intel_cpu/src/cpu_memory.h
+++ b/src/plugins/intel_cpu/src/cpu_memory.h
@@ -368,7 +368,7 @@ public:
class StringMemoryBlock {
public:
- StringMemoryBlock() : m_data(nullptr, release){};
+ StringMemoryBlock() : m_data(nullptr, release) {};
[[nodiscard]] OvString* getStringPtr() const noexcept;
void setExtBuff(OvString* ptr, size_t size);
[[nodiscard]] size_t getStrLen() const noexcept;
diff --git a/src/plugins/intel_cpu/src/emitters/snippets/aarch64/cpu_generator.cpp b/src/plugins/intel_cpu/src/emitters/snippets/aarch64/cpu_generator.cpp
index b2db5aedc51..8c0df9476ed 100644
--- a/src/plugins/intel_cpu/src/emitters/snippets/aarch64/cpu_generator.cpp
+++ b/src/plugins/intel_cpu/src/emitters/snippets/aarch64/cpu_generator.cpp
@@ -52,99 +52,89 @@
namespace ov {
-#define CREATE_SNIPPETS_EMITTER(e_type, ...) \
- { \
- [this](const snippets::lowered::ExpressionPtr& expr) -> std::shared_ptr<snippets::Emitter> { \
- return std::make_shared<e_type>(h.get(), isa, expr, ##__VA_ARGS__); \
- }, \
- [](const std::shared_ptr<ov::Node>& n) -> std::set<std::vector<element::Type>> { \
- return e_type::get_supported_precisions(n); \
- } \
- }
-
-#define CREATE_CPU_EMITTER(e_type) \
- { \
- [this](const snippets::lowered::ExpressionPtr& expr) -> std::shared_ptr<snippets::Emitter> { \
- return std::make_shared<e_type>(h.get(), isa, expr->get_node()); \
- }, \
- [](const std::shared_ptr<ov::Node>& n) -> std::set<std::vector<element::Type>> { \
- return e_type::get_supported_precisions(n); \
- } \
- }
-
-#define CREATE_GELU_V7_EMITTER(e_type_erf, e_type_tanh) \
- { \
- [this](const snippets::lowered::ExpressionPtr& expr) -> std::shared_ptr<snippets::Emitter> { \
- const auto& n = expr->get_node(); \
- const auto& gelu = ov::as_type_ptr<ov::op::v7::Gelu>(n); \
- if (gelu == nullptr) { \
- OPENVINO_THROW("Can't cast to ov::op::v7::Gelu"); \
- } \
- const auto approximationMode = gelu->get_approximation_mode(); \
- if (approximationMode == ov::op::GeluApproximationMode::ERF) { \
- return std::make_shared<e_type_erf>(h.get(), isa, n); \
- } else if (approximationMode == ov::op::GeluApproximationMode::TANH) { \
- return std::make_shared<e_type_tanh>(h.get(), isa, n); \
- } else { \
- OPENVINO_THROW("Unsupported Gelu approximation mode"); \
- } \
- }, \
- [](const std::shared_ptr<ov::Node>& n) -> std::set<std::vector<element::Type>> { \
- const auto& gelu = ov::as_type_ptr<ov::op::v7::Gelu>(n); \
- if (gelu == nullptr) { \
- OPENVINO_THROW("Can't cast to ov::op::v7::Gelu"); \
- } \
- const auto approximationMode = gelu->get_approximation_mode(); \
- if (approximationMode == ov::op::GeluApproximationMode::ERF) { \
- return e_type_erf::get_supported_precisions(n); \
- } else if (approximationMode == ov::op::GeluApproximationMode::TANH) { \
- return e_type_tanh::get_supported_precisions(n); \
- } else { \
- OPENVINO_THROW("Unsupported Gelu approximation mode"); \
- } \
- } \
- }
-
-#define CREATE_ROUND_V5_EMITTER(e_type_from_zero, e_type_even) \
- { \
- [this](const snippets::lowered::ExpressionPtr& expr) -> std::shared_ptr<snippets::Emitter> { \
- const auto& n = expr->get_node(); \
- const auto& round = ov::as_type_ptr<ov::op::v5::Round>(n); \
- if (round == nullptr) { \
- OPENVINO_THROW("Can't cast to ov::op::v5::Round"); \
- } \
- const auto roundingMode = round->get_mode(); \
- if (roundingMode == ov::op::v5::Round::RoundMode::HALF_AWAY_FROM_ZERO) { \
- return std::make_shared<e_type_from_zero>(h.get(), isa, n); \
- } else if (roundingMode == ov::op::v5::Round::RoundMode::HALF_TO_EVEN) { \
- return std::make_shared<e_type_even>(h.get(), isa, n); \
- } else { \
- OPENVINO_THROW("Unsupported Round mode"); \
- } \
- }, \
- [](const std::shared_ptr<ov::Node>& n) -> std::set<std::vector<element::Type>> { \
- const auto& round = ov::as_type_ptr<ov::op::v5::Round>(n); \
- if (round == nullptr) { \
- OPENVINO_THROW("Can't cast to ov::op::v5::Round"); \
- } \
- if (round->get_mode() == ov::op::v5::Round::RoundMode::HALF_AWAY_FROM_ZERO) { \
- return e_type_from_zero::get_supported_precisions(n); \
- } else if (round->get_mode() == ov::op::v5::Round::RoundMode::HALF_TO_EVEN) { \
- return e_type_even::get_supported_precisions(n); \
- } \
- OPENVINO_THROW("Unsupported Round mode"); \
- } \
- }
-
-#define CREATE_UNDEFINED_EMITTER(supported_precisions) \
- { \
- []([[maybe_unused]] const snippets::lowered::ExpressionPtr& expr) -> std::shared_ptr<snippets::Emitter> { \
- return nullptr; \
- }, \
- []([[maybe_unused]] const std::shared_ptr<ov::Node>& n) -> std::set<std::vector<element::Type>> { \
- return supported_precisions; \
- } \
- }
+#define CREATE_SNIPPETS_EMITTER(e_type, ...) \
+ {[this](const snippets::lowered::ExpressionPtr& expr) -> std::shared_ptr<snippets::Emitter> { \
+ return std::make_shared<e_type>(h.get(), isa, expr, ##__VA_ARGS__); \
+ }, \
+ [](const std::shared_ptr<ov::Node>& n) -> std::set<std::vector<element::Type>> { \
+ return e_type::get_supported_precisions(n); \
+ }}
+
+#define CREATE_CPU_EMITTER(e_type) \
+ {[this](const snippets::lowered::ExpressionPtr& expr) -> std::shared_ptr<snippets::Emitter> { \
+ return std::make_shared<e_type>(h.get(), isa, expr->get_node()); \
+ }, \
+ [](const std::shared_ptr<ov::Node>& n) -> std::set<std::vector<element::Type>> { \
+ return e_type::get_supported_precisions(n); \
+ }}
+
+#define CREATE_GELU_V7_EMITTER(e_type_erf, e_type_tanh) \
+ {[this](const snippets::lowered::ExpressionPtr& expr) -> std::shared_ptr<snippets::Emitter> { \
+ const auto& n = expr->get_node(); \
+ const auto& gelu = ov::as_type_ptr<ov::op::v7::Gelu>(n); \
+ if (gelu == nullptr) { \
+ OPENVINO_THROW("Can't cast to ov::op::v7::Gelu"); \
+ } \
+ const auto approximationMode = gelu->get_approximation_mode(); \
+ if (approximationMode == ov::op::GeluApproximationMode::ERF) { \
+ return std::make_shared<e_type_erf>(h.get(), isa, n); \
+ } else if (approximationMode == ov::op::GeluApproximationMode::TANH) { \
+ return std::make_shared<e_type_tanh>(h.get(), isa, n); \
+ } else { \
+ OPENVINO_THROW("Unsupported Gelu approximation mode"); \
+ } \
+ }, \
+ [](const std::shared_ptr<ov::Node>& n) -> std::set<std::vector<element::Type>> { \
+ const auto& gelu = ov::as_type_ptr<ov::op::v7::Gelu>(n); \
+ if (gelu == nullptr) { \
+ OPENVINO_THROW("Can't cast to ov::op::v7::Gelu"); \
+ } \
+ const auto approximationMode = gelu->get_approximation_mode(); \
+ if (approximationMode == ov::op::GeluApproximationMode::ERF) { \
+ return e_type_erf::get_supported_precisions(n); \
+ } else if (approximationMode == ov::op::GeluApproximationMode::TANH) { \
+ return e_type_tanh::get_supported_precisions(n); \
+ } else { \
+ OPENVINO_THROW("Unsupported Gelu approximation mode"); \
+ } \
+ }}
+
+#define CREATE_ROUND_V5_EMITTER(e_type_from_zero, e_type_even) \
+ {[this](const snippets::lowered::ExpressionPtr& expr) -> std::shared_ptr<snippets::Emitter> { \
+ const auto& n = expr->get_node(); \
+ const auto& round = ov::as_type_ptr<ov::op::v5::Round>(n); \
+ if (round == nullptr) { \
+ OPENVINO_THROW("Can't cast to ov::op::v5::Round"); \
+ } \
+ const auto roundingMode = round->get_mode(); \
+ if (roundingMode == ov::op::v5::Round::RoundMode::HALF_AWAY_FROM_ZERO) { \
+ return std::make_shared<e_type_from_zero>(h.get(), isa, n); \
+ } else if (roundingMode == ov::op::v5::Round::RoundMode::HALF_TO_EVEN) { \
+ return std::make_shared<e_type_even>(h.get(), isa, n); \
+ } else { \
+ OPENVINO_THROW("Unsupported Round mode"); \
+ } \
+ }, \
+ [](const std::shared_ptr<ov::Node>& n) -> std::set<std::vector<element::Type>> { \
+ const auto& round = ov::as_type_ptr<ov::op::v5::Round>(n); \
+ if (round == nullptr) { \
+ OPENVINO_THROW("Can't cast to ov::op::v5::Round"); \
+ } \
+ if (round->get_mode() == ov::op::v5::Round::RoundMode::HALF_AWAY_FROM_ZERO) { \
+ return e_type_from_zero::get_supported_precisions(n); \
+ } else if (round->get_mode() == ov::op::v5::Round::RoundMode::HALF_TO_EVEN) { \
+ return e_type_even::get_supported_precisions(n); \
+ } \
+ OPENVINO_THROW("Unsupported Round mode"); \
+ }}
+
+#define CREATE_UNDEFINED_EMITTER(supported_precisions) \
+ {[]([[maybe_unused]] const snippets::lowered::ExpressionPtr& expr) -> std::shared_ptr<snippets::Emitter> { \
+ return nullptr; \
+ }, \
+ []([[maybe_unused]] const std::shared_ptr<ov::Node>& n) -> std::set<std::vector<element::Type>> { \
+ return supported_precisions; \
+ }}
class jit_snippet : public dnnl::impl::cpu::aarch64::jit_generator {
public:
diff --git a/src/plugins/intel_cpu/src/emitters/snippets/x64/cpu_generator.cpp b/src/plugins/intel_cpu/src/emitters/snippets/x64/cpu_generator.cpp
index 973c7c56ac4..14d98a02dd3 100644
--- a/src/plugins/intel_cpu/src/emitters/snippets/x64/cpu_generator.cpp
+++ b/src/plugins/intel_cpu/src/emitters/snippets/x64/cpu_generator.cpp
@@ -166,68 +166,58 @@ static bool is_segfault_detector_emitter(const intel_cpu::jit_emitter* emitter)
// return !dynamic_cast<const jit_nop_emitter*>(emitter);
}
-# define CREATE_SNIPPETS_EMITTER(e_type, ...) \
- { \
- [this](const snippets::lowered::ExpressionPtr& expr) -> std::shared_ptr<snippets::Emitter> { \
- auto emitter = std::make_shared<e_type>(h.get(), isa, expr, ##__VA_ARGS__); \
- if (debug_config.enable_segfault_detector && is_segfault_detector_emitter(emitter.get())) { \
- auto segfault_emitter = \
- std::make_shared<jit_uni_segfault_detector_emitter>(h.get(), \
- isa, \
- emitter.get(), \
- is_load_emitter(emitter.get()), \
- is_store_emitter(emitter.get()), \
- expr->get_node()->get_friendly_name()); \
- return std::make_shared<jit_debug_emitter>(emitter, \
- segfault_emitter, \
- jit_debug_emitter::EmissionLocation::preamble); \
- } \
- return emitter; \
- }, \
- [](const std::shared_ptr<ov::Node>& n) -> std::set<std::vector<element::Type>> { \
- return e_type::get_supported_precisions(n); \
- } \
- }
+# define CREATE_SNIPPETS_EMITTER(e_type, ...) \
+ {[this](const snippets::lowered::ExpressionPtr& expr) -> std::shared_ptr<snippets::Emitter> { \
+ auto emitter = std::make_shared<e_type>(h.get(), isa, expr, ##__VA_ARGS__); \
+ if (debug_config.enable_segfault_detector && is_segfault_detector_emitter(emitter.get())) { \
+ auto segfault_emitter = \
+ std::make_shared<jit_uni_segfault_detector_emitter>(h.get(), \
+ isa, \
+ emitter.get(), \
+ is_load_emitter(emitter.get()), \
+ is_store_emitter(emitter.get()), \
+ expr->get_node()->get_friendly_name()); \
+ return std::make_shared<jit_debug_emitter>(emitter, \
+ segfault_emitter, \
+ jit_debug_emitter::EmissionLocation::preamble); \
+ } \
+ return emitter; \
+ }, \
+ [](const std::shared_ptr<ov::Node>& n) -> std::set<std::vector<element::Type>> { \
+ return e_type::get_supported_precisions(n); \
+ }}
#else
-# define CREATE_SNIPPETS_EMITTER(e_type, ...) \
- { \
- [this](const snippets::lowered::ExpressionPtr& expr) -> std::shared_ptr<snippets::Emitter> { \
- return std::make_shared<e_type>(h.get(), isa, expr, ##__VA_ARGS__); \
- }, \
- [](const std::shared_ptr<ov::Node>& n) -> std::set<std::vector<element::Type>> { \
- return e_type::get_supported_precisions(n); \
- } \
- }
+# define CREATE_SNIPPETS_EMITTER(e_type, ...) \
+ {[this](const snippets::lowered::ExpressionPtr& expr) -> std::shared_ptr<snippets::Emitter> { \
+ return std::make_shared<e_type>(h.get(), isa, expr, ##__VA_ARGS__); \
+ }, \
+ [](const std::shared_ptr<ov::Node>& n) -> std::set<std::vector<element::Type>> { \
+ return e_type::get_supported_precisions(n); \
+ }}
#endif
-#define CREATE_DEBUG_TPP_EMITTER(e_type) \
- { \
- [this](const snippets::lowered::ExpressionPtr& expr) -> std::shared_ptr<snippets::Emitter> { \
- return std::make_shared<DebugTppEmitter>(expr, std::make_shared<e_type>(h.get(), isa, expr)); \
- }, \
- [](const std::shared_ptr<ov::Node>& n) -> std::set<std::vector<element::Type>> { \
- return e_type::get_supported_precisions(n); \
- } \
- }
-#define CREATE_CPU_EMITTER(e_type) \
- { \
- [this]([[maybe_unused]] const snippets::lowered::ExpressionPtr& expr) -> std::shared_ptr<snippets::Emitter> { \
- return std::make_shared<e_type>(h.get(), isa, expr->get_node()); \
- }, \
- []([[maybe_unused]] const std::shared_ptr<ov::Node>& n) -> std::set<std::vector<element::Type>> { \
- return e_type::get_supported_precisions(n); \
- } \
- }
-
-#define CREATE_UNDEFINED_EMITTER(supported_precisions) \
- { \
- []([[maybe_unused]] const snippets::lowered::ExpressionPtr& expr) -> std::shared_ptr<snippets::Emitter> { \
- return nullptr; \
- }, \
- []([[maybe_unused]] const std::shared_ptr<ov::Node>& n) -> std::set<std::vector<element::Type>> { \
- return supported_precisions; \
- } \
- }
+#define CREATE_DEBUG_TPP_EMITTER(e_type) \
+ {[this](const snippets::lowered::ExpressionPtr& expr) -> std::shared_ptr<snippets::Emitter> { \
+ return std::make_shared<DebugTppEmitter>(expr, std::make_shared<e_type>(h.get(), isa, expr)); \
+ }, \
+ [](const std::shared_ptr<ov::Node>& n) -> std::set<std::vector<element::Type>> { \
+ return e_type::get_supported_precisions(n); \
+ }}
+#define CREATE_CPU_EMITTER(e_type) \
+ {[this]([[maybe_unused]] const snippets::lowered::ExpressionPtr& expr) -> std::shared_ptr<snippets::Emitter> { \
+ return std::make_shared<e_type>(h.get(), isa, expr->get_node()); \
+ }, \
+ []([[maybe_unused]] const std::shared_ptr<ov::Node>& n) -> std::set<std::vector<element::Type>> { \
+ return e_type::get_supported_precisions(n); \
+ }}
+
+#define CREATE_UNDEFINED_EMITTER(supported_precisions) \
+ {[]([[maybe_unused]] const snippets::lowered::ExpressionPtr& expr) -> std::shared_ptr<snippets::Emitter> { \
+ return nullptr; \
+ }, \
+ []([[maybe_unused]] const std::shared_ptr<ov::Node>& n) -> std::set<std::vector<element::Type>> { \
+ return supported_precisions; \
+ }}
class jit_snippet : public dnnl::impl::cpu::x64::jit_generator {
public:
diff --git a/src/plugins/intel_cpu/src/nodes/kernels/kai/kleidi_kernel.hpp b/src/plugins/intel_cpu/src/nodes/kernels/kai/kleidi_kernel.hpp
index b1a82d5e3af..bbfe6043414 100644
--- a/src/plugins/intel_cpu/src/nodes/kernels/kai/kleidi_kernel.hpp
+++ b/src/plugins/intel_cpu/src/nodes/kernels/kai/kleidi_kernel.hpp
@@ -49,7 +49,7 @@ KleidiGemm::KleidiGemm(size_t _M, size_t _N, size_t _K, size_t _lda, size_t _ldb
nr(ukernel.get_nr()),
kr(ukernel.get_kr()),
sr(ukernel.get_sr()),
- packedRHSsize(kai_get_rhs_packed_size_rhs_pack_kxn_f16p16x1biasf16_f16_f16_neon(_N, _K)){};
+ packedRHSsize(kai_get_rhs_packed_size_rhs_pack_kxn_f16p16x1biasf16_f16_f16_neon(_N, _K)) {};
const size_t KleidiGemm::get_packed_rhs_size() const {
return packedRHSsize;
diff --git a/src/plugins/intel_cpu/src/shape_inference/shape_inference.cpp b/src/plugins/intel_cpu/src/shape_inference/shape_inference.cpp
index 2dbfa52213d..7dd9614bbbb 100644
--- a/src/plugins/intel_cpu/src/shape_inference/shape_inference.cpp
+++ b/src/plugins/intel_cpu/src/shape_inference/shape_inference.cpp
@@ -561,8 +561,7 @@ std::shared_ptr<typename TShapeInfer::iface_type> make_shape_infer(std::shared_p
using ShapeInferKey = ov::NodeTypeInfo;
// Helper macros to make map entries
-#define _OV_OP_SHAPE_INFER_VA_REG(OP, ...) \
- { OP::get_type_info_static(), make_shape_infer<__VA_ARGS__> }
+#define _OV_OP_SHAPE_INFER_VA_REG(OP, ...) {OP::get_type_info_static(), make_shape_infer<__VA_ARGS__>}
#define OV_OP_SHAPE_INFER_MASK_REG(OP, SHAPE_INFER, MASK) _OV_OP_SHAPE_INFER_VA_REG(OP, SHAPE_INFER, OP, MASK)
#define OV_OP_SHAPE_INFER_NON_TEMPLATE_REG(OP, SHAPE_INFER) _OV_OP_SHAPE_INFER_VA_REG(OP, SHAPE_INFER)
diff --git a/src/tests/test_utils/unit_test_utils/tests_data/istft_data.h b/src/tests/test_utils/unit_test_utils/tests_data/istft_data.h
index 6eca169c14a..90b9d5b9ccb 100644
--- a/src/tests/test_utils/unit_test_utils/tests_data/istft_data.h
+++ b/src/tests/test_utils/unit_test_utils/tests_data/istft_data.h
@@ -1,7 +1,6 @@
#pragma once
-#define LIST(...) \
- { __VA_ARGS__ }
+#define LIST(...) {__VA_ARGS__}
// TEST_DATA(signalShape,
// windowShape,
diff --git a/src/tests/test_utils/unit_test_utils/tests_data/roi_align_rotated_data.h b/src/tests/test_utils/unit_test_utils/tests_data/roi_align_rotated_data.h
index 49b253fdb96..cfbf8f4c4f6 100644
--- a/src/tests/test_utils/unit_test_utils/tests_data/roi_align_rotated_data.h
+++ b/src/tests/test_utils/unit_test_utils/tests_data/roi_align_rotated_data.h
@@ -1,8 +1,7 @@
#pragma once
-#define PI 3.14159265358979323846
-#define LIST(...) \
- { __VA_ARGS__ }
+#define PI 3.14159265358979323846
+#define LIST(...) {__VA_ARGS__}
// TEST_DATA(input_shape,
// pooled_height,
diff --git a/src/tests/test_utils/unit_test_utils/tests_data/scaled_dot_product_attention_data.h b/src/tests/test_utils/unit_test_utils/tests_data/scaled_dot_product_attention_data.h
index fbd58a1fb0a..aae863c9fb0 100644
--- a/src/tests/test_utils/unit_test_utils/tests_data/scaled_dot_product_attention_data.h
+++ b/src/tests/test_utils/unit_test_utils/tests_data/scaled_dot_product_attention_data.h
@@ -1,7 +1,6 @@
#pragma once
-#define LIST(...) \
- { __VA_ARGS__ }
+#define LIST(...) {__VA_ARGS__}
// TEST_DATA(q_shape,
// k_shape,
diff --git a/src/tests/test_utils/unit_test_utils/tests_data/search_sorted_data.h b/src/tests/test_utils/unit_test_utils/tests_data/search_sorted_data.h
index 43e680aa080..02f30d520da 100644
--- a/src/tests/test_utils/unit_test_utils/tests_data/search_sorted_data.h
+++ b/src/tests/test_utils/unit_test_utils/tests_data/search_sorted_data.h
@@ -1,7 +1,6 @@
#pragma once
-#define LIST(...) \
- { __VA_ARGS__ }
+#define LIST(...) {__VA_ARGS__}
// TEST_DATA(sorted_shape,
// values_shape,
diff --git a/src/tests/test_utils/unit_test_utils/tests_data/stft_data.h b/src/tests/test_utils/unit_test_utils/tests_data/stft_data.h
index 4a6257743f5..ab2971b8690 100644
--- a/src/tests/test_utils/unit_test_utils/tests_data/stft_data.h
+++ b/src/tests/test_utils/unit_test_utils/tests_data/stft_data.h
@@ -1,7 +1,6 @@
#pragma once
-#define LIST(...) \
- { __VA_ARGS__ }
+#define LIST(...) {__VA_ARGS__}
// TEST_DATA(signalShape,
// windowShape,