zxybazh commented on code in PR #11298:
URL: https://github.com/apache/tvm/pull/11298#discussion_r874276217
##########
python/tvm/meta_schedule/testing/tune_relay_auto_scheduler.py:
##########
@@ -170,19 +173,21 @@ def main():
params=params,
)
graph, rt_mod, params = lib.graph_json, lib.lib, lib.params
- if input_dtype.startswith("float"):
- input_data = np.random.uniform(size=input_shape).astype(input_dtype)
- else:
- input_data = np.random.randint(low=0, high=10000, size=input_shape,
dtype=input_dtype)
+ for input_name, input_shape in input_info.items():
+ if input_dtype.startswith("float"):
+
inputs.append(np.random.uniform(size=input_shape).astype(input_dtype))
+ else:
+ inputs.append(np.random.randint(low=0, high=10000,
size=input_shape, dtype=input_dtype))
Review Comment:
Same here.
##########
python/tvm/meta_schedule/testing/tune_relay_auto_scheduler.py:
##########
@@ -196,17 +201,18 @@ def f_timer(rt_mod, dev, input_data):
rpc_config=ARGS.rpc_config,
lib=lib,
dev_type=ARGS.target.kind.name,
- args=[input_data],
+ args=inputs,
continuation=f_timer,
)
- def f_per_layer(rt_mod, dev, input_data):
+ def f_per_layer(rt_mod, dev, inputs):
Review Comment:
Ditto.
##########
python/tvm/meta_schedule/testing/tune_relay_auto_scheduler.py:
##########
@@ -170,19 +173,21 @@ def main():
params=params,
)
graph, rt_mod, params = lib.graph_json, lib.lib, lib.params
- if input_dtype.startswith("float"):
- input_data = np.random.uniform(size=input_shape).astype(input_dtype)
- else:
- input_data = np.random.randint(low=0, high=10000, size=input_shape,
dtype=input_dtype)
+ for input_name, input_shape in input_info.items():
+ if input_dtype.startswith("float"):
+
inputs.append(np.random.uniform(size=input_shape).astype(input_dtype))
+ else:
+ inputs.append(np.random.randint(low=0, high=10000,
size=input_shape, dtype=input_dtype))
Review Comment:
Ditto.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]