Skip to content

Commit ec3d689

Browse files
committed
Revert "x64: brgemm convolution: update req_cal_comp_pad condition"
This reverts commit 05d68df.
1 parent 557d2df commit ec3d689

File tree

2 files changed

+3
-13
lines changed

2 files changed

+3
-13
lines changed

src/cpu/x64/jit_brgemm_conv.cpp

-4
Original file line numberDiff line numberDiff line change
@@ -1526,10 +1526,6 @@ status_t brgemm_convolution_fwd_t<isa>::cal_compensation(
15261526

15271527
const int max_ker_sz = adjusted_k.size();
15281528
const auto comp_buffer_ow = jcp.exec_type != exec_vpad ? jcp.ow : 1;
1529-
// TODO: revise the thread distribution here because the work_amount may be
1530-
// insufficient
1531-
// TODO: revise comp_vpad_pbuffer_ generator to avoid huge code for cases
1532-
// with big ow
15331529
const auto work_amount
15341530
= static_cast<dim_t>(jcp.ngroups) * jcp.nb_oc * max_ker_sz;
15351531
const auto is_small_shape = work_amount <= jcp.nthr

src/cpu/x64/jit_brgemm_conv_utils.cpp

+3-9
Original file line numberDiff line numberDiff line change
@@ -2301,18 +2301,12 @@ status_t init_conf(jit_brgemm_conv_conf_t &jcp, cpu_isa_t isa,
23012301

23022302
// For padding shapes, we calculate the comp along with the computation
23032303
// inside brgemm kernel when output size is small to get optimal perf
2304-
// For shapes with large ow we calculate the comp inside brgemm kernel too
2305-
// because current implementation of brgemm_comp_pad kernel unrolled by ow
2306-
// so not optimal for large ow.
2307-
// Otherwise we calculate the comp using brgemm_comp_pad kernel
2304+
// Or we calculate the comp using brgemm_coomp_pad kernel
23082305
const auto output_sz = static_cast<dim_t>(jcp.mb) * jcp.ngroups * jcp.oc
23092306
* jcp.od * jcp.oh * jcp.ow;
2310-
// TODO: revise below condition to avoid limitation for big ow
2311-
const auto shape_for_brgemm_kernel
2312-
= (output_sz <= 8192 && jcp.oc < 512) || jcp.ow > 128;
2313-
const auto is_relo = jcp.is_relo() && jcp.relo_conv_weights;
23142307
jcp.req_brg_comp_pad = compensation_w_padding && jcp.exec_type != exec_trans
2315-
&& IMPLICATION(!is_relo, shape_for_brgemm_kernel);
2308+
&& IMPLICATION(!(jcp.is_relo() && jcp.relo_conv_weights),
2309+
output_sz <= 8192 && jcp.oc < 512);
23162310
jcp.req_cal_comp_pad = compensation_w_padding && !jcp.req_brg_comp_pad
23172311
&& IMPLICATION(jcp.exec_type == exec_vpad,
23182312
jcp.t_pad > 0 || jcp.b_pad > 0 || jcp.f_pad > 0

0 commit comments

Comments
 (0)