Hi, I am building iOS RPC application, I succeed to build and run a sample application from tvm/apps but I am facing issue while building sample caffe2 module. I have attached the complete source code for reference.
module = graph_runtime.create(loaded_json, loaded_lib, ctx) is failing in my case.
Error:
module = graph_runtime.create(loaded_json, loaded_lib, ctx)
Traceback (most recent call last):
File "<ipython-input-11-ed6b5ede16f0>", line 1, in <module>
module = graph_runtime.create(loaded_json, loaded_lib, ctx)
File "/Users/MacMini/.local/lib/python3.7/site-packages/tvm-0.6.dev0-py3.7-macosx-10.7-x86_64.egg/tvm/contrib/graph_runtime.py", line 56, in create
return GraphModule(fcreate(graph_json_str, hmod, *device_type_id))
File "/Users/MacMini/.local/lib/python3.7/site-packages/tvm-0.6.dev0-py3.7-macosx-10.7-x86_64.egg/tvm/_ffi/_ctypes/function.py", line 209, in __call__
raise get_last_ffi_error()
TVMError: Traceback (most recent call last):
[bt] (8) 9 tvmrpc 0x00000001028c6b04 void std::__1::__invoke_void_return_wrapper<void>::__call<tvm::runtime::$_46&, tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*>(tvm::runtime::$_46&&&, tvm::runtime::TVMArgs&&, tvm::runtime::TVMRetValue*&&) + 88
[bt] (7) 8 tvmrpc 0x00000001028c6b94 decltype(std::__1::forward<tvm::runtime::$_46&>(fp)(std::__1::forward<tvm::runtime::TVMArgs>(fp0), std::__1::forward<tvm::runtime::TVMRetValue*>(fp0))) std::__1::__invoke<tvm::runtime::$_46&, tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*>(tvm::runtime::$_46&&&, tvm::runtime::TVMArgs&&, tvm::runtime::TVMRetValue*&&) + 96
[bt] (6) 7 tvmrpc 0x00000001028c6d9c tvm::runtime::$_46::operator()(tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*) const + 488
[bt] (5) 6 tvmrpc 0x00000001027f4db0 tvm::runtime::GraphRuntimeCreate(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, tvm::runtime::Module const&, std::__1::vector<DLContext, std::__1::allocator<DLContext> > const&) + 108
[bt] (4) 5 tvmrpc 0x00000001027eed58 tvm::runtime::GraphRuntime::Init(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, tvm::runtime::Module, std::__1::vector<DLContext, std::__1::allocator<DLContext> > const&) + 104
[bt] (3) 4 tvmrpc 0x00000001027eee5c tvm::runtime::GraphRuntime::Load(dmlc::JSONReader*) + 72
[bt] (2) 3 tvmrpc 0x000000010281be50 dmlc::JSONReader::BeginObject() + 388
[bt] (1) 2 tvmrpc 0x00000001027cc438 dmlc::LogMessageFatal::~LogMessageFatal() + 28
[bt] (0) 1 tvmrpc 0x00000001027cdc40 dmlc::LogMessageFatal::~LogMessageFatal() + 80
TVMError: Except caught from RPC call: [15:52:53] ../../3rdparty/dmlc-core/include/dmlc/json.h:731: Check failed: ch == '{' (49 vs. {) : Error at Line 0, around ^`2, `, Expect '{' but get '1'
To build tvm I am using Mac-mini The target device is iPad 6th Gen I set target = “metal” target_host = “llvm -target=arm64-apple-darwin” Host_proxy = My Mac-mini IP Address destination = “platform=iOS,id=<the test device uuid>”