Steps followed:
- Cross compiled TVM runtime for aarch64 with commands in Deploy and Integration — tvm 0.8.dev0 documentation. libtvm_runtime.so got generated for aarch64.
- Compiled model with TVMC command using the below command: ( as per Compiling and Optimizing a Model with TVMC — tvm 0.8.dev0 documentation)
python3 -m tvm.driver.tvmc compile --target “llvm -device=arm_cpu -mtriple=aarch64-linux-gnu” --cross-compiler ‘aarch64-linux-gnu-gcc’ -o resnet50-v2-7-tvm-arm64CPU.tar …/resnet50-v2-7.onnx
- The compiled models got generated in resnet50-v2-7-tvm-arm64CPU.tar.
- When tested on Android device using the android_deploy test app with the generated TVM compiled model files(mod.so, mod.json, mod.params) we get the following error:
09-30 17:04:23.148 8538 8582 E AndroidRuntime: Caused by: org.apache.tvm.Base$TVMError: TVMError: Check failed: lib_handle_ != nullptr: Failed to load dynamic shared library /data/user/0/org.apache.tvm.android.demo/cache/tvm4j_demo_8799703069585602242/mod.so dlopen failed: library “libc.so.6” not found: needed by /data/data/org.apache.tvm.android.demo/cache/tvm4j_demo_8799703069585602242/mod.so in namespace classloader-namespace
There is no libc.so.6 library found in the Android /system/ folder.
Is the steps followed are correct or we need to using a different cross-compiler toolchain for Android?