Hi, I am a beginner in TVM. When I try to test auto tunning in android device, it hall on a long time, then throw except.
I build tvm_rpc based on this link, then try to test android_rpc_test.py.
The test step is list below:
- I launch up rpc in linux server by this command:
python -m tvm.exec.rpc_tracker --host=109.XXX.XXX.XXX --port=9190
- I run the rpc apk in android device, and then check the device in linux by below command:
python -m tvm.exec.query_rpc_tracker --host=109.XXX.XXX.XXX --port 9190
The result list as below:
Tracker address 109.XXX.XXX.XXX:9190
Server List
----------------------------
server-address key
----------------------------
109.XXX.XXX.XXX:53014 server:android
----------------------------
Queue Status
-------------------------------
key total free pending
-------------------------------
android 1 1 0
-------------------------------
- Then I begin to test the example:
$ export TVM_TRACKER_HOST=109.XXX.XXX.XXX
$ export TVM_TRACKER_PORT=9190
$ export TVM_NDK_CC=/opt/prebuilts/android-ndk-r16b/android-toolchain-arm64/bin/aarch64-linux-android-g++
$ python android_rpc_test.py
After I run the python scrpit, it hang on “tracker.request(key, priority=0, session_timeout=60)”, and after a long time, it report the below error message:
Traceback (most recent call last):
File "android_rpc_test.py", line 154, in <module>
test_rpc_module()
File "android_rpc_test.py", line 64, in test_rpc_module
remote = tracker.request(key, priority=0, session_timeout=60)
File "/home/shaohaizhu/workspace/tvm/python/tvm/rpc/client.py", line 400, in request
raise RuntimeError(
RuntimeError: Cannot request android after 5 retry, last_error:Traceback (most recent call last):
[bt] (4) /data/shaohaizhu/workspace/tvm/build/libtvm.so(TVMFuncCall+0x5f) [0x7fa9db4c26af]
[bt] (3) /data/shaohaizhu/workspace/tvm/build/libtvm.so(+0x1ad4196) [0x7fa9db54c196]
[bt] (2) /data/shaohaizhu/workspace/tvm/build/libtvm.so(tvm::runtime::RPCClientConnect(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, tvm::runtime::TVMArgs)+0xdd) [0x7fa9db54bbed]
[bt] (1) /data/shaohaizhu/workspace/tvm/build/libtvm.so(tvm::runtime::RPCConnect(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, tvm::runtime::TVMArgs)+0x5b9) [0x7fa9db548b09]
[bt] (0) /data/shaohaizhu/workspace/tvm/build/libtvm.so(+0x1ace1d2) [0x7fa9db5461d2]
File "/home/shaohaizhu/workspace/tvm/src/runtime/rpc/rpc_socket_impl.cc", line 73
TVMError:
---------------------------------------------------------------
An internal invariant was violated during the execution of TVM.
Please read TVM's error reporting guidelines.
More details can be found here: https://discuss.tvm.ai/t/error-reporting/7793.
---------------------------------------------------------------
Check failed: sock.Connect(addr) == false: Connect to 109.XXX.XXX.XXX:5001 failed