Skip to content

Commit

Permalink
src: gpu: conv: tg tuning for oc, spatial dims
Browse files Browse the repository at this point in the history
  • Loading branch information
kealan-barbieri authored and echeresh committed May 3, 2022
1 parent c1fb8ac commit f8de0c9
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/gpu/jit/conv/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,13 +173,24 @@ status_t conv_config_t::init_fwd(convolution_pd_t *conv_pd) {
}

if (use_sp_blocking) {
if (is_dw) bh->set_pref_tg_block(osp_name);
bh->allow_split({osp_name, "mb"});
bh->reorder({osp_name, "mb"});
} else {
if (!is_dw && ow > 256)
bh->set_pref_tg_block("oc");
else if (is_dp_fma() && mb >= 16)
bh->set_pref_tg_block(osp_name);
bh->reorder({"mb", osp_name});
if (mb >= 128 && (fuse_spatial ? osp : ow) % 4 != 0)
bh->allow_split({"mb"});
}

if (is_dp_fma()) { bh->set_base_iter_block("oc", 32); }

if (mb < 8 && !bh->any_pref_tg_block())
bh->set_pref_tg_block(ow > oc ? osp_name : "oc");

bh->reorder({"ic", "kw"});

bh->compute();
Expand Down

0 comments on commit f8de0c9

Please sign in to comment.