Hi, as a newbie to tvm, after having tried some demos, I have some basic questions:
- I have compile the model and export to .so/.o(relay.build and export_library), is that possible to load this library or link .o with a basic main without any tvm runtime dependencies ? Since the generated library itself does not rely on any tvm shared libraries and I don’t have tunning need. I don’t understand why tvm runtime is needed to be deployed on target devices(ie arm).
- If tvm runtime is not needed, how could I know the entry API or export the header files for this generated lib ? Without that, I could not know how to use the lib to fetch the input and run inference .
The reason I think it should be possible is that since TVM supports codegen for cuda,I believe the generated code itself does not include any tvm related headers, for llvm it is the llvm IR, so this code should be able to be compiled and run without any 3rd dependencies.
Add for the 1st question, from the document, relay.build is used to builds a Relay function to run on TVM graph runtime, so maybe it explains why the exported lib through this method must rely on tvm runtime, so my basic point is: is that possible to compile a model and build a lib without tvm runtime dependences ?
Thanks in advance. Reference Code Example: https://tvm.apache.org/docs/tutorials/frontend/from_tflite.html#sphx-glr-tutorials-frontend-from-tflite-py