zhaiyi000 commented on issue #9268:
URL: https://github.com/apache/tvm/issues/9268#issuecomment-943021024
I still get an error when testing on the iOS sumulator, but it is not the
same as the above error, prompting `unsupported case in deploy.dylib`
```
(py38) zy@diyideMacBook-Pro ios_rpc_simulator % python3
tests/ios_rpc_mobilenet.py --host '222.195.65.74' --port '9090' --mode
"standalone"
WARNING:root:scikit-learn version 0.24.1 is not supported. Minimum required
version: 0.17. Maximum required version: 0.19.2. Disabling scikit-learn
conversion API.
One or more operators have not been tuned. Please tune your model for better
performance. Use DEBUG logging level to see more details.
Traceback (most recent call last):
File "tests/ios_rpc_mobilenet.py", line 182, in <module>
test_mobilenet(args.host, args.port, args.key, args.mode)
File "tests/ios_rpc_mobilenet.py", line 159, in test_mobilenet
run(model, target_host)
File "tests/ios_rpc_mobilenet.py", line 111, in run
lib = remote.load_module("deploy.dylib")
File "/Users/zy/Desktop/tvm/python/tvm/rpc/client.py", line 161, in
load_module
return _ffi_api.LoadRemoteModule(self._sess, path)
File "/Users/zy/Desktop/tvm/python/tvm/_ffi/_ctypes/packed_func.py", line
237, in __call__
raise get_last_ffi_error()
tvm.error.RPCError: Traceback (most recent call last):
[bt] (8) 9 libtvm.dylib 0x0000000110f88511
tvm::runtime::RPCWrappedFunc::operator()(tvm::runtime::TVMArgs,
tvm::runtime::TVMRetValue*) const + 1521
[bt] (7) 8 libtvm.dylib 0x0000000110f80f4c
tvm::runtime::RPCClientSession::CallFunc(void*, TVMValue const*, int const*,
int, std::__1::function<void (tvm::runtime::TVMArgs)> const&) + 124
[bt] (6) 7 libtvm.dylib 0x0000000110f7905d
tvm::runtime::RPCEndpoint::CallFunc(void*, TVMValue const*, int const*, int,
std::__1::function<void (tvm::runtime::TVMArgs)>) + 333
[bt] (5) 6 libtvm.dylib 0x0000000110f7792e
tvm::runtime::RPCEndpoint::HandleUntilReturnEvent(bool, std::__1::function<void
(tvm::runtime::TVMArgs)>) + 622
[bt] (4) 5 libtvm.dylib 0x0000000110f77bce
tvm::runtime::RPCEndpoint::EventHandler::HandleNextEvent(bool, bool,
std::__1::function<void (tvm::runtime::TVMArgs)>) + 494
[bt] (3) 4 libtvm.dylib 0x0000000110f7bc42
tvm::runtime::RPCEndpoint::EventHandler::HandleProcessPacket(std::__1::function<void
(tvm::runtime::TVMArgs)>) + 386
[bt] (2) 3 libtvm.dylib 0x0000000110f7dbd5
tvm::runtime::RPCEndpoint::EventHandler::HandleReturn(tvm::runtime::RPCCode,
std::__1::function<void (tvm::runtime::TVMArgs)>) + 213
[bt] (1) 2 libtvm.dylib 0x000000010fad26c9
tvm::runtime::detail::LogFatal::Entry::Finalize() + 89
[bt] (0) 1 libtvm.dylib 0x0000000110f17688
tvm::runtime::Backtrace() + 24
[bt] (8) 9 tvmrpc 0x000000010dab9437
std::__1::__function::__alloc_func<tvm::runtime::$_2,
std::__1::allocator<tvm::runtime::$_2>, void (tvm::runtime::TVMArgs,
tvm::runtime::TVMRetValue*)>::operator()(tvm::runtime::TVMArgs&&,
tvm::runtime::TVMRetValue*&&) + 71
[bt] (7) 8 tvmrpc 0x000000010dab9487 void
std::__1::__invoke_void_return_wrapper<void, true>::__call<tvm::runtime::$_2&,
tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*>(tvm::runtime::$_2&,
tvm::runtime::TVMArgs&&, tvm::runtime::TVMRetValue*&&) + 71
[bt] (6) 7 tvmrpc 0x000000010dab9523
decltype(std::__1::forward<tvm::runtime::$_2&>(fp)(std::__1::forward<tvm::runtime::TVMArgs>(fp0),
std::__1::forward<tvm::runtime::TVMRetValue*>(fp0)))
std::__1::__invoke<tvm::runtime::$_2&, tvm::runtime::TVMArgs,
tvm::runtime::TVMRetValue*>(tvm::runtime::$_2&, tvm::runtime::TVMArgs&&,
tvm::runtime::TVMRetValue*&&) + 115
[bt] (5) 6 tvmrpc 0x000000010dab95cc
tvm::runtime::$_2::operator()(tvm::runtime::TVMArgs,
tvm::runtime::TVMRetValue*) const + 140
[bt] (4) 5 tvmrpc 0x000000010dab989f
tvm::runtime::UnsignedDSOLoader::Init(std::__1::basic_string<char,
std::__1::char_traits<char>, std::__1::allocator<char> > const&) + 431
[bt] (3) 4 tvmrpc 0x000000010da9c3f5
tvm::runtime::detail::LogFatal::~LogFatal() + 21
[bt] (2) 3 tvmrpc 0x000000010da9f059
tvm::runtime::detail::LogFatal::~LogFatal() + 73
[bt] (1) 2 tvmrpc 0x000000010daadb76
tvm::runtime::detail::LogFatalImpl(std::__1::basic_string<char,
std::__1::char_traits<char>, std::__1::allocator<char> > const&, int,
std::__1::basic_string<char, std::__1::char_traits<char>,
std::__1::allocator<char> > const&) + 134
[bt] (0) 1 libtvm_runtime.dylib 0x000000010f895825
tvm::runtime::Backtrace() + 37
File "/Users/zy/Desktop/tvm/src/runtime/rpc/rpc_endpoint.cc", line 376
RPCError: Error caught from RPC call:
[14:17:11]
/Users/zy/Desktop/tvm/apps/ios_rpc_simulator/tvmrpc/TVMRuntime.mm:98:
---------------------------------------------------------------
An error occurred during the execution of TVM.
For more information, please see: https://tvm.apache.org/docs/errors.html
---------------------------------------------------------------
Check failed: (lib_handle_ != nullptr) is false: Failed to load dynamic
shared library
/Users/zy/Library/Developer/CoreSimulator/Devices/79FE4818-5C80-47C2-A9DF-E3C1DED30077/data/Containers/Data/Application/B88F3A6C-2F69-436D-8236-34AA58396D02/tmp/deploy.dylib
Error happens during dlopen execution. addDynamicReference: unsupported case
in deploy.dylib
```
The command used to compile tvm_runtime is
```
cmake ..\
-DCMAKE_BUILD_TYPE=Debug\
-DCMAKE_SYSTEM_NAME=iOS\
-DCMAKE_SYSTEM_VERSION=14.0\
-DCMAKE_OSX_SYSROOT=iphonesimulator\
-DCMAKE_OSX_ARCHITECTURES=x86_64\
-DCMAKE_OSX_DEPLOYMENT_TARGET=14.0\
-DCMAKE_BUILD_WITH_INSTALL_NAME_DIR=ON\
-DUSE_IOS_RPC=ON \
-DUSE_METAL=ON
```
In the `tests/ios_rpc_mobilenet.py` file, the configuration used is
```
# Change target configuration, this is setting for iphone6s
arch = "x86_64"
sdk = "iphonesimulator"
# arch = "arm64"
# sdk = "iphoneos"
target_host = "llvm -mtriple=%s-apple-darwin" % arch
```
--
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]