From 83c932aa0c836f32cfb40bc64d516db9073741c6 Mon Sep 17 00:00:00 2001 From: Zhi <5145158+zhiics@users.noreply.github.com> Date: Wed, 10 Jul 2019 13:24:49 -0700 Subject: [PATCH] [bugfix] fix the bug caused by test_any (#3528) --- tests/python/relay/test_any.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/tests/python/relay/test_any.py b/tests/python/relay/test_any.py index 8359fc5..f0a3fe7 100644 --- a/tests/python/relay/test_any.py +++ b/tests/python/relay/test_any.py @@ -14,18 +14,13 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. +import numpy as np import tvm from tvm import relay from tvm.relay import Kind, transform from tvm.relay.loops import while_loop -import numpy as np - -def infer_type(expr): - mod = relay.Module.from_expr(expr) - mod = transform.InferType()(mod) - entry = mod[mod.entry_func] - return entry if isinstance(expr, relay.Function) else entry.body +from tvm.relay.testing import run_infer_type as infer_type def int32(val): return relay.const(val, 'int32') -- 2.7.4