Skip to content

Commit

Permalink
update multi_filter for adreno conv's
Browse files Browse the repository at this point in the history
  • Loading branch information
Icemist committed Sep 16, 2022
1 parent c2c4e37 commit bbbed0f
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 4 deletions.
6 changes: 5 additions & 1 deletion python/tvm/topi/adreno/conv2d_nchw.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,11 @@ def schedule_conv2d_NCHWc_KCRSk(cfg, s, output):
cfg.define_knob("auto_unroll_max_step", [0, 512, 1500])
cfg.define_knob("unroll_explicit", [0, 1])
cfg.multi_filter(
filter=lambda entity: 32
filter=lambda entity: ( # pylint: disable=chained-comparison
entity["tile_fc"].size[1] * entity["tile_y"].size[1] * entity["tile_x"].size[1]
)
<= 24
and 32
<= (entity["tile_fc"].size[2] * entity["tile_y"].size[2] * entity["tile_x"].size[2])
< 1024
)
Expand Down
6 changes: 5 additions & 1 deletion python/tvm/topi/adreno/conv2d_nhwc.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,11 @@ def schedule_conv2d_NHWC(cfg, s, output):
cfg.define_knob("auto_unroll_max_step", [0, 512, 1500])
cfg.define_knob("unroll_explicit", [0, 1])
cfg.multi_filter(
filter=lambda entity: 32
filter=lambda entity: ( # pylint: disable=chained-comparison
entity["tile_fc"].size[1] * entity["tile_y"].size[1] * entity["tile_x"].size[1]
)
<= 24
and 32
<= (entity["tile_fc"].size[2] * entity["tile_y"].size[2] * entity["tile_x"].size[2])
< 1024
)
Expand Down
6 changes: 5 additions & 1 deletion python/tvm/topi/adreno/depthwise_conv2d_nchw.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,11 @@ def schedule_depthwise_conv2d_NCHWc_KCRSk(cfg, s, output):
cfg.define_knob("auto_unroll_max_step", [0, 512, 1500])
cfg.define_knob("unroll_explicit", [0, 1])
cfg.multi_filter(
filter=lambda entity: 32
filter=lambda entity: ( # pylint: disable=chained-comparison
entity["tile_fc"].size[1] * entity["tile_y"].size[1] * entity["tile_x"].size[1]
)
<= 32
and 32
<= (entity["tile_fc"].size[2] * entity["tile_y"].size[2] * entity["tile_x"].size[2])
< 1024
)
Expand Down
6 changes: 5 additions & 1 deletion python/tvm/topi/adreno/depthwise_conv2d_nhwc.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,11 @@ def schedule_depthwise_conv2d_NHWC_HWOI(cfg, s, output):
cfg.define_knob("unroll_explicit", [0, 1])

cfg.multi_filter(
filter=lambda entity: 32
filter=lambda entity: ( # pylint: disable=chained-comparison
entity["tile_fc"].size[1] * entity["tile_y"].size[1] * entity["tile_x"].size[1]
)
<= 32
and 32
<= (entity["tile_fc"].size[2] * entity["tile_y"].size[2] * entity["tile_x"].size[2])
< 1024
)
Expand Down

0 comments on commit bbbed0f

Please sign in to comment.