engineer1109 opened a new issue, #13077:
URL: https://github.com/apache/tvm/issues/13077

   ### Expected behavior
   
   No Crash
   
   ### Actual behavior
   Crash Stack
   
   ```
   Exception has occurred: TVMError
   Traceback (most recent call last):
     4: TVMFuncCall
     3: 
tvm::runtime::PackedFuncObj::Extractor<tvm::runtime::PackedFuncSubObj<tvm::runtime::TypedPackedFunc<tvm::runtime::Module
 (tvm::runtime::Module, 
std::string)>::AssignTypedLambda<tvm::runtime::__mk_TVM4::{lambda(tvm::runtime::Module,
 std::string)#1}>(tvm::runtime::__mk_TVM4::{lambda(tvm::runtime::Module, 
std::string)#1}, std::string)::{lambda(tvm::runtime::TVMArgs const&, 
tvm::runtime::TVMRetValue*)#1}> >::Call(tvm::runtime::PackedFuncObj const*, 
tvm::runtime::__mk_TVM4::{lambda(tvm::runtime::Module, std::string)#1}, 
tvm::runtime::TVMArgs const&)
     2: tvm::runtime::RPCWrappedFunc::operator()(tvm::runtime::TVMArgs, 
tvm::runtime::TVMRetValue*) const
     1: tvm::runtime::LocalSession::CallFunc(void*, TVMValue const*, int 
const*, int, std::function<void (tvm::runtime::TVMArgs)> const&)
     0: 
tvm::runtime::PackedFuncObj::Extractor<tvm::runtime::PackedFuncSubObj<TVMFuncCreateFromCFunc::{lambda(tvm::runtime::TVMArgs,
 tvm::runtime::TVMRetValue*)#2}> >::Call(tvm::runtime::PackedFuncObj const*, 
tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*) [clone .cold]
     File "tvm/_ffi/_cython/./packed_func.pxi", line 56, in 
tvm._ffi._cy3.core.tvm_callback
     File "/usr/local/lib/python3.8/dist-packages/tvm/rpc/server.py", line 70, 
in load_module
       m = _load_module(path)
     File "/usr/local/lib/python3.8/dist-packages/tvm/runtime/module.py", line 
607, in load_module
       return _ffi_api.ModuleLoadFromFile(path, fmt)
     File "tvm/_ffi/_cython/./packed_func.pxi", line 331, in 
tvm._ffi._cy3.core.PackedFuncBase.__call__
     File "tvm/_ffi/_cython/./packed_func.pxi", line 262, in 
tvm._ffi._cy3.core.FuncCall
     File "tvm/_ffi/_cython/./packed_func.pxi", line 251, in 
tvm._ffi._cy3.core.FuncCall3
     File "tvm/_ffi/_cython/./base.pxi", line 181, in 
tvm._ffi._cy3.core.CHECK_CALL
     8: TVMFuncCall
     7: _ZN3tvm7runtime13PackedFun
     6: tvm::runtime::TypedPackedFunc<tvm::runtime::Module (std::string const&, 
std::string const&)>::AssignTypedLambda<tvm::runtime::Module (*)(std::string 
const&, std::string const&)>(tvm::runtime::Module (*)(std::string const&, 
std::string const&), std::string)::{lambda(tvm::runtime::TVMArgs const&, 
tvm::runtime::TVMRetValue*)#1}::operator()(tvm::runtime::TVMArgs const&, 
tvm::runtime::TVMRetValue*) const
     5: tvm::runtime::Module::LoadFromFile(std::string const&, std::string 
const&)
     4: 
tvm::runtime::PackedFuncObj::Extractor<tvm::runtime::PackedFuncSubObj<tvm::runtime::__mk_TVM0::{lambda(tvm::runtime::TVMArgs,
 tvm::runtime::TVMRetValue*)#1}> >::Call(tvm::runtime::PackedFuncObj const*, 
tvm::runtime::__mk_TVM0, tvm::runtime::TVMRetValue)
     3: 
tvm::runtime::CreateModuleFromLibrary(tvm::runtime::ObjectPtr<tvm::runtime::Library>,
 std::function<tvm::runtime::PackedFunc (int (*)(TVMValue*, int*, int, 
TVMValue*, int*, void*), tvm::runtime::ObjectPtr<tvm::runtime::Object> const&)>)
     2: tvm::runtime::ProcessModuleBlob(char const*, 
tvm::runtime::ObjectPtr<tvm::runtime::Library>, 
std::function<tvm::runtime::PackedFunc (int (*)(TVMValue*, int*, int, 
TVMValue*, int*, void*), tvm::runtime::ObjectPtr<tvm::runtime::Object> 
const&)>, tvm::runtime::Module*, tvm::runtime::ModuleNode**)
     1: tvm::runtime::LoadModuleFromBinary(std::string const&, dmlc::Stream*)
     0: _ZN3tvm7runtime6deta
     File "/workspace/tvm/src/runtime/library_module.cc", line 118
   TVMError: Binary was created using {opencl} but a loader of that name is not 
registered. Available loaders are ethos-n, AotExecutorFactory, metadata_module, 
const_loader, metadata, arm_compute_lib, VMExecutable, GraphRuntimeFactory, 
GraphExecutorFactory. Perhaps you need to recompile with this runtime enabled.
     File "/home/wjl/test/tvm/test_tvmc.py", line 17, in <module>
       result = tvmc.run(package, device="CL")
   ```
   
   ### Environment
   
   Ubuntu 20.04 GCC 9.4.0 TVM 0.9.0
   
   ### Steps to reproduce
   
   
https://drive.google.com/file/d/1fQ-5qO8UTT44-sZFPQOD4MXfNR13Zf-6/view?usp=sharing
   Model and Code
   
   ```
   from tvm.driver import tvmc
   
   import tvm
   
   print(tvm.__version__)
   
   model = tvmc.load('mobilenet_v1_infer.onnx', shape_dict={'input' : [1, 3, 
244, 224]})
   
   model.save("test.tar")
   
   model.summary();
   
   package = tvmc.compile(model, target="opencl", package_path="test1.tar")
   
   #new_package = tvmc.TVMCPackage(package_path="test.so")
   
   result = tvmc.run(package, device="CL")
   
   print(result)
   
   ```
   
   ### Triage
   
   Please refer to the list of label tags linked above to find the relevant 
tags and add them here in a bullet format (example below).
   
   * needs-triage
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to