From 4f844f50369609129d0f8196ac23b743d8e142b1 Mon Sep 17 00:00:00 2001 From: Masahiro Masuda Date: Tue, 19 Jan 2021 07:59:28 +0900 Subject: [PATCH] make sure zero init arguments --- python/tvm/autotvm/measure/measure_methods.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/tvm/autotvm/measure/measure_methods.py b/python/tvm/autotvm/measure/measure_methods.py index 8e7fb3c6bed1..38c241a969d4 100644 --- a/python/tvm/autotvm/measure/measure_methods.py +++ b/python/tvm/autotvm/measure/measure_methods.py @@ -30,6 +30,7 @@ from random import getrandbits from collections import namedtuple import tempfile +import numpy as np import tvm._ffi import tvm.ir.transform @@ -560,7 +561,7 @@ def run_through_rpc( raise AttributeError( "Please make sure USE_RANDOM is ON in the config.cmake " "on the remote devices" ) - args = [nd.empty(x[0], dtype=x[1], ctx=ctx) for x in build_result.arg_info] + args = [nd.array(np.zeros(x[0], dtype=x[1]), ctx=ctx) for x in build_result.arg_info] if "scatter" not in measure_input.task.name: for arg in args: random_fill(arg)