@@ -94,7 +94,7 @@ struct brgemm_matmul_conf_t {
9494 dim_t LDA, LDB, LDC, LDD;
9595 dim_t LDB2;
9696 int brgemm_batch_size, brgemm_batch_tail_size;
97- int wei_n_blk, wei_k_blk, orig_wei_k_blk ;
97+ int wei_n_blk, wei_k_blk;
9898 brgemm_batch_kind_t brg_type;
9999 bool is_macro_heuristics;
100100
@@ -282,32 +282,6 @@ struct brgemm_matmul_conf_utils_t {
282282 && check_b_layout_blocked_by_n (bgmmc.wei_tag );
283283 }
284284
285- /* *
286- * Returns the total block size along the K dimension, as the product of
287- * the fixed outer block size and the VNNI granularity.
288- *
289- * Example: For format tag BA16a16b4a, the block size is
290- * 16 (outer) * 4 (VNNI granularity) = 64.
291- *
292- * @param use_orig_wei_dt If true, use the original weight data type to
293- * determine block size. If false, use the compute data type type.
294- * @return The total K dimension block size.
295- */
296- int get_wei_k_blk (bool use_orig_wei_dt = false ) const {
297- // No blocking is used in GEMV mode.
298- if (bgmmc.is_gemv ) return 1 ;
299-
300- // Fixed outer block size.
301- const int k_outer_block = 16 ;
302-
303- // VNNI granularity determines the inner block size along K.
304- const data_type_t wei_dt
305- = use_orig_wei_dt ? bgmmc.orig_wei_dt : bgmmc.wei_dt ;
306- const int k_inner_block = data_type_vnni_granularity (wei_dt);
307-
308- return k_outer_block * k_inner_block;
309- }
310-
311285 inline bool use_buffer_b (bool use_heuristic = true ) const {
312286 if (bgmmc.is_runtime_N ) return true ;
313287 if (bgmmc.is_bf16_with_int_wei ) return true ;
@@ -483,6 +457,19 @@ void mem_advice_init(brgemm_matmul_conf_t &bgmmc);
483457
484458bool is_batch_layout_trivial (const memory_desc_wrapper &mdw, const dim_t batch);
485459
460+ /* *
461+ * Returns the total block size along the K dimension, as the product of
462+ * the fixed outer block size and the VNNI granularity.
463+ *
464+ * Example: For format tag BA16a16b4a, the block size is
465+ * 16 (outer) * 4 (VNNI granularity) = 64.
466+ *
467+ * @param wei_dt Weights data type.
468+ *
469+ * @return The total K dimension block size.
470+ */
471+ int get_wei_k_blk (data_type_t wei_dt);
472+
486473} // namespace matmul
487474} // namespace x64
488475} // namespace cpu
0 commit comments