Android rpc with OpenCL Failed

Hello, I followed this page to install Android TVM RPC. The apk can be build well when I disable OpenCL. However, I get the following error if enabling OpenCL

[arm64-v8a] Compile++ : tvm4j_runtime_packed <= [arm64-v8a] SharedLibrary : /home/ycdfwzy/repo/tvm/pull-from-android-device/ error adding symbols: File in wrong format clang++: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [/home/ycdfwzy/Android/Sdk/ndk/21.4.7075529/build/core/ /home/ycdfwzy/repo/tvm/apps/android_rpc/app/src/main/obj/local/arm64-v8a/] Error 1 make: Leaving directory ‘/home/ycdfwzy/repo/tvm/apps/android_rpc/app/src/main/jni’

I use TVM 0.7.0 and the Google Pixel 3. I’m sure is pulled from Pixel 3.

I see that you are building for arm64-v8a. Maybe you have pulled your lib from /vendor/lib/ instead of /vendor/lib64/ ?

Thanks for your reply.

I have repulled from /vendor/lib64/. It passed the compilation and I could see the device if I ran

python3 -m tvm.exec.query_rpc_tracker --host= --port=9190

However, the test script outputs nothing. It seems that it can’t establish the connection

^CTraceback (most recent call last): File “tests/”, line 129, in test_rpc_module() File “tests/”, line 57, in test_rpc_module remote = tracker.request(key, priority=0, session_timeout=60) File “/home/ycdfwzy/repo/tvm/python/tvm/rpc/”, line 394, in request return connect(url, port, matchkey, session_timeout) File “/home/ycdfwzy/repo/tvm/python/tvm/rpc/”, line 501, in connect sess = _ffi_api.Connect(url, port, key, *session_constructor_args) File “/home/ycdfwzy/repo/tvm/python/tvm/_ffi/_ctypes/”, line 233, in call ctypes.byref(ret_tcode), KeyboardInterrupt

It could pass the test if I disabled OpenCL when compiling the RPC app.

Did you manage to find a solution for that?

Which problem with OpenCL and android rpc do you have? I checked on the latest master and everything works fine for me. Maybe I could help you.

Thanks! I managed to fix this problem.