Skip to content

Commit

Permalink
fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippvK committed Dec 16, 2023
1 parent 0db89a0 commit 02a1e7c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions tests/unit-tests/backends/tvm/test_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def test_wrapper_graph(model_info, workspace_size, debug_arena):
expected_lines.extend(
[
"void __attribute__((noreturn)) TVMPlatformAbort(tvm_crt_error_t code)",
"void TVMWrap_Init()",
"int TVMWrap_Init()",
]
)
expected_lines.extend(
Expand All @@ -131,7 +131,7 @@ def test_wrapper_graph(model_info, workspace_size, debug_arena):
)
expected_lines.extend(
[
"void TVMWrap_Run()",
"int TVMWrap_Run()",
]
)
expected_lines.extend(
Expand Down Expand Up @@ -225,7 +225,7 @@ def test_wrapper_aot(model_info, workspace_size, mod_name, api, debug_arena):
[
"void __attribute__((noreturn)) TVMPlatformAbort(tvm_crt_error_t code)",
"TVM_DLL int TVMFuncRegisterGlobal(const char* name, TVMFunctionHandle f, int override)",
"void TVMWrap_Init()",
"int TVMWrap_Init()",
]
)
expected_lines.extend(
Expand All @@ -246,7 +246,7 @@ def test_wrapper_aot(model_info, workspace_size, mod_name, api, debug_arena):
f"int32_t tvmgen_{mod_name}_run(void* args, void* type_code, int num_args, void* out_value, void*"
" out_type_code, void* resource_handle);"
),
"void TVMWrap_Run()",
"int TVMWrap_Run()",
" static DLDevice fake_device = {kDLCPU, 0};",
" static int64_t fake_dims = 0;",
" static int64_t fake_shape = {0};",
Expand All @@ -267,7 +267,7 @@ def test_wrapper_aot(model_info, workspace_size, mod_name, api, debug_arena):
elif api == "c":
expected_lines.extend(
[
"void TVMWrap_Run()",
"int TVMWrap_Run()",
f" int ret_val = tvmgen_{mod_name}_run(&tvmgen_{mod_name}_inputs, &tvmgen_{mod_name}_outputs);",
]
)
Expand Down
2 changes: 1 addition & 1 deletion tests/unit-tests/environment/test_environment_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def test_create_environment_dict():
os.path.join(os.getcwd(), "baz2"),
],
},
"repos": {"repo1": {"url": "repo1url", "ref": None}, "repo2": {"url": "repo2url", "ref": "repo2ref"}},
"repos": {"repo1": {"url": "repo1url", "ref": None, "options": {}}, "repo2": {"url": "repo2url", "ref": "repo2ref", "options": {}}},
"frameworks": {"default": None},
"frontends": {},
"toolchains": {},
Expand Down

0 comments on commit 02a1e7c

Please sign in to comment.