Skip to content

Commit 4bdb1cd

Browse files
authored
Merge branch 'main' into upload-javadoc
2 parents 8ff07ab + a3455d9 commit 4bdb1cd

File tree

3,054 files changed

+984360
-53315
lines changed

Some content is hidden

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

3,054 files changed

+984360
-53315
lines changed

.ci/docker/build.sh

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,19 @@ case "${IMAGE_NAME}" in
3737
ARM_SDK=yes
3838
CLANG_VERSION=12
3939
;;
40+
executorch-ubuntu-22.04-qnn-sdk)
41+
QNN_SDK=yes
42+
CLANG_VERSION=12
43+
;;
44+
executorch-ubuntu-22.04-mediatek-sdk)
45+
MEDIATEK_SDK=yes
46+
CLANG_VERSION=12
47+
;;
4048
executorch-ubuntu-22.04-clang12-android)
4149
LINTRUNNER=""
4250
CLANG_VERSION=12
4351
# From https://developer.android.com/ndk/downloads
44-
ANDROID_NDK_VERSION=r26c
52+
ANDROID_NDK_VERSION=r27b
4553
;;
4654
*)
4755
echo "Invalid image name ${IMAGE_NAME}"
@@ -72,6 +80,8 @@ docker build \
7280
--build-arg "LINTRUNNER=${LINTRUNNER:-}" \
7381
--build-arg "BUILD_DOCS=${BUILD_DOCS}" \
7482
--build-arg "ARM_SDK=${ARM_SDK:-}" \
83+
--build-arg "QNN_SDK=${QNN_SDK:-}" \
84+
--build-arg "MEDIATEK_SDK=${MEDIATEK_SDK:-}" \
7585
--build-arg "ANDROID_NDK_VERSION=${ANDROID_NDK_VERSION:-}" \
7686
-f "${OS}"/Dockerfile \
7787
"$@" \
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2024-05-15
1+
2024-12-16
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
aec9b2ab77389967ef39bb9c10662fd0fe3e185a
1+
27e35de6c288bffad1b4d18b393579c1d1a95547

.ci/docker/ci_commit_pins/torchao.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

.ci/docker/common/install_cache.sh

Lines changed: 45 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,26 @@ set -ex
1212
# shellcheck source=/dev/null
1313
source "$(dirname "${BASH_SOURCE[0]}")/utils.sh"
1414

15+
install_ubuntu() {
16+
echo "Preparing to build sccache from source"
17+
apt-get update
18+
# libssl-dev will not work as it is upgraded to libssl3 in Ubuntu-22.04.
19+
# Instead use lib and headers from OpenSSL1.1 installed in `install_openssl.sh``
20+
apt-get install -y cargo
21+
echo "Checking out sccache repo"
22+
git clone https://github.com/mozilla/sccache -b v0.8.2
23+
24+
cd sccache
25+
echo "Building sccache"
26+
cargo build --release
27+
cp target/release/sccache /opt/cache/bin
28+
echo "Cleaning up"
29+
cd ..
30+
rm -rf sccache
31+
apt-get remove -y cargo rustc
32+
apt-get autoclean && apt-get clean
33+
}
34+
1535
install_binary() {
1636
echo "Downloading sccache binary from S3 repo"
1737
curl --retry 3 https://s3.amazonaws.com/ossci-linux/sccache -o /opt/cache/bin/sccache
@@ -22,15 +42,33 @@ mkdir -p /opt/cache/bin
2242
sed -e 's|PATH="\(.*\)"|PATH="/opt/cache/bin:\1"|g' -i /etc/environment
2343
export PATH="/opt/cache/bin:$PATH"
2444

25-
# NB: Install the pre-built binary from S3 as building from source
26-
# https://github.com/pytorch/sccache has started failing mysteriously
27-
# in which sccache server couldn't start with the following error:
28-
# sccache: error: Invalid argument (os error 22)
29-
install_binary
45+
install_ubuntu
3046

3147
function write_sccache_stub() {
3248
BINARY=$1
33-
printf "#!/bin/sh\nif [ \$(env -u LD_PRELOAD ps -p \$PPID -o comm=) != sccache ]; then\n exec sccache %s \"\$@\"\nelse\n exec %s \"\$@\"\nfi" "$(which "${BINARY}")" "$(which "${BINARY}")" > "/opt/cache/bin/${BINARY}"
49+
if [ $1 == "gcc" ]; then
50+
# Do not call sccache recursively when dumping preprocessor argument
51+
# For some reason it's very important for the first cached nvcc invocation
52+
cat >"/opt/cache/bin/$1" <<EOF
53+
#!/bin/sh
54+
if [ "\$1" = "-E" ] || [ "\$2" = "-E" ]; then
55+
exec $(which $1) "\$@"
56+
elif [ \$(env -u LD_PRELOAD ps -p \$PPID -o comm=) != sccache ]; then
57+
exec sccache $(which $1) "\$@"
58+
else
59+
exec $(which $1) "\$@"
60+
fi
61+
EOF
62+
else
63+
cat >"/opt/cache/bin/$1" <<EOF
64+
#!/bin/sh
65+
if [ \$(env -u LD_PRELOAD ps -p \$PPID -o comm=) != sccache ]; then
66+
exec sccache $(which $1) "\$@"
67+
else
68+
exec $(which $1) "\$@"
69+
fi
70+
EOF
71+
fi
3472
chmod a+x "/opt/cache/bin/${BINARY}"
3573
}
3674

@@ -44,7 +82,7 @@ init_sccache() {
4482

4583
# NB: This function is adopted from PyTorch core at
4684
# https://github.com/pytorch/pytorch/blob/main/.ci/pytorch/common-build.sh
47-
as_ci_user sccache --stop-server > /dev/null 2>&1 || true
85+
as_ci_user sccache --stop-server >/dev/null 2>&1 || true
4886
rm -f "${SCCACHE_ERROR_LOG}" || true
4987

5088
# Clear sccache stats before using it

.ci/docker/common/install_clang.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ install_ubuntu() {
1313
apt-get install -y --no-install-recommends clang-"$CLANG_VERSION"
1414
apt-get install -y --no-install-recommends llvm-"$CLANG_VERSION"
1515
# Also require LLD linker from llvm and libomp to build PyTorch from source
16-
apt-get install -y lld "libomp-${CLANG_VERSION}-dev"
16+
apt-get install -y lld "libomp-${CLANG_VERSION}-dev" "libc++-${CLANG_VERSION}-dev"
1717

1818
# Use update-alternatives to make this version the default
1919
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-"$CLANG_VERSION" 50

.ci/docker/common/install_pytorch.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ install_pytorch_and_domains() {
2626

2727
chown -R ci-user .
2828

29-
export _GLIBCXX_USE_CXX11_ABI=0
29+
export _GLIBCXX_USE_CXX11_ABI=1
3030
# Then build and install PyTorch
3131
conda_run python setup.py bdist_wheel
3232
pip_install "$(echo dist/*.whl)"

.ci/docker/conda-env-ci.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
cmake=3.22.1
22
ninja=1.10.2
3+
libuv
4+
llvm-openmp
5+
pkg-config

.ci/docker/requirements-ci.txt

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
11
mpmath==1.3.0
2-
numpy==1.21.3; python_version == '3.10'
3-
numpy==1.23.2; python_version == '3.11'
4-
numpy; python_version >= '3.12'
2+
numpy>=2.0.0; python_version >= '3.10'
53
PyYAML==6.0.1
64
ruamel.yaml==0.17.32
75
sympy==1.12
86
timm==0.6.13
97
tomli==2.0.1
108
torchsr==1.0.4
11-
transformers==4.38.0
9+
transformers==4.47.1
1210
zstd==1.5.5.1
13-
pandas==2.0.3; python_version == '3.10'
14-
pandas; python_version >= '3.11'
11+
pandas>=2.2.2; python_version >= '3.10'
1512
pytest==7.2.0
1613
pytest-cov==4.1.0
1714
expecttest==0.1.6
@@ -24,7 +21,7 @@ sphinx-gallery==0.14.0
2421
breathe==4.34.0
2522
exhale==0.2.3
2623
docutils==0.16
27-
matplotlib==3.7.2
24+
matplotlib>=3.9.4
2825
# PyTorch Theme
2926
-e git+https://github.com/pytorch/pytorch_sphinx_theme.git#egg=pytorch_sphinx_theme
3027
myst-parser==0.18.1

.ci/docker/ubuntu/Dockerfile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ COPY ./common/utils.sh utils.sh
5757
RUN bash ./install_cache.sh && rm install_cache.sh utils.sh
5858
ENV SCCACHE_BUCKET ossci-compiler-cache-circleci-v2
5959
ENV SCCACHE_S3_KEY_PREFIX executorch
60+
ENV SCCACHE_REGION us-east-1
6061

6162
ARG TORCH_VERSION
6263
COPY ./common/install_pytorch.sh install_pytorch.sh
@@ -78,9 +79,10 @@ RUN if [ -n "${ANDROID_NDK_VERSION}" ]; then bash ./install_android.sh; fi
7879
RUN rm install_android.sh
7980

8081
ARG ARM_SDK
81-
COPY --chown=ci-user:ci-user ./arm /opt/arm
82-
# Set up ARM SDK if needed
83-
RUN if [ -n "${ARM_SDK}" ]; then git config --global user.email "[email protected]"; git config --global user.name "OSS CI"; bash /opt/arm/setup.sh --i-agree-to-the-contained-eula /opt/arm-sdk; chown -R ci-user:ci-user /opt/arm-sdk; fi
82+
83+
ARG QNN_SDK
84+
85+
ARG MEDIATEK_SDK
8486

8587
USER ci-user
8688
CMD ["bash"]

0 commit comments

Comments
 (0)