Sining_Sun:

BUILD_CAFFE2_MOBILE=1 ./scripts/build_android.sh


I think that script is for Caffe2. Use this one for PyTorch android:

  

      github.com
  

  
    pytorch/pytorch/blob/master/scripts/build_pytorch_android.sh 13


    #!/bin/bash
set -eux

##############################################################################
# Master script to build PyTorch Android library with Java bindings.
##############################################################################
# Example usage:
# - Build default AARs:
#   scripts/build_pytorch_android.sh
#
# - Build for specific ABI(s):
#   scripts/build_pytorch_android.sh armeabi-v7a
#   scripts/build_pytorch_android.sh arm64-v8a,x86,x86_64
#
# Script's workflow:
# 1. Builds libtorch for android for specified android abisi (by default for all 4).
# Custom list of android abis can be specified as a bash argument as comma separated list.
# For example just for testing on android x86 emulator we need only x86 build.
# ./scripts/build_pytorch_android.sh x86
# 2. Creates symbolic links to android/pytorch_android/src/main/jniLibs/${abi} for libtorch build output,



  This file has been truncated. show original