Skip to content

Commit 301ddd6

Browse files
authored
Merge branch 'main' into dev1/memory/profiling
2 parents c813155 + 10c8958 commit 301ddd6

905 files changed

Lines changed: 46156 additions & 9762 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: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,11 @@ case "${IMAGE_NAME}" in
8484
CUDA_VERSION=12.8
8585
SKIP_PYTORCH=yes
8686
;;
87+
executorch-ubuntu-24.04-gcc14)
88+
LINTRUNNER=""
89+
OS_VERSION=24.04
90+
GCC_VERSION=14
91+
;;
8792
*)
8893
echo "Invalid image name ${IMAGE_NAME}"
8994
exit 1
@@ -92,18 +97,6 @@ esac
9297
TORCH_VERSION=$(cat ci_commit_pins/pytorch.txt)
9398
BUILD_DOCS=1
9499

95-
# Pull channel + spec/url helpers out of torch_pin.py so install_pytorch.sh
96-
# (which runs inside the docker build, where torch_pin.py isn't available)
97-
# can decide between wheel install (test/release) and source build (nightly).
98-
# Self-hosted runners often have python3 but not the unversioned python alias.
99-
PYTHON_BIN=$(command -v python3 || command -v python)
100-
TORCH_PIN_HELPERS=$(cd ../.. && "$PYTHON_BIN" -c "from torch_pin import CHANNEL, torch_spec, torchaudio_spec, torchvision_spec, torch_index_url_base; print(CHANNEL); print(torch_spec()); print(torchaudio_spec()); print(torchvision_spec()); print(torch_index_url_base())")
101-
TORCH_CHANNEL=$(echo "${TORCH_PIN_HELPERS}" | sed -n '1p')
102-
TORCH_SPEC=$(echo "${TORCH_PIN_HELPERS}" | sed -n '2p')
103-
TORCHAUDIO_SPEC=$(echo "${TORCH_PIN_HELPERS}" | sed -n '3p')
104-
TORCHVISION_SPEC=$(echo "${TORCH_PIN_HELPERS}" | sed -n '4p')
105-
TORCH_INDEX_URL=$(echo "${TORCH_PIN_HELPERS}" | sed -n '5p')
106-
107100
# Copy requirements-lintrunner.txt from root to here
108101
cp ../../requirements-lintrunner.txt ./
109102

@@ -116,11 +109,6 @@ docker build \
116109
--build-arg "PYTHON_VERSION=${PYTHON_VERSION}" \
117110
--build-arg "MINICONDA_VERSION=${MINICONDA_VERSION}" \
118111
--build-arg "TORCH_VERSION=${TORCH_VERSION}" \
119-
--build-arg "TORCH_CHANNEL=${TORCH_CHANNEL}" \
120-
--build-arg "TORCH_SPEC=${TORCH_SPEC}" \
121-
--build-arg "TORCHAUDIO_SPEC=${TORCHAUDIO_SPEC}" \
122-
--build-arg "TORCHVISION_SPEC=${TORCHVISION_SPEC}" \
123-
--build-arg "TORCH_INDEX_URL=${TORCH_INDEX_URL}" \
124112
--build-arg "BUCK2_VERSION=${BUCK2_VERSION}" \
125113
--build-arg "LINTRUNNER=${LINTRUNNER:-}" \
126114
--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.11

.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: 1 addition & 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

.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: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -17,24 +17,6 @@ install_domains() {
1717
}
1818

1919
install_pytorch_and_domains() {
20-
if [ "${TORCH_CHANNEL}" != "nightly" ]; then
21-
# Test/release: install the published wheels directly. The specs and URL
22-
# are passed in as docker build args (computed from torch_pin.py by
23-
# .ci/docker/build.sh). RC wheels at /whl/test/ get re-uploaded under the
24-
# same version, so use --no-cache-dir there to avoid stale cache hits.
25-
local cache_flag=""
26-
if [ "${TORCH_CHANNEL}" = "test" ]; then
27-
cache_flag="--no-cache-dir"
28-
fi
29-
pip_install --force-reinstall ${cache_flag} \
30-
"${TORCH_SPEC}" "${TORCHVISION_SPEC}" "${TORCHAUDIO_SPEC}" \
31-
--index-url "${TORCH_INDEX_URL}/cpu"
32-
return
33-
fi
34-
35-
# Nightly: build pytorch from source against the pinned SHA in pytorch.txt
36-
# so we catch upstream regressions, then install audio/vision from the
37-
# commits that pytorch itself pins.
3820
git clone https://github.com/pytorch/pytorch.git
3921

4022
# Fetch the target commit
@@ -45,19 +27,14 @@ install_pytorch_and_domains() {
4527
chown -R ci-user .
4628

4729
export _GLIBCXX_USE_CXX11_ABI=1
48-
# PyTorch's FindARM.cmake hard-fails when the SVE+BF16 compile probe
49-
# doesn't pass — gcc-11 in this image is too old to accept the combined
50-
# NEON/SVE/bfloat16 intrinsics the probe exercises. Executorch's aarch64
51-
# runtime targets (phones, embedded) don't use SVE, so bypass the check.
52-
export BUILD_IGNORE_SVE_UNAVAILABLE=1
5330
# Then build and install PyTorch
5431
conda_run python setup.py bdist_wheel
5532
pip_install "$(echo dist/*.whl)"
5633

57-
# Defer to PyTorch's own pinned audio/vision commits.
58-
TORCHAUDIO_VERSION=$(cat .github/ci_commit_pins/audio.txt)
34+
# Grab the pinned audio and vision commits from PyTorch
35+
TORCHAUDIO_VERSION=release/2.11
5936
export TORCHAUDIO_VERSION
60-
TORCHVISION_VERSION=$(cat .github/ci_commit_pins/vision.txt)
37+
TORCHVISION_VERSION=release/0.26
6138
export TORCHVISION_VERSION
6239

6340
install_domains

.ci/docker/common/install_user.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77

88
set -ex
99

10+
# On Ubuntu 24.04, there is a `ubuntu` user with id=1000
11+
if id ubuntu >/dev/null && [[ "$(id -u ubuntu)" == 1000 ]]; then
12+
sudo userdel --remove ubuntu;
13+
fi
14+
1015
# Same as ec2-user
1116
echo "ci-user:x:1000:1000::/var/lib/ci-user:" >> /etc/passwd
1217
echo "ci-user:x:1000:" >> /etc/group

.ci/docker/ubuntu/Dockerfile

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,6 @@ ENV SCCACHE_S3_KEY_PREFIX executorch
6464
ENV SCCACHE_REGION us-east-1
6565

6666
ARG TORCH_VERSION
67-
ARG TORCH_CHANNEL
68-
ARG TORCH_SPEC
69-
ARG TORCHAUDIO_SPEC
70-
ARG TORCHVISION_SPEC
71-
ARG TORCH_INDEX_URL
7267
ARG SKIP_PYTORCH
7368
COPY ./common/install_pytorch.sh install_pytorch.sh
7469
COPY ./common/utils.sh utils.sh

.ci/scripts/download_hf_hub.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
#!/bin/bash
22

3+
# Disable HF Xet storage to avoid stalled downloads on CI runners
4+
export HF_HUB_DISABLE_XET=1
5+
36
# Function to download files from the Hugging Face Hub
47
# Arguments:
58
# 1. model_id: The Hugging Face repository ID (e.g., "organization/model_name")

0 commit comments

Comments
 (0)