pytorch/scripts
2025-02-05 07:33:50 +00:00
..
analysis 2024-07-17 nightly release (7919f0b952) 2024-07-17 07:33:41 +00:00
compile_tests 2024-12-30 nightly release (2ed4d65af0) 2024-12-30 07:34:20 +00:00
export 2025-01-20 nightly release (6cb186e279) 2025-01-20 07:33:45 +00:00
fbcode-dev-setup 2022-07-29 nightly release (357b7d589c) 2022-07-29 00:02:43 -07:00
jit 2024-07-17 nightly release (7919f0b952) 2024-07-17 07:33:41 +00:00
onnx 2025-02-05 nightly release (3c0d2bc262) 2025-02-05 07:33:50 +00:00
release 2025-01-18 nightly release (64e54d5af6) 2025-01-18 07:33:47 +00:00
release_notes 2024-08-05 nightly release (c7cfa51721) 2024-08-05 07:33:44 +00: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 2024-05-30 nightly release (d66f12674c) 2024-05-30 07:34:02 +00:00
build_android_gradle.sh 2024-01-19 nightly release (f302a0d380) 2024-01-19 07:33:38 +00:00
build_host_protoc.sh
build_ios.sh 2024-05-30 nightly release (d66f12674c) 2024-05-30 07:34:02 +00:00
build_local.sh
build_mobile.sh 2024-05-30 nightly release (d66f12674c) 2024-05-30 07:34:02 +00:00
build_pytorch_android.sh
build_raspbian.sh 2021-03-08 nightly release (36dc5d3b3a) 2021-03-08 17:06:31 -08:00
build_tegra_x1.sh 2024-05-05 nightly release (6d30803d64) 2024-05-05 07:33:44 +00:00
build_tizen.sh 2024-05-05 nightly release (6d30803d64) 2024-05-05 07:33:44 +00:00
build_windows.bat 2024-08-29 nightly release (41e36e2b46) 2024-08-29 07:33:45 +00:00
diagnose_protobuf.py 2024-07-17 nightly release (7919f0b952) 2024-07-17 07:33:41 +00:00
get_python_cmake_flags.py 2024-07-17 nightly release (7919f0b952) 2024-07-17 07:33:41 +00:00
install_triton_wheel.sh 2025-01-12 nightly release (e0f67405a1) 2025-01-12 07:33:47 +00:00
proto.ps1 2023-12-19 nightly release (9dda4b20a0) 2023-12-19 07:33:30 +00:00
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 2024-11-19 nightly release (98e441f00b) 2024-11-19 07:35:01 +00: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.