Building TVM with 'c' runtime support

Hi all,

I see that TVM can lower a tensor computation c code. However when I try to execute this lowered c code, TVM throws an error saying “C Source module cannot execute, to get executable module build TVM with ‘c’ runtime support”. How do I go about building TVM with the said ‘c’ runtime support?

Thanks!

We will need to export the library as a shared library before executing it. You can do lib.export_library("xyz.so") then load it back

I could export and import the shared object, but I’m unsure about how to invoke the function in the library. I’m getting an error now which says “Check failed: entry_name!= nullptr: Symbol tvm_main is not presented”. Is there a shim or something what I’m supposed to call?

you can call into the specific name you pass to the build function tvm.build(..., name="myfunc").

mod["myfunc"](args)

Okay thanks! That worked.

if we deploy the so remotely to a board, how to package the header file?