Skip to content

Commit

Permalink
make sure zero init arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
masahi committed Jan 18, 2021
1 parent 528f755 commit 4f844f5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion python/tvm/autotvm/measure/measure_methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 4f844f5

Please sign in to comment.