pytorch/scripts
chronos_secgrp_pytorch_oss_ci_oncall 6f47f3883d 2022-04-09 nightly release (58a44523c1)
2022-04-09 00:02:33 -07:00
..
appveyor
fbcode-dev-setup 2019-12-03 nightly release (18ec4632b3) 2019-12-03 00:02:14 -08:00
jit 2022-04-09 nightly release (58a44523c1) 2022-04-09 00:02:33 -07:00
model_zoo 2021-05-15 nightly release (00a46a5eb4) 2021-05-15 00:04:07 -07:00
onnx 2022-04-08 nightly release (11f1fef981) 2022-04-08 00:02:31 -07:00
release 2022-03-16 nightly release (ac3effd150) 2022-03-16 00:03:08 -07:00
release_notes 2022-01-26 nightly release (12e01f7825) 2022-01-26 00:02:37 -08:00
add_apache_header.sh
apache_header.txt 2021-03-31 nightly release (920eb01e2e) 2021-03-31 00:02:04 -07:00
apache_python.txt 2021-03-31 nightly release (920eb01e2e) 2021-03-31 00:02:04 -07:00
build_android.sh 2022-03-02 nightly release (2f957f513e) 2022-03-02 00:02:34 -08:00
build_host_protoc.sh
build_ios.sh 2022-03-02 nightly release (2f957f513e) 2022-03-02 00:02:34 -08:00
build_local.sh Only set CCACHE_WRAPPER_PATH in the build scripts if it is not already passed in. 2019-11-01 18:39:12 -07:00
build_mobile.sh 2021-04-30 nightly release (65968ab817) 2021-04-30 00:02:42 -07:00
build_pytorch_android.sh 2020-09-11 nightly release (b5d75dddd9) 2020-09-11 00:02:39 -07:00
build_raspbian.sh 2021-03-08 nightly release (36dc5d3b3a) 2021-03-08 17:06:31 -08:00
build_tegra_x1.sh 2021-03-08 nightly release (36dc5d3b3a) 2021-03-08 17:06:31 -08:00
build_tizen.sh
build_windows.bat Turn off warnings on Windows CI. (#24331) 2019-08-30 07:11:07 -07:00
diagnose_protobuf.py 2021-03-31 nightly release (920eb01e2e) 2021-03-31 00:02:04 -07:00
get_python_cmake_flags.py 2021-04-30 nightly release (65968ab817) 2021-04-30 00:02:42 -07:00
proto.ps1
read_conda_versions.sh
README.md 2021-03-08 nightly release (36dc5d3b3a) 2021-03-08 17:06:31 -08:00
remove_apache_header.sh
temp.sh
xcode_build.rb 2021-09-24 nightly release (d78b3909e8) 2021-09-24 00:04:48 -07:00

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

build_ios.sh

This script is to build PyTorch/Caffe2 library for iOS, and can only be performed on macOS. Take the following steps to start the build:

  • Install Xcode from App Store, and configure "Command Line Tools" properly on Xcode.
  • Install the dependencies:
brew install cmake automake libtool
  • run build_ios.sh
#in your PyTorch root directory
bash scripts/build_ios.sh

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