Skip to content

Commit c67f46b

Browse files
committed
cpu: x64: brgemm convolution blocking: update start_ocb_selection
1 parent c9cb51d commit c67f46b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/cpu/x64/jit_brgemm_conv_utils.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1897,7 +1897,12 @@ status_t init_conf(jit_brgemm_conv_conf_t &jcp, cpu_isa_t isa,
18971897
best_brgb.oc_block = min_oc_block;
18981898
brg_blocking_t cur_brgb = zero<decltype(best_brgb)>();
18991899
cur_brgb.get_from_jcp(jcp);
1900-
auto start_ocb = (is_amx(isa) && jcp.is_os_blocking) ? 2 : 4;
1900+
const int est_amx_job = div_up(jcp.mb * div_up(jcp.os, 4 * 16)
1901+
* jcp.ngroups * div_up(jcp.oc, 4 * 16),
1902+
nthreads);
1903+
const bool small_amx_job = est_amx_job < 64 || jcp.oc < 256;
1904+
auto start_ocb
1905+
= (is_amx(isa) && jcp.is_os_blocking && small_amx_job) ? 2 : 4;
19011906
if (jcp.wei_plain)
19021907
start_ocb = nstl::min(jcp.ic > 128 ? (jcp.ic > 256 ? 8 : 16) : 32,
19031908
div_up(jcp.oc, 16));

0 commit comments

Comments
 (0)