Calling target = tvm.target.create('llvm')
twice will create empty params.
The following is the code snippet I used, which was copied from the quick start tutorial: https://docs.tvm.ai/tutorials/relay_quick_start.html
opt_level = 3
target = tvm.target.create('llvm')
with relay.build_config(opt_level=opt_level):
graph, lib, params = relay.build_module.build(
mod, target, params=params)
I ran it in jupyter notebook on both Mac and Linux platform.
Only if I ran this segment twice, the value of params
will be {}
Trying to look into the code of autotvm.task.dispatcher
, seems that there is somthing wrong with the context cache.