I get a error when I save a loaded model(graph, lib, params) transformed from mxnet by relay.frontend with target ‘llvm’ .
actually, I do twice saving operator: first, I save a model transformed from mxnet by relay.frontend with target ‘llvm’ immediately, no error arise. second I save a model after I load it from the saved files at first step, and i get the follow error.
Traceback (most recent call last):
File “/home/m/envtvm/lib/python3.5/site-packages/ipdb/ main .py”, line 168, in main
pdb._runscript(mainpyfile)
File “/usr/lib/python3.5/pdb.py”, line 1542, in _runscript
self.run(statement)
File “/usr/lib/python3.5/bdb.py”, line 431, in run
exec(cmd, globals, locals)
File “”, line 1, in
File “/mnt/hgfs/win_vmubuntu_share/workspace/sence-cls/tvm_space/src/transfer_from_mx.py”, line 2, in
import os
File “/mnt/hgfs/win_vmubuntu_share/workspace/sence-cls/tvm_space/src/transfer_from_mx.py”, line 72, in test
save_tvm_model(loaded_graph, loaded_lib, loaded_params, save_prefix + ‘_1’)
File “/mnt/hgfs/win_vmubuntu_share/workspace/sence-cls/tvm_space/src/tvm_utils.py”, line 52, in save_tvm_model
lib.export_library(path_lib)
File “/data1/workspace/tvm/python/tvm/module.py”, line 118, in export_library
raise ValueError(“Module[%s]: Only llvm and c support export shared” % self.type_key)
ValueError: Module[dso]: Only llvm and c support export shared
step 1 I transform model from mxnet by relay with traget ‘llvm’, i got graph, lib, params
print(1, type(graph))
print(1, type(lib))
print(1, type(params))
print(1, lib.type_key)
the results of prints is
class ‘str’>
class ‘tvm.module.Module’>
class ‘dict’>
llvm
step 2 save tvm model to file
step 3 load tvm model from file
print(2, type(loaded_graph))
print(2, type(loaded_lib))
print(2, type(loaded_params))
print(2, loaded_lib.type_key)
the results of prints is
class ‘str’>
class ‘tvm.module.Module’>
class ‘bytearray’>
dso