From d478d7daef2825efbc56afc60b1fbbfcafc984b0 Mon Sep 17 00:00:00 2001 From: Trevor Morris Date: Wed, 5 May 2021 00:10:44 +0000 Subject: [PATCH] Add test for duplicate params --- tests/python/relay/test_external_codegen.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/python/relay/test_external_codegen.py b/tests/python/relay/test_external_codegen.py index 9f6d88e47f0b5..95fd129f232d4 100644 --- a/tests/python/relay/test_external_codegen.py +++ b/tests/python/relay/test_external_codegen.py @@ -352,6 +352,8 @@ def test_load_params_with_constants_in_ext_codegen(): mod = transform.PartitionGraph()(mod) graph_module = relay.build(mod, target="llvm", params=params) + # Params will be stored in metadata module. + assert len(graph_module.get_params()) == 0 lib = update_lib(graph_module.get_lib()) rt_mod = tvm.contrib.graph_executor.create(graph_module.get_json(), lib, tvm.cpu(0)) rt_mod.load_params(runtime.save_param_dict(graph_module.get_params()))