While I am figuring out how to make .bc file out of my model, I managed to link runtime and model .o files into a single .a library. When I added it to my CMakeLists.txt I have these errors:
error: undefined symbol: _ZN3tvm7runtime9threading10NumThreadsEv (referenced by top-level compiled C/C++ code)
warning: Link with -s LLD_REPORT_UNDEFINED
to get more information on undefined symbols
warning: To disable errors for undefined symbols use -s ERROR_ON_UNDEFINED_SYMBOLS=0
warning: __ZN3tvm7runtime9threading10NumThreadsEv may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
error: undefined symbol: _ZN3tvm7runtime9threading15ResetThreadPoolEv (referenced by top-level compiled C/C++ code)
warning: __ZN3tvm7runtime9threading15ResetThreadPoolEv may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
error: undefined symbol: ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC1ERKS5 (referenced by top-level compiled C/C++ code)
It seems to be self-explanatory how to fix it, but my guts are telling me that the issue lies somewhere else and I didn’t link tvm_runtime and my model properly… Or do I need to modify my CMakeLists.txt and add these undefined funcions as exported_functions? TVM repo has very nice samples on models deployment of any kind, but it didn’t seem to have CMakeLists.txt examples to it…