Skip to content

Commit 2662020

Browse files
cpu: x64: brgemm: prefetchw removed from c buffer
1 parent 7b6d9cc commit 2662020

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/cpu/x64/brgemm/jit_brgemm_amx_uker.cpp

+8-3
Original file line numberDiff line numberDiff line change
@@ -1124,9 +1124,14 @@ void jit_brgemm_amx_uker_base_t::prefetch_CD_range(brgemm_iteration_t &bi,
11241124
auto ptr_D = EVEX_compress_addr(reg_D, d_offset);
11251125
uni_prefetch(ptr_D, pft, true);
11261126
} else if (are_post_ops_applicable_) {
1127-
const auto c_offset = C_offset(bi, bdb, bd, ldb_pos);
1128-
auto ptr_C = EVEX_compress_addr(reg_C, c_offset);
1129-
uni_prefetch(ptr_C, pft, true);
1127+
// TODO: split hints C and D hints
1128+
// Using prefetchw for the C matrix is generally harmful
1129+
// because the C matrix is frequently reused and remains in the cache.
1130+
// However, it is very necessary for the D matrix
1131+
1132+
// const auto c_offset = C_offset(bi, bdb, bd, ldb_pos);
1133+
// auto ptr_C = EVEX_compress_addr(reg_C, c_offset);
1134+
// uni_prefetch(ptr_C, pft, true);
11301135
} else {
11311136
const auto d_offset = D_offset(bi, bdb, bd, ldb_pos);
11321137
auto ptr_D = EVEX_compress_addr(reg_D, d_offset);

src/cpu/x64/matmul/brgemm_matmul_utils.cpp

-5
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,6 @@ struct matmul_avx512_blocking_params_t {
676676
}
677677
};
678678

679-
680679
float compute_blocking_heuristic_avx512(brgemm_matmul_conf_t &bgmmc,
681680
const brgemm_matmul_conf_utils_t &bm_conf_utils,
682681
const matmul_avx512_blocking_params_t::matmul_params_t &matmul,
@@ -1908,10 +1907,6 @@ void init_scratchpad(memory_tracking::registrar_t &scratchpad,
19081907
default_data_align);
19091908
}
19101909

1911-
1912-
1913-
1914-
19151910
} // namespace matmul
19161911
} // namespace x64
19171912
} // namespace cpu

0 commit comments

Comments
 (0)