Hi, I’ve got the LLVM ir of a model by code below
with tvm.transform.PassContext(opt_level=3):
lib = relay.build(mod, target, params=params)
ir = lib.get_lib().get_source("ll")
with open(os.path.join(model_path, "model.ll"), "w") as f:
print(ir,file=f)
And I’ve used Polly to optimize the corresponding LLVM ir (Or I would appreciate it if somebody could tell me whether Polly is beneficial for inference).
Now I want to compile the optimized LLVM ir (.ll file) to the library (.tar or .so file). AFAIK, the .ll file only contains code without weights, which means I need to re-link weights with .ll file. I wonder whether it is possible or after Polly, it becomes impossible.
Thx for your help in advance.