// create empty arrays on the remote device and copy them once.
// This can avoid some memory issues that make the measurement results unreliable.
args = [nd.empty(x[0], dtype=x[1], ctx=ctx) for x in build_result.arg_info]
args = [nd.array(x, ctx=ctx) for x in args]
ctx.sync()
costs = time_f(*args).results
After Change
args = [nd.array(x, ctx=ctx) for x in ref_input]
else:
try:
random_fill = remote.get_function("tvm.contrib.random.random_fill")
except AttributeError:
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]