tree: a28b3424e72b0052f9e24f61ea4fca92fb8c0100 [path history] [tgz]
  1. appveyor/
  2. fbcode-dev-setup/
  3. model_zoo/
  4. onnx/
  5. add_apache_header.sh
  6. apache_header.txt
  7. apache_python.txt
  8. build_android.sh
  9. build_host_protoc.sh
  10. build_ios.sh
  11. build_local.sh
  12. build_raspbian.sh
  13. build_tegra_x1.sh
  14. build_tizen.sh
  15. build_windows.bat
  16. diagnose_protobuf.py
  17. get_python_cmake_flags.py
  18. read_conda_versions.sh
  19. README.md
  20. remove_apache_header.sh
  21. temp.sh
scripts/README.md

This directory contains the useful tools.

build_android.sh

This script is to build PyTorch/Caffe2 library for Android. Take the following steps to start the build:

  • set ANDROID_NDK to the location of ndk
export ANDROID_NDK=YOUR_NDK_PATH
  • run build_android.sh
#in your PyTorch root directory
bash scripts/build_android.sh

If succeeded, the libraries and headers would be generated to build_android/install directory. You can then copy these files from build_android/install to your Android project for further usage.

You can also override the cmake flags via command line, e.g., following command will also compile the executable binary files:

bash scripts/build_android.sh -DBUILD_BINARY=ON