You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by ma...@apache.org on 2022/06/28 06:52:37 UTC
[tvm] branch main updated: [OpenCL] Change winograd priority and extend split (#11908)
This is an automated email from the ASF dual-hosted git repository.
masahi pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tvm.git
The following commit(s) were added to refs/heads/main by this push:
new 39ce4d985e [OpenCL] Change winograd priority and extend split (#11908)
39ce4d985e is described below
commit 39ce4d985e498bf869fc6062ca75fb4c1a5b562b
Author: Egor Churaev <eg...@gmail.com>
AuthorDate: Tue Jun 28 09:52:32 2022 +0300
[OpenCL] Change winograd priority and extend split (#11908)
---
python/tvm/relay/op/strategy/adreno.py | 16 ++++++++--------
python/tvm/topi/adreno/conv2d_winograd_common.py | 4 ++--
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/python/tvm/relay/op/strategy/adreno.py b/python/tvm/relay/op/strategy/adreno.py
index 01b3935a6f..cc082c9d61 100644
--- a/python/tvm/relay/op/strategy/adreno.py
+++ b/python/tvm/relay/op/strategy/adreno.py
@@ -53,13 +53,13 @@ def conv2d_strategy_adreno(attrs, inputs, out_type, target):
wrap_compute_conv2d(topi.adreno.conv2d_nchw_winograd),
wrap_topi_schedule(topi.adreno.schedule_conv2d_nchw_winograd),
name="conv2d_nchw_winograd.image2d",
- plevel=25,
+ plevel=5,
)
strategy.add_implementation(
wrap_compute_conv2d(topi.adreno.conv2d_nchw_winograd_acc32),
wrap_topi_schedule(topi.adreno.schedule_conv2d_nchw_winograd_acc32),
name="conv2d_nchw_winograd_acc32.image2d",
- plevel=30,
+ plevel=7,
)
if out_type.dtype == "float16":
strategy.add_implementation(
@@ -91,13 +91,13 @@ def conv2d_strategy_adreno(attrs, inputs, out_type, target):
wrap_compute_conv2d(topi.adreno.conv2d_nhwc_winograd),
wrap_topi_schedule(topi.adreno.schedule_conv2d_nhwc_winograd),
name="conv2d_nhwc_winograd.image2d",
- plevel=25,
+ plevel=5,
)
strategy.add_implementation(
wrap_compute_conv2d(topi.adreno.conv2d_nhwc_winograd_acc32),
wrap_topi_schedule(topi.adreno.schedule_conv2d_nhwc_winograd_acc32),
name="conv2d_nhwc_winograd_acc32.image2d",
- plevel=30,
+ plevel=7,
)
if out_type.dtype == "float16":
strategy.add_implementation(
@@ -215,7 +215,7 @@ def conv2d_winograd_without_weight_transfrom_strategy_adreno(attrs, inputs, out_
topi.adreno.schedule_conv2d_nchw_winograd_without_weight_transform
),
name="conv2d_nchw_winograd_without_weight_transform.image2d",
- plevel=35,
+ plevel=5,
)
strategy.add_implementation(
wrap_compute_conv2d(topi.adreno.conv2d_nchw_winograd_without_weight_transform_acc32),
@@ -223,7 +223,7 @@ def conv2d_winograd_without_weight_transfrom_strategy_adreno(attrs, inputs, out_
topi.adreno.schedule_conv2d_nchw_winograd_without_weight_transform_acc32
),
name="conv2d_nchw_winograd_without_weight_transform_acc32.image2d",
- plevel=40,
+ plevel=7,
)
elif layout in ("NHWC", "NHWC4c"):
if out_type.dtype == "float16":
@@ -233,7 +233,7 @@ def conv2d_winograd_without_weight_transfrom_strategy_adreno(attrs, inputs, out_
topi.adreno.schedule_conv2d_nhwc_winograd_without_weight_transform
),
name="conv2d_nhwc_winograd_without_weight_transform.image2d",
- plevel=35,
+ plevel=5,
)
strategy.add_implementation(
wrap_compute_conv2d(topi.adreno.conv2d_nhwc_winograd_without_weight_transform_acc32),
@@ -241,7 +241,7 @@ def conv2d_winograd_without_weight_transfrom_strategy_adreno(attrs, inputs, out_
topi.adreno.schedule_conv2d_nhwc_winograd_without_weight_transform_acc32
),
name="conv2d_nhwc_winograd_without_weight_transform_acc32.image2d",
- plevel=40,
+ plevel=7,
)
else:
raise RuntimeError(
diff --git a/python/tvm/topi/adreno/conv2d_winograd_common.py b/python/tvm/topi/adreno/conv2d_winograd_common.py
index 494b691a7f..be3c808eec 100644
--- a/python/tvm/topi/adreno/conv2d_winograd_common.py
+++ b/python/tvm/topi/adreno/conv2d_winograd_common.py
@@ -425,13 +425,13 @@ def schedule_conv2d_winograd(cfg, s, output, pre_computed):
alpha = get_const_int(b1.dom.extent)
cfg.define_split(
- "tile_y", y, num_outputs=3, filter=lambda entry: entry.size[2] <= 64 and entry.size[1] <= 8
+ "tile_y", y, num_outputs=3, filter=lambda entry: entry.size[2] <= 64 and entry.size[1] <= 16
)
cfg.define_split(
"tile_x",
x,
num_outputs=3,
- filter=lambda entry: entry.size[2] <= 64 and entry.size[1] >= 4 and entry.size[1] <= 8,
+ filter=lambda entry: entry.size[2] <= 64 and entry.size[1] >= 4 and entry.size[1] <= 16,
)
cfg.define_split("tile_rc", rcc, num_outputs=2)
# TODO: Uncomment the following lines when multi_filter will be introduced