From 20da590faff19eab01a6fb623d83956340a43388 Mon Sep 17 00:00:00 2001 From: Gavin Uberti Date: Thu, 21 Apr 2022 20:52:42 -0400 Subject: [PATCH] Fix Arduino RPC server test --- tests/micro/arduino/test_arduino_rpc_server.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tests/micro/arduino/test_arduino_rpc_server.py b/tests/micro/arduino/test_arduino_rpc_server.py index 662b825672af..1dd20597ac4e 100644 --- a/tests/micro/arduino/test_arduino_rpc_server.py +++ b/tests/micro/arduino/test_arduino_rpc_server.py @@ -63,8 +63,9 @@ def _make_sess_from_op( model, arduino_board, arduino_cli_cmd, workspace_dir, op_name, sched, arg_bufs, build_config ): target = tvm.target.target.micro(model) + runtime = Runtime("crt", {"system-lib": True}) with tvm.transform.PassContext(opt_level=3, config={"tir.disable_vectorize": True}): - mod = tvm.build(sched, arg_bufs, target=target, name=op_name) + mod = tvm.build(sched, arg_bufs, target=target, runtime=runtime, name=op_name) return _make_session(model, arduino_board, arduino_cli_cmd, workspace_dir, mod, build_config) @@ -152,8 +153,9 @@ def test_relay(board, arduino_cli_cmd, tvm_debug, workspace_dir): func = relay.Function([x], z) target = tvm.target.target.micro(model) + runtime = Runtime("crt", {"system-lib": True}) with tvm.transform.PassContext(opt_level=3, config={"tir.disable_vectorize": True}): - mod = tvm.relay.build(func, target=target) + mod = tvm.relay.build(func, target=target, runtime=runtime) with _make_session(model, board, arduino_cli_cmd, workspace_dir, mod, build_config) as session: graph_mod = tvm.micro.create_local_graph_executor( @@ -192,9 +194,9 @@ def test_onnx(board, arduino_cli_cmd, tvm_debug, workspace_dir): relay_mod = relay.transform.DynamicToStatic()(relay_mod) target = tvm.target.target.micro(model) + runtime = Runtime("crt", {"system-lib": True}) with tvm.transform.PassContext(opt_level=3, config={"tir.disable_vectorize": True}): executor = Executor("graph", {"link-params": True}) - runtime = Runtime("crt", {"system-lib": True}) lowered = relay.build(relay_mod, target, params=params, executor=executor, runtime=runtime) graph = lowered.get_graph_json() @@ -233,8 +235,9 @@ def check_result( """Helper function to verify results""" TOL = 1e-5 target = tvm.target.target.micro(model) + runtime = Runtime("crt", {"system-lib": True}) with tvm.transform.PassContext(opt_level=3, config={"tir.disable_vectorize": True}): - mod = tvm.relay.build(relay_mod, target=target) + mod = tvm.relay.build(relay_mod, target=target, runtime=runtime) with _make_session( model, arduino_board, arduino_cli_cmd, workspace_dir, mod, build_config