TVM compile model for Android

python3 -m tvm.driver.tvmc compile --target “llvm -device=arm_cpu -mtriple=aarch64-linux-android” --cross-compiler ‘aarch64-linux-android-gcc’ -o resnet50-v2-7-tvm-arm64CPU_android.tar resnet50-v2-7.onnx

The following error is coming:

PermissionError: [Errno 13] Permission denied: ‘aarch64-linux-android-gcc’

Question: How should we specify --cross-compiler to pick the ‘aarch64-linux-android-gcc’ compiler.

The issue is resolved by downloading the latest Android NDK and giving Clang compiler for cross-compilation.

tvmc compile --target “llvm -device=arm_cpu -mtriple=aarch64-linux-android” --cross-compiler ‘$ANDROID_NDK_PATH/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android30-clang’ -o mobilenet_v2_pytorch_arm64_cpu.tar models/mobilenet_v2_pytorch.onnx