diff --git a/src/cpu/x64/matmul/brgemm_matmul_utils.cpp b/src/cpu/x64/matmul/brgemm_matmul_utils.cpp index 46f6f4d6fd4..2eeede8f967 100644 --- a/src/cpu/x64/matmul/brgemm_matmul_utils.cpp +++ b/src/cpu/x64/matmul/brgemm_matmul_utils.cpp @@ -1,5 +1,5 @@ /******************************************************************************* -* Copyright 2021-2023 Intel Corporation +* Copyright 2021-2024 Intel Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -1477,7 +1477,9 @@ float matmul_amx_blocking_params_t::get_thread_balance_scores() { // returns score for current blocking parameters' values in range [0, 1] // for copied data reusage float matmul_amx_blocking_params_t::get_copied_data_reusage_scores() { - const dim_t effective_m_chunk_sz = 64 * 4; + // Values based on measured performance + const bool is_lda_4k = (current_lda_ * a_dt_sz) % 4096 == 0; + const dim_t effective_m_chunk_sz = 64 * (is_lda_4k ? 1 : 4); const dim_t desired_M_chunk_size = is_runtime_M ? effective_m_chunk_sz : nstl::min(M, effective_m_chunk_sz);