Skip to content

Commit e035498

Browse files
Merge branch 'main' into cmsis-pack-infrastructure
2 parents 266d50a + b094b0e commit e035498

1,991 files changed

Lines changed: 153594 additions & 26934 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: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,19 @@ 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
;;
87+
executorch-ubuntu-24.04-gcc14)
88+
LINTRUNNER=""
89+
OS_VERSION=24.04
90+
GCC_VERSION=14
91+
;;
92+
executorch-ubuntu-26.04-gcc15)
93+
LINTRUNNER=""
94+
OS_VERSION=26.04
95+
GCC_VERSION=15
96+
;;
8797
*)
8898
echo "Invalid image name ${IMAGE_NAME}"
8999
exit 1
@@ -92,17 +102,9 @@ esac
92102
TORCH_VERSION=$(cat ci_commit_pins/pytorch.txt)
93103
BUILD_DOCS=1
94104

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')
105+
if [[ -n "${GCC_VERSION:-}" && -z "${SKIP_PYTORCH:-}" ]]; then
106+
PYTORCH_BUILD_MAX_JOBS=6
107+
fi
106108

107109
# Copy requirements-lintrunner.txt from root to here
108110
cp ../../requirements-lintrunner.txt ./
@@ -116,11 +118,7 @@ docker build \
116118
--build-arg "PYTHON_VERSION=${PYTHON_VERSION}" \
117119
--build-arg "MINICONDA_VERSION=${MINICONDA_VERSION}" \
118120
--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}" \
121+
--build-arg "PYTORCH_BUILD_MAX_JOBS=${PYTORCH_BUILD_MAX_JOBS:-}" \
124122
--build-arg "BUCK2_VERSION=${BUCK2_VERSION}" \
125123
--build-arg "LINTRUNNER=${LINTRUNNER:-}" \
126124
--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: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ 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 -
19-
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
18+
curl --retry 3 --retry-all-errors -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo gpg --dearmor -o /usr/share/keyrings/yarn-archive-keyring.gpg
19+
echo "deb [signed-by=/usr/share/keyrings/yarn-archive-keyring.gpg] https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
2020

2121
apt-get update
2222
apt-get install -y --no-install-recommends yarn

.ci/docker/common/install_linter.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,3 @@ source "$(dirname "${BASH_SOURCE[0]}")/utils.sh"
1313
# NB: Install all linter dependencies, the caching of lintrunner init could be
1414
# done after Executorch becomes public
1515
pip_install -r requirements-lintrunner.txt
16-
17-
# 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
19-
chmod +x /opt/google-java-format

.ci/docker/common/install_pytorch.sh

Lines changed: 9 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,20 @@ 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
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
5336
# Then build and install PyTorch
5437
conda_run python setup.py bdist_wheel
5538
pip_install "$(echo dist/*.whl)"
5639

57-
# Defer to PyTorch's own pinned audio/vision commits.
58-
TORCHAUDIO_VERSION=$(cat .github/ci_commit_pins/audio.txt)
40+
# Grab the pinned audio and vision commits from PyTorch
41+
TORCHAUDIO_VERSION=release/2.11
5942
export TORCHAUDIO_VERSION
60-
TORCHVISION_VERSION=$(cat .github/ci_commit_pins/vision.txt)
43+
TORCHVISION_VERSION=release/0.27
6144
export TORCHVISION_VERSION
6245

6346
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

0 commit comments

Comments
 (0)