From 9defd95a5704008e95b2c4862f367c01133cee4a Mon Sep 17 00:00:00 2001 From: Vladislav Golubev Date: Tue, 12 Sep 2023 15:50:05 +0200 Subject: [PATCH] Fix compilation error --- .../snippets/x64/pass/lowered/brgemm_blocking.cpp | 2 +- .../x64/pass/set_brgemm_cpu_blocking_params.cpp | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/plugins/intel_cpu/src/transformations/snippets/x64/pass/lowered/brgemm_blocking.cpp b/src/plugins/intel_cpu/src/transformations/snippets/x64/pass/lowered/brgemm_blocking.cpp index 701e37ad4961c3..4df344aac3da9f 100644 --- a/src/plugins/intel_cpu/src/transformations/snippets/x64/pass/lowered/brgemm_blocking.cpp +++ b/src/plugins/intel_cpu/src/transformations/snippets/x64/pass/lowered/brgemm_blocking.cpp @@ -143,7 +143,7 @@ bool BrgemmBlocking::run(LinearIR& linear_ir) { new_loop_end->set_work_amount(work_amount - increment); auto new_loop_info = loop_manager->get_loop_info(new_loop_end->get_id()); new_loop_info->work_amount = work_amount - increment; - for (const auto expr : new_loop_range) { + for (const auto& expr : new_loop_range) { if (const auto brgemm = ov::as_type_ptr(expr->get_node())) { brgemm->set_beta(1.f); } diff --git a/src/plugins/intel_cpu/src/transformations/snippets/x64/pass/set_brgemm_cpu_blocking_params.cpp b/src/plugins/intel_cpu/src/transformations/snippets/x64/pass/set_brgemm_cpu_blocking_params.cpp index 6cc96e3f0f0b8d..9e1b8c06ae9c5d 100644 --- a/src/plugins/intel_cpu/src/transformations/snippets/x64/pass/set_brgemm_cpu_blocking_params.cpp +++ b/src/plugins/intel_cpu/src/transformations/snippets/x64/pass/set_brgemm_cpu_blocking_params.cpp @@ -47,9 +47,6 @@ pass::SetBrgemmCPUBlockingParams::SetBrgemmCPUBlockingParams() { return false; } - const auto dimsMatMulIn0 = snippets::utils::get_port_planar_shape(brgemm->input_value(0)).get_shape(); - const auto K = *dimsMatMulIn0.rbegin(); - const auto& input_1_precision = brgemm->get_input_element_type(1); // Ticket: 113745 // TODO: extend block size selection heuristics @@ -65,9 +62,11 @@ pass::SetBrgemmCPUBlockingParams::SetBrgemmCPUBlockingParams() { return input_1_precision != ov::element::f32 ? N : 64; }; + const auto brgemm_in0_dims = snippets::utils::get_planar_pshape(brgemm->input_value(0)).get_shape(); + const auto K = *brgemm_in0_dims.rbegin(); if (brgemm->is_with_data_repacking()) { const auto brgemm_copy_b = brgemm->get_brgemm_copy(); - const auto out_dims = snippets::utils::get_port_planar_shape(brgemm_copy_b->output(0)).get_shape(); + const auto out_dims = snippets::utils::get_planar_pshape(brgemm_copy_b->output(0)).get_shape(); const auto N = *out_dims.rbegin(); const bool isAMXSupported = dnnl::impl::cpu::x64::mayiuse(dnnl::impl::cpu::x64::avx512_core_amx); @@ -92,9 +91,8 @@ pass::SetBrgemmCPUBlockingParams::SetBrgemmCPUBlockingParams() { if (brgemm->is_with_scratchpad()) change_desc_shape(brgemm->input(2)); - const auto brgemm_in1_dims = snippets::utils::get_port_planar_shape(brgemm->input_value(1)).get_shape(); + const auto brgemm_in1_dims = snippets::utils::get_planar_pshape(brgemm->input_value(1)).get_shape(); const auto N = *brgemm_in1_dims.rbegin(); - const auto brgemm_in0_dims = snippets::utils::get_port_planar_shape(brgemm->input_value(0)).get_shape(); const auto M = *(brgemm_in0_dims.rbegin() + 1); brgemm->set_m_block_size(get_block_size_m(M));