Skip to content

Commit f51e11e

Browse files
authored
Merge branch 'main' into seperate-sampler-targets
2 parents eba9b71 + 03e14ef commit f51e11e

479 files changed

Lines changed: 19927 additions & 5711 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.ci/docker/build.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ case "${IMAGE_NAME}" in
8181
LINTRUNNER=""
8282
GCC_VERSION=11
8383
CUDA_WINDOWS_CROSS_COMPILE=yes
84-
CUDA_VERSION=12.8
84+
CUDA_VERSION=13.0
8585
SKIP_PYTORCH=yes
8686
;;
8787
executorch-ubuntu-24.04-gcc14)
@@ -97,6 +97,10 @@ esac
9797
TORCH_VERSION=$(cat ci_commit_pins/pytorch.txt)
9898
BUILD_DOCS=1
9999

100+
if [[ "${GCC_VERSION:-}" == "11" && -z "${SKIP_PYTORCH:-}" ]]; then
101+
PYTORCH_BUILD_MAX_JOBS=6
102+
fi
103+
100104
# Copy requirements-lintrunner.txt from root to here
101105
cp ../../requirements-lintrunner.txt ./
102106

@@ -109,6 +113,7 @@ docker build \
109113
--build-arg "PYTHON_VERSION=${PYTHON_VERSION}" \
110114
--build-arg "MINICONDA_VERSION=${MINICONDA_VERSION}" \
111115
--build-arg "TORCH_VERSION=${TORCH_VERSION}" \
116+
--build-arg "PYTORCH_BUILD_MAX_JOBS=${PYTORCH_BUILD_MAX_JOBS:-}" \
112117
--build-arg "BUCK2_VERSION=${BUCK2_VERSION}" \
113118
--build-arg "LINTRUNNER=${LINTRUNNER:-}" \
114119
--build-arg "BUILD_DOCS=${BUILD_DOCS}" \
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
release/2.11
1+
release/2.12

.ci/docker/common/install_android.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ install_ndk() {
4343
ARCH=$(uname -m)
4444
if [ "${ARCH}" = "aarch64" ]; then
4545
# aarch64 NDK is not cached on S3, download from Google directly
46-
curl -Os --retry 3 "https://dl.google.com/android/repository/android-ndk-${ANDROID_NDK_VERSION}-linux.zip"
46+
curl -Os --retry 3 --retry-all-errors "https://dl.google.com/android/repository/android-ndk-${ANDROID_NDK_VERSION}-linux.zip"
4747
else
4848
# The NDK installation is cached on ossci-android S3 bucket
49-
curl -Os --retry 3 "https://ossci-android.s3.amazonaws.com/android-ndk-${ANDROID_NDK_VERSION}-linux.zip"
49+
curl -Os --retry 3 --retry-all-errors "https://ossci-android.s3.amazonaws.com/android-ndk-${ANDROID_NDK_VERSION}-linux.zip"
5050
fi
5151
unzip -qo "android-ndk-${ANDROID_NDK_VERSION}-linux.zip"
5252

@@ -62,7 +62,7 @@ install_cmdtools() {
6262

6363
pushd /tmp
6464
# The file is cached on ossci-android S3 bucket
65-
curl -Os --retry 3 "https://ossci-android.s3.us-west-1.amazonaws.com/${CMDTOOLS_FILENAME}"
65+
curl -Os --retry 3 --retry-all-errors "https://ossci-android.s3.us-west-1.amazonaws.com/${CMDTOOLS_FILENAME}"
6666
unzip -qo "${CMDTOOLS_FILENAME}" -d /opt
6767

6868
ls -lah /opt/cmdline-tools/bin

.ci/docker/common/install_cache.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ install_ubuntu() {
3434

3535
install_binary() {
3636
echo "Downloading sccache binary from S3 repo"
37-
curl --retry 3 https://s3.amazonaws.com/ossci-linux/sccache -o /opt/cache/bin/sccache
37+
curl --retry 3 --retry-all-errors https://s3.amazonaws.com/ossci-linux/sccache -o /opt/cache/bin/sccache
3838
chmod +x /opt/cache/bin/sccache
3939
}
4040

@@ -76,6 +76,9 @@ init_sccache() {
7676
# This is the remote cache bucket
7777
export SCCACHE_BUCKET=ossci-compiler-cache-circleci-v2
7878
export SCCACHE_S3_KEY_PREFIX=executorch
79+
export SCCACHE_REGION=us-east-1
80+
export AWS_REGION=us-east-1
81+
export AWS_DEFAULT_REGION=us-east-1
7982
export SCCACHE_IDLE_TIMEOUT=0
8083
export SCCACHE_ERROR_LOG=/tmp/sccache_error.log
8184
export RUST_LOG=sccache::server=error

.ci/docker/common/install_cuda.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010

1111
set -ex
1212

13-
# CUDA version must be specified (e.g., 12.8)
13+
# CUDA version must be specified (e.g., 13.0)
1414
CUDA_VERSION="${CUDA_VERSION:?CUDA_VERSION must be set}"
1515

16-
# Convert version format (e.g., 12.8 -> 12-8 for package names)
16+
# Convert version format (e.g., 13.0 -> 13-0 for package names)
1717
CUDA_VERSION_DASH=$(echo "${CUDA_VERSION}" | tr '.' '-')
1818

1919
# Add NVIDIA package repository

.ci/docker/common/install_cuda_windows_cross_compile.sh

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ declare -A CUDA_DRIVER_MAP=(
1717
["12.6"]="12.6.3:561.17"
1818
["12.8"]="12.8.1:572.61"
1919
["12.9"]="12.9.1:576.57"
20+
["13.0"]="13.0.2:"
2021
)
2122

2223
install_mingw() {
@@ -76,19 +77,26 @@ install_windows_cuda() {
7677
CUDA_VERSION=$(echo "${CUDA_INFO}" | cut -d: -f1)
7778
CUDA_DRIVER_VERSION=$(echo "${CUDA_INFO}" | cut -d: -f2)
7879

79-
echo "Using CUDA ${CUDA_VERSION} with driver ${CUDA_DRIVER_VERSION}"
80+
if [ -n "${CUDA_DRIVER_VERSION}" ]; then
81+
echo "Using CUDA ${CUDA_VERSION} with driver ${CUDA_DRIVER_VERSION}"
82+
CUDA_INSTALLER="cuda_${CUDA_VERSION}_${CUDA_DRIVER_VERSION}_windows.exe"
83+
else
84+
echo "Using CUDA ${CUDA_VERSION}"
85+
CUDA_INSTALLER="cuda_${CUDA_VERSION}_windows.exe"
86+
fi
8087

8188
echo "Installing Windows CUDA toolkit ${CUDA_VERSION}..."
8289

8390
mkdir -p "${INSTALL_DIR}"
8491
cd "${INSTALL_DIR}"
8592

86-
CUDA_INSTALLER="cuda_${CUDA_VERSION}_${CUDA_DRIVER_VERSION}_windows.exe"
8793
CUDA_URL="https://developer.download.nvidia.com/compute/cuda/${CUDA_VERSION}/local_installers/${CUDA_INSTALLER}"
8894

8995
# Check if already downloaded and extracted
9096
if [ -d "${INSTALL_DIR}/extracted/cuda_cudart" ]; then
9197
echo "Windows CUDA toolkit already installed, skipping download..."
98+
chmod -R a+rX "${INSTALL_DIR}"
99+
chmod -R a+rwX "${INSTALL_DIR}/extracted/cuda_cudart/cudart/lib"
92100
return 0
93101
fi
94102

@@ -98,8 +106,11 @@ install_windows_cuda() {
98106
echo "Extracting CUDA toolkit..."
99107
7z x "${CUDA_INSTALLER}" -o"extracted" -y
100108

101-
# Fix permissions so ci-user can access the files
109+
# Fix permissions so ci-user can access the files. PyTorch Inductor also
110+
# needs to write a MinGW import library beside cudart.lib during Windows
111+
# cross-compilation.
102112
chmod -R a+rX "${INSTALL_DIR}"
113+
chmod -R a+rwX "${INSTALL_DIR}/extracted/cuda_cudart/cudart/lib"
103114

104115
# Clean up installer to save space
105116
rm -f "${CUDA_INSTALLER}"

.ci/docker/common/install_docs_reqs.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ if [ -n "$BUILD_DOCS" ]; then
1212
# Ignore error if gpg-agent doesn't exist (for Ubuntu 16.04)
1313
apt-get install -y gpg-agent || :
1414

15-
curl --retry 3 -sL https://deb.nodesource.com/setup_16.x | sudo -E bash -
15+
curl --retry 3 --retry-all-errors -sL https://deb.nodesource.com/setup_16.x | sudo -E bash -
1616
sudo apt-get install -y nodejs
1717

18-
curl --retry 3 -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
18+
curl --retry 3 --retry-all-errors -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
1919
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
2020

2121
apt-get update

.ci/docker/common/install_linter.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ source "$(dirname "${BASH_SOURCE[0]}")/utils.sh"
1515
pip_install -r requirements-lintrunner.txt
1616

1717
# Install google-java-format
18-
curl -L --retry 3 https://github.com/google/google-java-format/releases/download/v1.23.0/google-java-format_linux-x86-64 > /opt/google-java-format
18+
curl -L --retry 3 --retry-all-errors https://github.com/google/google-java-format/releases/download/v1.23.0/google-java-format_linux-x86-64 > /opt/google-java-format
1919
chmod +x /opt/google-java-format

.ci/docker/common/install_pytorch.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,20 @@ install_pytorch_and_domains() {
2727
chown -R ci-user .
2828

2929
export _GLIBCXX_USE_CXX11_ABI=1
30+
if [[ "$(uname -m)" == "aarch64" ]]; then
31+
export BUILD_IGNORE_SVE_UNAVAILABLE=1
32+
fi
33+
if [[ -n "${PYTORCH_BUILD_MAX_JOBS:-}" ]]; then
34+
export MAX_JOBS="${PYTORCH_BUILD_MAX_JOBS}"
35+
fi
3036
# Then build and install PyTorch
3137
conda_run python setup.py bdist_wheel
3238
pip_install "$(echo dist/*.whl)"
3339

3440
# Grab the pinned audio and vision commits from PyTorch
3541
TORCHAUDIO_VERSION=release/2.11
3642
export TORCHAUDIO_VERSION
37-
TORCHVISION_VERSION=release/0.26
43+
TORCHVISION_VERSION=release/0.27
3844
export TORCHVISION_VERSION
3945

4046
install_domains

.ci/docker/ubuntu/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,12 @@ RUN bash ./install_cache.sh && rm install_cache.sh utils.sh
6262
ENV SCCACHE_BUCKET ossci-compiler-cache-circleci-v2
6363
ENV SCCACHE_S3_KEY_PREFIX executorch
6464
ENV SCCACHE_REGION us-east-1
65+
ENV AWS_REGION us-east-1
66+
ENV AWS_DEFAULT_REGION us-east-1
6567

6668
ARG TORCH_VERSION
6769
ARG SKIP_PYTORCH
70+
ARG PYTORCH_BUILD_MAX_JOBS
6871
COPY ./common/install_pytorch.sh install_pytorch.sh
6972
COPY ./common/utils.sh utils.sh
7073
RUN if [ -z "${SKIP_PYTORCH}" ]; then bash ./install_pytorch.sh; fi && rm install_pytorch.sh utils.sh

0 commit comments

Comments
 (0)