This is an automated email from the ASF dual-hosted git repository.
masahi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-tvm.git
The following commit(s) were added to refs/heads/master by this push:
new fcf8420 fix ROCm strategy for winograd conv selection (#5001)
fcf8420 is described below
commit fcf8420a2d42f8b87910622a7f7e53e058f0aaa7
Author: Thomas Viehmann <[email protected]>
AuthorDate: Sat Mar 7 01:44:24 2020 +0100
fix ROCm strategy for winograd conv selection (#5001)
---
python/tvm/relay/op/strategy/rocm.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/python/tvm/relay/op/strategy/rocm.py
b/python/tvm/relay/op/strategy/rocm.py
index e11a688..63bfe5e 100644
--- a/python/tvm/relay/op/strategy/rocm.py
+++ b/python/tvm/relay/op/strategy/rocm.py
@@ -48,12 +48,13 @@ def conv2d_strategy_rocm(attrs, inputs, out_type, target):
wrap_topi_schedule(topi.cuda.schedule_conv2d_nchw),
name="conv2d_nchw.cuda")
_, _, kh, kw = get_const_tuple(kernel.shape)
- if kh <= 7 and kw <= 7 and kh == kw and stride_h == 1 and stride_w
== 1:
+ if 2 < kh < 8 and 2 < kw < 8 and kh == kw and stride_h == 1 and
stride_w == 1 and \
+ dilation_h == 1 and dilation_w == 1:
strategy.add_implementation(
wrap_compute_conv2d(topi.cuda.conv2d_nchw_winograd),
wrap_topi_schedule(topi.cuda.schedule_conv2d_nchw_winograd),
name="conv2d_nchw_winograd.cuda",
- plevel=15)
+ plevel=5)
elif layout == "HWCN":
assert kernel_layout == "HWIO"
strategy.add_implementation(