From 84479c97cd4645c752146b5d26bf507e58d6ff86 Mon Sep 17 00:00:00 2001 From: Johnson Zhang Date: Sat, 31 Jul 2021 14:51:01 +0800 Subject: [PATCH 1/2] [Refactor] Avoid Override Generic Op Strategy in "hls.py" --- python/tvm/relay/op/strategy/hls.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/tvm/relay/op/strategy/hls.py b/python/tvm/relay/op/strategy/hls.py index b147af06cfc3..1eebbd36b847 100644 --- a/python/tvm/relay/op/strategy/hls.py +++ b/python/tvm/relay/op/strategy/hls.py @@ -80,7 +80,7 @@ def log_softmax_strategy_hls(attrs, inputs, out_type, target): return strategy -@override_native_generic_func("conv2d_strategy") +@conv2d_strategy.register("hls") def conv2d_strategy_hls(attrs, inputs, out_type, target): """conv2d hls strategy""" strategy = _op.OpStrategy() @@ -132,7 +132,7 @@ def conv2d_strategy_hls(attrs, inputs, out_type, target): return strategy -@override_native_generic_func("conv2d_NCHWc_strategy") +@conv2d_NCHWc_strategy.register("hls") def conv2d_NCHWc_strategy_hls(attrs, inputs, out_type, target): """conv2d_NCHWc hls strategy""" strategy = _op.OpStrategy() From 892a4c938c8c18dd31cc5b17558010953e35e1ae Mon Sep 17 00:00:00 2001 From: Johnson Zhang Date: Tue, 3 Aug 2021 15:43:32 +0800 Subject: [PATCH 2/2] Fix The Broken CI Test Cases --- tests/python/relay/test_any.py | 1 - tests/python/relay/test_pass_alter_op_layout.py | 1 - 2 files changed, 2 deletions(-) diff --git a/tests/python/relay/test_any.py b/tests/python/relay/test_any.py index 3f53c11fa36a..b2b251862a21 100644 --- a/tests/python/relay/test_any.py +++ b/tests/python/relay/test_any.py @@ -615,7 +615,6 @@ def verify_any_conv2d_NCHWc( # TODO(@kevinthesun): Support dynamic input height and width. -@tvm.testing.uses_gpu def test_any_conv2d_NCHWc(): verify_any_conv2d_NCHWc( (relay.Any(), 8, 224, 224, 8), diff --git a/tests/python/relay/test_pass_alter_op_layout.py b/tests/python/relay/test_pass_alter_op_layout.py index 3917d81fc2c3..3cee84f6a4dd 100644 --- a/tests/python/relay/test_pass_alter_op_layout.py +++ b/tests/python/relay/test_pass_alter_op_layout.py @@ -712,7 +712,6 @@ def expected(): assert tvm.ir.structural_equal(a, b), "Actual = \n" + str(a) -@tvm.testing.uses_gpu def test_alter_layout_strided_slice(): """Test rewriting strided_slice during alter_iop_layout"""