pytorch/scripts
Jane Xu 52fe73a39e Enable Python code coverage for onnx runs (#47387)
Summary:
Fixes https://github.com/pytorch/pytorch/issues/44120

Pull Request resolved: https://github.com/pytorch/pytorch/pull/47387

Reviewed By: heitorschueroff

Differential Revision: D24737378

Pulled By: janeyx99

fbshipit-source-id: 79e3d0b62f7da0617330f312fb1ed548c6be2a3b
2020-11-09 20:52:14 -08:00
..
appveyor move flags to c10 (#12144) 2018-10-04 02:09:56 -07:00
fbcode-dev-setup Fix typos (#30606) 2019-12-02 20:17:42 -08:00
model_zoo Remove py2 compatible future imports (#44735) 2020-09-16 12:55:57 -07:00
onnx Enable Python code coverage for onnx runs (#47387) 2020-11-09 20:52:14 -08:00
release ci: Add anaconda pruning to CI pipeline (#44651) 2020-09-15 10:51:05 -07:00
release_notes Add release note scripts (#47360) 2020-11-05 06:43:24 -08:00
add_apache_header.sh
apache_header.txt
apache_python.txt
build_android.sh [pytorch] deprecate static dispatch (#43564) 2020-08-27 14:52:48 -07:00
build_host_protoc.sh Port all PyTorch and Caffe2 jobs to CircleCI (#11264) 2018-09-05 16:28:11 -07:00
build_ios.sh [CI][IOS] Add a arm64 ios job for Metal (#46646) 2020-10-22 16:54:46 -07: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 [pytorch] deprecate static dispatch (#43564) 2020-08-27 14:52:48 -07:00
build_pytorch_android.sh fix scripts (#44464) 2020-09-10 08:13:48 -07:00
build_raspbian.sh Fix target name. 2019-02-22 17:27:16 -08:00
build_tegra_x1.sh
build_tizen.sh
build_windows.bat Turn off warnings on Windows CI. (#24331) 2019-08-30 07:11:07 -07:00
diagnose_protobuf.py Remove py2 compatible future imports (#44735) 2020-09-16 12:55:57 -07:00
get_python_cmake_flags.py Remove __future__ imports for legacy Python2 supports (#45033) 2020-09-23 17:57:02 -07:00
proto.ps1 Sync fbcode/caffe2 and xplat/caffe2 (1) (#19218) 2019-04-13 21:45:52 -07:00
read_conda_versions.sh
README.md Enhance build_ios.sh to be consistent with build_android.sh (#18564) 2019-03-28 21:37:55 -07:00
remove_apache_header.sh
temp.sh
xcode_build.rb [iOS][CI] Upgrade xcode version to 12.0 (#45677) 2020-10-01 16:53:18 -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.