From a5be8fd3d13223e12b856f237389823bf07b7d84 Mon Sep 17 00:00:00 2001 From: Zhi <5145158+zhiics@users.noreply.github.com> Date: Mon, 15 Oct 2018 16:17:46 -0700 Subject: [PATCH] [Relay] remove redundant test cases in test_op_level4.py (#1905) --- tests/python/relay/test_op_level4.py | 35 ++-------------------------- 1 file changed, 2 insertions(+), 33 deletions(-) diff --git a/tests/python/relay/test_op_level4.py b/tests/python/relay/test_op_level4.py index 0fe5a1150..11c0be67c 100644 --- a/tests/python/relay/test_op_level4.py +++ b/tests/python/relay/test_op_level4.py @@ -13,37 +13,6 @@ def assert_has_type(expr, typ, env=Environment({})): raise RuntimeError("Type mismatch %s vs %s" % ( checked_type, typ)) -def test_cmp_type(): - for op in (relay.greater, - relay.greater_equal, - relay.less, - relay.less_equal, - relay.equal, - relay.not_equal): - ib = relay.ir_builder.IRBuilder() - x = ib.param("x", relay.TensorType((10, 4), "float32")) - y = ib.param("y", relay.TensorType((5, 10, 1), "float32")) - with ib.function(x, y) as func: - ib.ret(op(x, y)) - ib.ret(func) - func = relay.ir_pass.infer_type(ib.env, func.to_func()) - ftype = func.checked_type - assert ftype.ret_type == relay.TensorType((5, 10, 4), "uint1") - - -def test_binary_broadcast(): - for op in [relay.right_shift, - relay.left_shift, - relay.maximum]: - ib = relay.ir_builder.IRBuilder() - x = ib.param("x", relay.TensorType((10, 4), "int32")) - y = ib.param("y", relay.TensorType((5, 10, 1), "int32")) - with ib.function(x, y) as func: - ib.ret(op(x, y)) - ib.ret(func) - func = relay.ir_pass.infer_type(ib.env, func.to_func()) - ftype = func.checked_type - assert ftype.ret_type == relay.TensorType((5, 10, 4), "int32") def test_binary_op(): def check_binary_op(opfunc): @@ -138,9 +107,9 @@ def test_where(): if __name__ == "__main__": - test_cmp_type() - test_binary_broadcast() test_binary_op() test_binary_broadcast_op() + test_cmp_type() + test_binary_broadcast() test_where() test_multibox_prior() -- GitLab