Skip to content

Commit

Permalink
x64: matmul: blocking: update for 4k LDA
Browse files Browse the repository at this point in the history
  • Loading branch information
ankalinin committed Jan 23, 2024
1 parent f240e12 commit d0c44c6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/cpu/x64/matmul/brgemm_matmul_utils.cpp
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit d0c44c6

Please sign in to comment.