sglang_v0.5.2/pytorch_2.8.0/scripts
hailin c8e8c1e9ff . 2025-09-20 16:09:34 +08:00
..
analysis . 2025-09-20 16:09:34 +08:00
compile_tests . 2025-09-20 16:09:34 +08:00
export . 2025-09-20 16:09:34 +08:00
fbcode-dev-setup . 2025-09-20 16:09:34 +08:00
jit . 2025-09-20 16:09:34 +08:00
onnx . 2025-09-20 16:09:34 +08:00
release . 2025-09-20 16:09:34 +08:00
release_notes . 2025-09-20 16:09:34 +08:00
README.md . 2025-09-20 16:09:34 +08:00
add_apache_header.sh . 2025-09-20 16:09:34 +08:00
apache_header.txt . 2025-09-20 16:09:34 +08:00
apache_python.txt . 2025-09-20 16:09:34 +08:00
build_android.sh . 2025-09-20 16:09:34 +08:00
build_android_gradle.sh . 2025-09-20 16:09:34 +08:00
build_host_protoc.sh . 2025-09-20 16:09:34 +08:00
build_ios.sh . 2025-09-20 16:09:34 +08:00
build_local.sh . 2025-09-20 16:09:34 +08:00
build_mobile.sh . 2025-09-20 16:09:34 +08:00
build_pytorch_android.sh . 2025-09-20 16:09:34 +08:00
build_raspbian.sh . 2025-09-20 16:09:34 +08:00
build_tegra_x1.sh . 2025-09-20 16:09:34 +08:00
build_tizen.sh . 2025-09-20 16:09:34 +08:00
build_windows.bat . 2025-09-20 16:09:34 +08:00
diagnose_protobuf.py . 2025-09-20 16:09:34 +08:00
get_python_cmake_flags.py . 2025-09-20 16:09:34 +08:00
install_triton_wheel.sh . 2025-09-20 16:09:34 +08:00
lint_urls.sh . 2025-09-20 16:09:34 +08:00
lint_xrefs.sh . 2025-09-20 16:09:34 +08:00
proto.ps1 . 2025-09-20 16:09:34 +08:00
remove_apache_header.sh . 2025-09-20 16:09:34 +08:00
temp.sh . 2025-09-20 16:09:34 +08:00
xcode_build.rb . 2025-09-20 16:09:34 +08:00

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

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.