MobileNetV3 failed to run in android_deploy

I convert a mobeilenet_v3 pytorch-based onnx model to tvm model, and run successfully through android_rpc. But, when I try to run android_deploy, it failed at:

// tvm module for compiled functions
Module modelLib = Module.load(libCacheFilePath);

with ERROR:

W/System.err: libtvm4j loads successfully.
E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #1
    Process:, PID: 7489
    java.lang.RuntimeException: An error occurred while executing doInBackground()
        at android.os.AsyncTask$3.done(
        at java.util.concurrent.FutureTask.finishCompletion(
        at java.util.concurrent.FutureTask.setException(
        at android.os.AsyncTask$SerialExecutor$
        at java.util.concurrent.ThreadPoolExecutor.runWorker(
        at java.util.concurrent.ThreadPoolExecutor$
     Caused by: org.apache.tvm.Base$TVMError: TVMError: Check failed: lib_handle_ != nullptr: Failed to load dynamic shared library /data/user/0/ dlopen failed: library "" not found
    Stack trace:
      File "/Users/user_name/Project/tvm/tvm/apps/android_deploy/app/src/main/jni/../../../../../../include/../src/runtime/", line 84
        at org.apache.tvm.Base.checkCall(
        at org.apache.tvm.Function.invoke(
        at org.apache.tvm.Module.load(
        at org.apache.tvm.Module.load(
        at android.os.AsyncTask$
        	... 4 more
Disconnected from the target VM, address: 'localhost:8606', transport: 'socket'

I changed to APP_STL := c++_static to APP_STL := c++_shared in apps/android_deploy/app/src/main/jni/, but also failed.

However, I can success to run android_deploy in squeezenet.

1 Like

Hi, I met similar problem, did you solve it?

I do not know why the android_deploy does not generate .so file.