with tvm.transform.PassContext(opt_level=3):
exe = relay.vm.compile(mod, target=target, params=params)
# export to tempdir
lib.export_library(os.path.join(export_dir, TVM_ASSETS[0]))
with open(os.path.join(export_dir, TVM_ASSETS[1]), "wb") as fout:
fout.write(code)
When an onnx model compiled with relay.vm.compile(), I can store graph.json to disk file as shown above. However the stored file is in bytes format. Is there a way to dump it in JSON format?