How to generate a libmodel.a?

Is it possible to build a model with microTVM into a “libxxx.a” library? So that we can put the lib into any other RTOS or IDE instead of Zephyr.

Thanks

@baibeta thanks for your question! The microTVM runtime is provided in source form in the tvm tree, and a Makefile is included to build libraries. Right now it builds more than 1 library, so you would need to combine it.

The compiled kernels output by TVM also come in either source or LLVM binary format (.o), and can be compiled into a library. The process for integrating these outputs into Zephyr is documented in the microtvm_api_server.py included in the tvm source tree. There is also one for Arduino. Hopefully you can reference those to get an idea of what’s needed.

In general we don’t intend to require any specific RTOS from microTVM–please file bugs (if you encounter an actionable problem) or post up on the forum (if you find a problem but aren’t sure how to solve it) if you run into trouble integrating with microTVM!

Thanks, Andrew

1 Like