Skip to content

Commit

Permalink
[Snippets][CPU] Remove redundant deprecation warnings ignore
Browse files Browse the repository at this point in the history
  • Loading branch information
aobolensk committed Feb 5, 2025
1 parent c27f796 commit e06f34f
Show file tree
Hide file tree
Showing 12 changed files with 11 additions and 20 deletions.
4 changes: 0 additions & 4 deletions src/common/snippets/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ source_group("src" FILES ${LIBRARY_SRC})
source_group("include" FILES ${PUBLIC_HEADERS})

# Create static library
if((CMAKE_COMPILER_IS_GNUCXX OR OV_COMPILER_IS_CLANG) AND CMAKE_CXX_STANDARD GREATER_EQUAL 20)
set(CMAKE_CXX_FLAGS "-Wno-error=deprecated ${CMAKE_CXX_FLAGS}")
endif()

add_library(${TARGET_NAME} STATIC
${LIBRARY_SRC}
${PUBLIC_HEADERS})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,7 @@ class KernelExecutorTable {

/*** Returns lambda function that contains current state of the table, and restores this state when called */
std::function<void()> get_state_reset() {
auto current_state = get_state();
return [=]() { reset_state(current_state); };
return [this]() { reset_state(get_state()); };
}

virtual ~KernelExecutorTable() = default;
Expand Down
4 changes: 0 additions & 4 deletions src/plugins/intel_cpu/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ endif()

set(TARGET_NAME "openvino_intel_cpu_plugin")

if((CMAKE_COMPILER_IS_GNUCXX OR OV_COMPILER_IS_CLANG) AND CMAKE_CXX_STANDARD GREATER_EQUAL 20)
set(CMAKE_CXX_FLAGS "-Wno-error=deprecated ${CMAKE_CXX_FLAGS}")
endif()

if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
# C4267, 4244 issues from oneDNN headers conversion from 'XXX' to 'YYY', possible loss of data
ov_add_compiler_flags(/wd4018)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ ov::intel_cpu::FullyConnectedBiasFusion::FullyConnectedBiasFusion() {
auto m_bias = ov::pass::pattern::wrap_type<ov::op::v0::Constant>();
auto m_add = ov::pass::pattern::wrap_type<ov::op::v1::Add>({m_fc, m_bias});

ov::matcher_pass_callback callback = [=](ov::pass::pattern::Matcher& m) {
ov::matcher_pass_callback callback = [OV_CAPTURE_CPY_AND_THIS](ov::pass::pattern::Matcher& m) {
auto& pattern_to_output = m.get_pattern_value_map();

auto add = pattern_to_output[m_add].get_node_shared_ptr();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ ov::intel_cpu::MLPFusion::MLPFusion() {

auto result = down_proj;

matcher_pass_callback callback = [=](ov::pass::pattern::Matcher& m) {
matcher_pass_callback callback = [OV_CAPTURE_CPY_AND_THIS](ov::pass::pattern::Matcher& m) {
PatternValidator validator(m);
if (!validator) {
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ ov::intel_cpu::QKVProjFusion::QKVProjFusion() {
{{"transpose_a", false}, {"transpose_b", true}}); // [?,?,4096]
auto result = q_proj;

matcher_pass_callback callback = [=](ov::pass::pattern::Matcher& m) {
matcher_pass_callback callback = [OV_CAPTURE_CPY_AND_THIS](ov::pass::pattern::Matcher& m) {
PatternValidator validator(m);
if (!validator) {
return false;
Expand Down Expand Up @@ -205,7 +205,7 @@ ov::intel_cpu::QKVProjFusion2::QKVProjFusion2() {

auto result = qkv_split->output(0);

matcher_pass_callback callback = [=](ov::pass::pattern::Matcher& m) {
matcher_pass_callback callback = [OV_CAPTURE_CPY_AND_THIS](ov::pass::pattern::Matcher& m) {
PatternValidator validator(m);
if (!validator) {
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ pass::BrgemmToBrgemmCPU::BrgemmToBrgemmCPU() {
};
auto m_brgemm = ov::pass::pattern::wrap_type<snippets::op::Brgemm>(is_not_tpp);

auto callback = [=](ov::pass::pattern::Matcher& m) {
auto callback = [OV_CAPTURE_CPY_AND_THIS](ov::pass::pattern::Matcher& m) {
OV_ITT_SCOPED_TASK(ov::pass::itt::domains::SnippetsTransform, "ov::intel_cpu::pass::BrgemmToBrgemmCPU")
const auto node = m.get_match_root();
const auto brgemm = ov::as_type_ptr<snippets::op::Brgemm>(node);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pass::EliminateBrgemmCopyB::EliminateBrgemmCopyB() {
auto m_rank_norm = ov::pass::pattern::optional<ov::snippets::op::RankNormalization>(m_param);
auto m_copy_b = ov::pass::pattern::wrap_type<BrgemmCopyB>({m_param});

auto callback = [=](ov::pass::pattern::Matcher& m) {
auto callback = [OV_CAPTURE_CPY_AND_THIS](ov::pass::pattern::Matcher& m) {
OV_ITT_SCOPED_TASK(ov::pass::itt::domains::SnippetsTransform, "ov::intel_cpu::pass::EliminateBrgemmCopyB")
const auto& pattern_map = m.get_pattern_value_map();
const auto& copy_b_out = pattern_map.at(m_copy_b);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ ov::intel_cpu::pass::RemoveConverts::RemoveConverts() {
auto child_convert_wrap =
wrap_type<snippets::op::ConvertSaturation>({parent_convert_m}, type_matches(ov::element::f32));

auto callback = [=](ov::pass::pattern::Matcher& m) {
auto callback = [OV_CAPTURE_CPY_AND_THIS](ov::pass::pattern::Matcher& m) {
OV_ITT_SCOPED_TASK(ov::pass::itt::domains::SnippetsTransform, "ov::intel_cpu::pass::RemoveConverts")
const auto& pm = m.get_pattern_value_map();
const auto parent_convert = pm.at(parent_convert_m).get_node_shared_ptr();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ BrgemmToBrgemmTPP::BrgemmToBrgemmTPP() {

auto m_brgemm = ov::pass::pattern::wrap_type<snippets::op::Brgemm>();

auto callback = [=](ov::pass::pattern::Matcher& m) {
auto callback = [OV_CAPTURE_CPY_AND_THIS](ov::pass::pattern::Matcher& m) {
OV_ITT_SCOPED_TASK(ov::pass::itt::domains::SnippetsTransform, "ov::intel_cpu::pass::BrgemmToBrgemmTPP")
const auto node = m.get_match_root();
const auto brgemm = ov::as_type_ptr<snippets::op::Brgemm>(node);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ EltwiseToEltwiseTPP::EltwiseToEltwiseTPP() {
ov::op::util::BinaryElementwiseArithmetic,
ov::snippets::op::ReduceBase>(is_supported_by_tpp);

auto callback = [=](ov::pass::pattern::Matcher& m) {
auto callback = [OV_CAPTURE_CPY_AND_THIS](ov::pass::pattern::Matcher& m) {
OV_ITT_SCOPED_TASK(ov::pass::itt::domains::SnippetsTransform, "ov::intel_cpu::pass::EltwiseToEltwiseTPP")
const auto node = m.get_match_root();
if (node->is_dynamic()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ ScalarToScalarTPP::ScalarToScalarTPP() {

auto snippets_scalar = ov::pass::pattern::wrap_type<ov::snippets::op::Scalar>();

auto callback = [=](ov::pass::pattern::Matcher& m) {
auto callback = [OV_CAPTURE_CPY_AND_THIS](ov::pass::pattern::Matcher& m) {
OV_ITT_SCOPED_TASK(ov::pass::itt::domains::SnippetsTransform, "ov::intel_cpu::pass::ScalarToScalarTPP")
const auto node = ov::as_type_ptr<ov::snippets::op::Scalar>(m.get_match_root());
OPENVINO_ASSERT(node, "Failed to obtain a valid Scalar Op in ScalarToScalarTPP");
Expand Down

0 comments on commit e06f34f

Please sign in to comment.