File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -98,7 +98,8 @@ status_t brgemm_convolution_bwd_weights_t::pd_t::init(engine_t *engine) {
9898 auto M = (i) ? jcp_.M_tail : jcp_.M ;
9999 if (M <= 0 ) continue ;
100100 // init only needed brgemm descriptors
101- for (int bs = 0 ; bs <= jcp_.max_batch ; bs++) {
101+ const auto bs_end = jcp_.var_bs ? 1 : jcp_.max_batch ;
102+ for (int bs = 0 ; bs <= bs_end; bs++) {
102103 if (batchsizes[bs] == -1 ) continue ;
103104 for_ (int i_init = init_begin; i_init < init_end; i_init++)
104105 for_ (int i_N = N_begin; i_N < N_end; i_N++)
@@ -274,7 +275,8 @@ status_t brgemm_convolution_bwd_weights_t::init(engine_t *engine) {
274275 int init_begin = 0 ;
275276 int init_end = 2 ;
276277
277- for (int bs = 0 ; bs <= jcp.max_batch ; bs++) {
278+ const auto bs_end = jcp.var_bs ? 1 : jcp.max_batch ;
279+ for (int bs = 0 ; bs <= bs_end; bs++) {
278280 if (_pd->batchsizes [bs] == -1 ) continue ;
279281
280282 for_ (int i_N = N_begin; i_N < N_end; i_N++)
You can’t perform that action at this time.
0 commit comments