Skip to content

Commit b8e249b

Browse files
Merge pull request #408 from puneetmatharu/bump-hashes-for-r25.12
Bump hashes for r25.12 and patch PyTorch build
2 parents 98012a0 + 892d51c commit b8e249b

6 files changed

Lines changed: 61 additions & 50 deletions

File tree

ML-Frameworks/pytorch-aarch64/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ where `YY` is the year, and `MM` the month of the increment.
1010
### Added
1111

1212
### Changed
13+
- Updates hashes for:
14+
- `PYTORCH_HASH` to `93fef4bd1dd265588863929e35d9ac89328d5695`, 2.10.0.dev20251124 from viable/strict, Nov 24th.
15+
- `IDEEP_HASH` to `3724bec97a77ce990e8c6dc5e595bb3beee75257`, from ideep_pytorch, Nov 24th.
16+
- `ONEDNN_HASH` to `0b8a866c009b03f322e6526d7c33cfec84a4a97a`, from main, Nov 25th.
17+
- `TORCH_AO_HASH` to `ab6bc89512d912c17a79ed8d4d709612d3e32884`, from main, Nov 25th.
18+
- `KLEIDIAI_HASH` to `94d6cc40689f44d308dbd57cb842e335fdd958f1`, v1.17.0 from main, Nov 17th.
1319

1420
### Removed
1521

ML-Frameworks/pytorch-aarch64/build-torch-ao-wheel.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# #!/bin/bash
1+
#!/bin/bash
22

33
# *******************************************************************************
44
# Copyright 2024-2025 Arm Limited and affiliates.

ML-Frameworks/pytorch-aarch64/build-wheel.sh

Lines changed: 37 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# #!/bin/bash
1+
#!/bin/bash
22

33
# *******************************************************************************
44
# Copyright 2024-2025 Arm Limited and affiliates.
@@ -23,16 +23,20 @@
2323
# The logic in this script should mirror the upstream build pipelines as closely
2424
# as possible, along with Tool-Solutions specific changes we want to test (e.g.
2525
# installing tbb) or improving local development in a way that doesn't affect
26-
# the result (e,.g. unsetting MAX_JOBS). Currently the upstream logic is defined
27-
# in pytorch/.github/workflows/_binary-build-linux.yml and
28-
# pytorch/.github/workflows/generated-linux-aarch64-binary-manywheel-nightly.yml
26+
# the result. Currently the upstream logic is defined in
27+
# pytorch/.github/workflows/_binary-build-linux.yml
28+
# and
29+
# pytorch/.github/workflows/generated-linux-aarch64-binary-manywheel-nightly.yml
2930

3031
set -eux -o pipefail
3132

3233
PYTHON_VERSION="3.10"
3334
OPENBLAS_VERSION="v0.3.30"
3435
ACL_VERSION="v52.6.0"
3536

37+
PYTHON_TAG="cp$(echo "$PYTHON_VERSION" | tr -d .)-cp$(echo "$PYTHON_VERSION" | tr -d .)"
38+
PYTHON_BIN="/opt/python/${PYTHON_TAG}/bin"
39+
3640
# Specify DOCKER_IMAGE_MIRROR if you want to use a mirror of hub.docker.com
3741
IMAGE_NAME="${DOCKER_IMAGE_MIRROR:-}pytorch/manylinux2_28_aarch64-builder:cpu-aarch64-d8be0384e085f551506bd739678109fa0f5ee7ac"
3842
TORCH_BUILD_CONTAINER_ID_FILE="${PWD}/.torch_build_container_id"
@@ -42,22 +46,21 @@ OUTPUT_DIR=${OUTPUT_DIR:-"${PWD}/results"}
4246

4347
# Where folders sit locally
4448
PYTORCH_HOST_DIR="${PWD}/pytorch"
45-
ACL_HOST_DIR="${PWD}/ComputeLibrary"
4649
OPENSSL_HOST_DIR="/opt/openssl"
47-
PYTORCH_FINAL_PACKAGE_DIR="${OUTPUT_DIR}"
50+
PYTORCH_FINAL_PACKAGE_HOST_DIR="${OUTPUT_DIR}"
4851

4952
# Where folders sit mounted in the container
5053
PYTORCH_ROOT=/pytorch
51-
ACL_ROOT=/acl
5254
UTILS=/utils
5355
COMMON_UTILS=/common_utils
56+
PYTORCH_FINAL_PACKAGE_DIR=/artifacts
5457

5558
# Want a CPU build
5659
DESIRED_CUDA=cpu
5760
GPU_ARCH_TYPE=cpu-aarch64
5861

5962
# Affects the number of jobs used in install_acl.sh and install_openblas.sh
60-
NPROC=${NPROC:-$(nproc --ignore=2)}
63+
MAX_JOBS=${MAX_JOBS:-$(nproc --ignore=2)}
6164

6265
if [ -f "$TORCH_BUILD_CONTAINER_ID_FILE" ]; then
6366
TORCH_BUILD_CONTAINER=$(cat $TORCH_BUILD_CONTAINER_ID_FILE)
@@ -71,7 +74,7 @@ if ! docker container inspect $TORCH_BUILD_CONTAINER >/dev/null 2>&1 ; then
7174
# Based on environment used in pytorch/.github/workflows/_binary-build-linux.yml
7275
# and pytorch/.github/workflows/generated-linux-aarch64-binary-manywheel-nightly.yml
7376
TORCH_BUILD_CONTAINER=$(docker run -t -d \
74-
-e NPROC=${NPROC} \
77+
-e MAX_JOBS=${MAX_JOBS} \
7578
-e OPENBLAS_VERSION=${OPENBLAS_VERSION} \
7679
-e ACL_VERSION=${ACL_VERSION} \
7780
-e BINARY_ENV_FILE=/tmp/env \
@@ -84,12 +87,10 @@ if ! docker container inspect $TORCH_BUILD_CONTAINER >/dev/null 2>&1 ; then
8487
-e PYTORCH_FINAL_PACKAGE_DIR="${PYTORCH_FINAL_PACKAGE_DIR}" \
8588
-e PYTORCH_ROOT="${PYTORCH_ROOT}" \
8689
-e SKIP_ALL_TESTS=1 \
87-
-e PYTORCH_EXTRA_INSTALL_REQUIREMENTS="nvidia-cuda-nvrtc-cu12==12.1.105; platform_system == 'Linux' and platform_machine == 'x86_64' | nvidia-cuda-runtime-cu12==12.1.105; platform_system == 'Linux' and platform_machine == 'x86_64' | nvidia-cuda-cupti-cu12==12.1.105; platform_system == 'Linux' and platform_machine == 'x86_64' | nvidia-cudnn-cu12==8.9.2.26; platform_system == 'Linux' and platform_machine == 'x86_64' | nvidia-cublas-cu12==12.1.3.1; platform_system == 'Linux' and platform_machine == 'x86_64' | nvidia-cufft-cu12==11.0.2.54; platform_system == 'Linux' and platform_machine == 'x86_64' | nvidia-curand-cu12==10.3.2.106; platform_system == 'Linux' and platform_machine == 'x86_64' | nvidia-cusolver-cu12==11.4.5.107; platform_system == 'Linux' and platform_machine == 'x86_64' | nvidia-cusparse-cu12==12.1.0.106; platform_system == 'Linux' and platform_machine == 'x86_64' | nvidia-nccl-cu12==2.19.3; platform_system == 'Linux' and platform_machine == 'x86_64' | nvidia-nvtx-cu12==12.1.105; platform_system == 'Linux' and platform_machine == 'x86_64'" \
8890
-e OPENSSL_ROOT_DIR="${OPENSSL_HOST_DIR}" \
8991
-e CMAKE_INCLUDE_PATH="${OPENSSL_HOST_DIR}/include" \
9092
-v "${PYTORCH_HOST_DIR}:${PYTORCH_ROOT}" \
91-
-v "${PYTORCH_FINAL_PACKAGE_DIR}:/artifacts" \
92-
-v "${ACL_HOST_DIR}:${ACL_ROOT}" \
93+
-v "${PYTORCH_FINAL_PACKAGE_HOST_DIR}:${PYTORCH_FINAL_PACKAGE_DIR}" \
9394
-v "${PWD}/utils:${UTILS}" \
9495
-v "${PWD}/../utils:${COMMON_UTILS}" \
9596
-w / \
@@ -98,36 +99,44 @@ if ! docker container inspect $TORCH_BUILD_CONTAINER >/dev/null 2>&1 ; then
9899
# Currently changes in these scripts will not be applied without a clean
99100
# build, which is not ideal for dev work. But we have to balance this with
100101
# extra time/network traffic when rebuilding many times.
101-
docker exec -t $TORCH_BUILD_CONTAINER bash -c "$PYTORCH_ROOT/.circleci/scripts/binary_populate_env.sh"
102-
docker exec -t $TORCH_BUILD_CONTAINER bash -c "$PYTORCH_ROOT/.ci/aarch64_linux/aarch64_ci_setup.sh"
102+
docker exec $TORCH_BUILD_CONTAINER bash "${PYTORCH_ROOT}/.circleci/scripts/binary_populate_env.sh"
103+
104+
# Install scons for ACL build
105+
docker exec $TORCH_BUILD_CONTAINER ${PYTHON_BIN}/python3 -m pip install scons==4.7.0
106+
docker exec $TORCH_BUILD_CONTAINER ln -sf ${PYTHON_BIN}/scons /usr/local/bin
103107

104-
# This must be in this if block because it cannot handle being called twice
105-
docker exec -t $TORCH_BUILD_CONTAINER bash -c "bash $PYTORCH_ROOT/.ci/docker/common/install_acl.sh"
106-
docker exec -t $TORCH_BUILD_CONTAINER bash -c "bash $PYTORCH_ROOT/.ci/docker/common/install_openblas.sh"
108+
# Affected by ACL_VERSION set as an environment variable above
109+
echo "Overriding Arm Compute Library version: ${ACL_VERSION}"
110+
docker exec "$TORCH_BUILD_CONTAINER" "${PYTORCH_ROOT}/.ci/docker/common/install_acl.sh"
107111

108-
echo "Storing torch build container id in $TORCH_BUILD_CONTAINER_ID_FILE for reuse: $TORCH_BUILD_CONTAINER"
109-
echo $TORCH_BUILD_CONTAINER > "$TORCH_BUILD_CONTAINER_ID_FILE"
112+
# Affected by OPENBLAS_VERSION set as an environment variable above
113+
echo "Installing OpenBLAS version: ${OPENBLAS_VERSION}"
114+
docker exec "$TORCH_BUILD_CONTAINER" "${PYTORCH_ROOT}/.ci/docker/common/install_openblas.sh"
115+
116+
echo "Storing torch build container ID in ${TORCH_BUILD_CONTAINER_ID_FILE} for reuse: ${TORCH_BUILD_CONTAINER}"
117+
echo $TORCH_BUILD_CONTAINER > "${TORCH_BUILD_CONTAINER_ID_FILE}"
110118
else
111119
docker restart $TORCH_BUILD_CONTAINER
112120
fi
113121

114122
# If there are multiple wheels in the dist directory, an old wheel can be
115123
# erroneously copied to results, so we clear the directory to be sure
116-
docker exec -t $TORCH_BUILD_CONTAINER bash -c "rm -rf $PYTORCH_ROOT/dist"
124+
docker exec $TORCH_BUILD_CONTAINER rm -rf "${PYTORCH_ROOT}/dist"
117125

118126
# We set OVERRIDE_PACKAGE_VERSION to be based on the date of the latest torch
119127
# commit, this allows us to also install the matching torch* packages, set in
120128
# the Dockerfile. This is what PyTorch does in its nightly pipeline, see
121129
# pytorch/.ci/aarch64_linux/aarch64_wheel_ci_build.py for this logic.
122130
build_date=$(cd $PYTORCH_HOST_DIR && git log --pretty=format:%cs -1 | tr -d '-')
123-
version=$(cat $PYTORCH_HOST_DIR/version.txt| tr -d [:space:] )
131+
version=$(cat $PYTORCH_HOST_DIR/version.txt| tr -d "[:space:]" )
124132
OVERRIDE_PACKAGE_VERSION="${version%??}.dev${build_date}${TORCH_RELEASE_ID:+"+$TORCH_RELEASE_ID"}"
125-
# We unset MAX_JOBS from 12 (written to /tmp/env by populate_binary_env.sh) to
126-
# let any downstream functions to decide. Currently nproc when ninja is used,
127-
# but ideally we would let ninja make the right choice, but nproc is good enough
128-
docker exec -t $TORCH_BUILD_CONTAINER \
129-
bash -c "source /tmp/env && unset MAX_JOBS && OVERRIDE_PACKAGE_VERSION=$OVERRIDE_PACKAGE_VERSION bash $PYTORCH_ROOT/.ci/aarch64_linux/aarch64_ci_build.sh"
133+
134+
docker exec $TORCH_BUILD_CONTAINER bash -lc "
135+
source /tmp/env &&
136+
BUILD_TEST=0 \
137+
OVERRIDE_PACKAGE_VERSION=$OVERRIDE_PACKAGE_VERSION \
138+
bash ${PYTORCH_ROOT}/.ci/manywheel/build.sh
139+
"
130140

131141
# directories generated by the docker container are owned by root, so transfer ownership to user
132-
docker exec $TORCH_BUILD_CONTAINER chown -R $(id -u):$(id -g) $PYTORCH_ROOT
133-
docker exec $TORCH_BUILD_CONTAINER chown -R $(id -u):$(id -g) /artifacts
142+
docker exec $TORCH_BUILD_CONTAINER chown -R "$(id -u)":"$(id -g)" "${PYTORCH_ROOT}" /artifacts

ML-Frameworks/pytorch-aarch64/get-source.sh

Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -21,36 +21,31 @@ source ../utils/git-utils.sh
2121

2222
set -eux -o pipefail
2323

24-
PYTORCH_HASH=5ce4a8b49f9986b050a9f6fcc7dd4cf999baa509 # 2.10.0.dev20251112 from viable/strict, Nov 12th
25-
IDEEP_HASH=927570638b237b0e39fb0626a868adffdbf70bbb # From ideep_pytorch, October 20th
26-
ONEDNN_HASH=80886d0559482dfe2019c2ae83eebd6d0d3a17d4 # From main, Nov 9th
27-
TORCH_AO_HASH=17867e6788e4889b294449770f0275045384eab2 # From main, Nov 8th
28-
KLEIDIAI_HASH=7bf4de9a56106f0fb0d57dfabeb4c7a2668deaf6 # v1.16.0 from main, Nov 10th
24+
PYTORCH_HASH=93fef4bd1dd265588863929e35d9ac89328d5695 # 2.10.0.dev20251124 from viable/strict, Nov 24th
25+
IDEEP_HASH=3724bec97a77ce990e8c6dc5e595bb3beee75257 # From ideep_pytorch, Nov 24th
26+
ONEDNN_HASH=0b8a866c009b03f322e6526d7c33cfec84a4a97a # From main, Nov 25th
27+
TORCH_AO_HASH=ab6bc89512d912c17a79ed8d4d709612d3e32884 # From main, Nov 25th
28+
KLEIDIAI_HASH=94d6cc40689f44d308dbd57cb842e335fdd958f1 # v1.17.0 from main, Nov 17th
2929

3030
git-shallow-clone https://github.com/pytorch/pytorch.git $PYTORCH_HASH
3131
(
3232
# Apply patches to PyTorch build
3333
cd pytorch
3434

35-
# https://github.com/pytorch/pytorch/pull/160184 - Draft: separate reqs for manywheel build and pin
35+
# https://github.com/pytorch/pytorch/pull/167829 - Refactor ACL and OpenBLAS install scripts on AArch64
3636
# Note: as part of this patch, setuptools is pinned to ~= 78.1.1 which is not affected by
3737
# CVE-2025-47273 and CVE-2024-6345
38-
apply-github-patch pytorch/pytorch 4d344570e5a114fa522e3370c5d59161e2ed8619
38+
apply-github-patch pytorch/pytorch 69db12b465887df96d27fe2bb93746ac334577f1
39+
apply-github-patch pytorch/pytorch 5184c373a8bc77809b6e59361e191d4e78d6a824
40+
41+
# FIXME: Temporarily disabled; to be updated in a later PR
42+
# # https://github.com/pytorch/pytorch/pull/160184 - Draft: separate reqs for manywheel build and pin
43+
# # Note: as part of this patch, setuptools is pinned to ~= 78.1.1 which is not affected by
44+
# # CVE-2025-47273 and CVE-2024-6345
45+
# apply-github-patch pytorch/pytorch 4d344570e5a114fa522e3370c5d59161e2ed8619
3946

4047
# https://github.com/pytorch/pytorch/pull/167720 - Allow missing cutlass file if CUDA disabled
41-
apply-github-patch pytorch/pytorch 18f9ef2fe29b10b385f25eb6c98e3ac06227d2d9
42-
43-
# https://github.com/pytorch/pytorch/pull/158250 - Integrate INT4→BF16 via KleidiAI, with fallback
44-
apply-github-patch pytorch/pytorch a9ec9d509167bfd33cbcd168cb40d183acf9c13a
45-
apply-github-patch pytorch/pytorch 67f1076366b88c6617256236020b58da00665ed4
46-
apply-github-patch pytorch/pytorch 99c57644d5d8a9359b6b98ac7bb96787ac594606
47-
apply-github-patch pytorch/pytorch a770fb9a9786d7ce39a3b066809fa8c0de7d47d5
48-
apply-github-patch pytorch/pytorch 30dd7406155c51b033b5e8a9c5a453fa59599db8
49-
apply-github-patch pytorch/pytorch 00b919af8e7bb50f52ec45fdad09304d4104464a
50-
apply-github-patch pytorch/pytorch fe40a60d7ad506aab016e66b53fdf0fc4f83b7a1
51-
apply-github-patch pytorch/pytorch 89fc01183127da738fc3723747f7bf0721fe9e09
52-
apply-github-patch pytorch/pytorch 23b4c39348426914cf3e6770dfaff0745245976c
53-
apply-github-patch pytorch/pytorch c5e778f5d4cac56b9d96f666c3082aab244e662f
48+
apply-github-patch pytorch/pytorch 6fbbfe712d89895824e466a4e3ae6a0f35626078
5449

5550
# https://github.com/pytorch/pytorch/pull/159859 - PoC LUT optimisation for GELU bf16 operators
5651
apply-github-patch pytorch/pytorch ebcc874e317f9563ab770fc5c27df969e0438a5e

ML-Frameworks/tensorflow-aarch64/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ where `YY` is the year, and `MM` the month of the increment.
1010
### Added
1111

1212
### Changed
13+
- Updates TensorFlow hash to 5d46b65af45d5694cb1676bc872d24a4a64a6b57, from nightly, Nov 25th
1314

1415
### Removed
1516

ML-Frameworks/tensorflow-aarch64/get-source.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ source ../utils/git-utils.sh
2121

2222
set -eux -o pipefail
2323

24-
TENSORFLOW_HASH=f40a10e064561ed66c03359c7751ccc5ae03dc4d # from nightly, Nov 10th
24+
TENSORFLOW_HASH=5d46b65af45d5694cb1676bc872d24a4a64a6b57 # from nightly, Nov 25th
2525

2626
git-shallow-clone https://github.com/tensorflow/tensorflow.git $TENSORFLOW_HASH
2727

0 commit comments

Comments
 (0)