Deploy a Relax IR module from C++ using a static library approach?

Hello,

I’m attempting to build and deploy a Relax example using C++ on a system that does not support dynamic loading. I use the following sequence to export a static library from the Relax IR module:

target = tvm.target.Target("llvm")  
executable = relax.build(mod, target, exec_mode="compiled", system_lib=True)  
executable.export_library("compiled_artifact.a", fcompile=cc.create_staticlib)

The generated library includes a __vmtir__main function that corresponds to the main function in the IR module.

Is the expectation that the user calls the __vmtir_main function directly (or) is there a higher level abstraction similar to the DSO approach (Deploy Relax IR using C++ API)?

Any pointers/suggestions on how to proceed?

Thanks! Ajay

An update to answer my question:

I was able to build the static version of the TVM runtime and link it against the application to load the DSO and run inference with Relax VM.

However, my understanding from looking through the source code is that the Relax VM/VMExecutable approach is tightly coupled with use of dynamic shared objects (DSOs). Using the Relax VM with a static variant generated by export_library is more trouble than it’s worth.