Skip to content

Commit

Permalink
[BugFix][CPP] Fix cpp deploy bug (#15773)
Browse files Browse the repository at this point in the history
## Motivation

Fix bug when using `apps/howto_deploy/run_example.sh`, it will cause `core dumped`

![image](https://github.com/apache/tvm/assets/25873202/a55b40ba-0f28-4c75-b216-591c6008734f)

After fixed, all test pass.

![image](https://github.com/apache/tvm/assets/25873202/61db50eb-77a2-43b4-9cf4-1f24aba49b67)


## Modification

Add runtime for `tvm.build`
  • Loading branch information
PeterH0323 authored Sep 28, 2023
1 parent 73e7909 commit cf081d9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion apps/howto_deploy/prepare_test_libs.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,13 @@ def prepare_test_libs(base_path):
fadd_dylib.export_library(dylib_path)

# Compile library in system library mode
fadd_syslib = tvm.build(s, [A, B], "llvm", name="addonesys")
fadd_syslib = tvm.build(
s,
[A, B],
"llvm",
name="addonesys",
runtime=relay.backend.Runtime("cpp", {"system-lib": True}),
)
syslib_path = os.path.join(base_path, "test_addone_sys.o")
fadd_syslib.save(syslib_path)

Expand Down

0 comments on commit cf081d9

Please sign in to comment.