Skip to content

Commit b472c65

Browse files
Patch build and update hashes.
Co-authored-by: Robert Hardwick <Robert.Hardwick@arm.com>
1 parent c601cf6 commit b472c65

7 files changed

Lines changed: 76 additions & 74 deletions

File tree

ML-Frameworks/pytorch-aarch64/CHANGELOG.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,28 @@ where `YY` is the year, and `MM` the month of the increment.
88
## [unreleased]
99

1010
### Added
11-
- Adds PyTorch [PR][https://github.com/pytorch/pytorch/pull/144992] Enable fp16 linear layers in PyTorch via ACL
12-
- Adds PyTorch [PR](https://github.com/pytorch/pytorch/pull/167328) Build cpuinfo into c10 shared library
11+
- Adds PyTorch [PR #167720](https://github.com/pytorch/pytorch/pull/167720), to allow missing cutlass file
12+
if CUDA disabled.
13+
- Adds oneDNN [PR #4237](https://github.com/uxlfoundation/oneDNN/pull/4237), which improves cache
14+
blocking 4/8 inner blocks.
15+
- Adds PyTorch [PR](https://github.com/pytorch/pytorch/pull/167328) Build cpuinfo into c10 shared library.
16+
- Adds PyTorch [PR](https://github.com/pytorch/pytorch/pull/144992) Enable fp16 linear layers in PyTorch via ACL.
1317

1418
### Changed
19+
- Now building ACL with PyTorch `install_acl.sh` script.
20+
- PyTorch manylinux AArch64 builder image from `cpu-aarch64-a040006da76a51c4f660331e9abd3affe5a4bd81`
21+
to `cpu-aarch64-d8be0384e085f551506bd739678109fa0f5ee7ac`
22+
- Updates hashes for:
23+
- `PYTORCH_HASH` to `5ce4a8b49f9986b050a9f6fcc7dd4cf999baa509`, 2.10.0.dev20251112 from viable/strict, Nov 12th.
24+
- `IDEEP_HASH` to `927570638b237b0e39fb0626a868adffdbf70bbb`, from ideep_pytorch, October 20th.
25+
- `ONEDNN_HASH` to `80886d0559482dfe2019c2ae83eebd6d0d3a17d4`, from main, Nov 9th.
26+
- `TORCH_AO_HASH` to `17867e6788e4889b294449770f0275045384eab2`, from main, Nov 8th.
27+
- `KLEIDIAI_HASH` to `7bf4de9a56106f0fb0d57dfabeb4c7a2668deaf6`, v1.16.0 from main, Nov 10th.
28+
- Replaced `ACL_HASH=007264fa740de5723ebddef16b7bb3657692c088` with `ACL_VERSION=v52.6.0`, from main, October 31st.
29+
- Update `torchvision` from 0.25.0.dev20250923 to 0.25.0.dev20251104.
1530

1631
### Removed
32+
- Removes patches which are no longer required.
1733

1834
### Fixed
1935

ML-Frameworks/pytorch-aarch64/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ COPY $TORCH_AO_WHEEL /home/$DOCKER_USER/
102102
# and we usually don't need features from the nightlies.
103103
# Note: torchvision is pinned to a nightly build, this can be updated
104104
# at the next vision release, and the `--extra-index-url` removed.
105-
RUN pip install --pre torchvision==0.25.0.dev20250923 --index-url https://download.pytorch.org/whl/nightly/cpu --no-deps
105+
RUN pip install --pre torchvision==0.25.0.dev20251104 --index-url https://download.pytorch.org/whl/nightly/cpu --no-deps
106106

107107
# We need --no-deps because the torch version won't match the versions on torch*
108108
RUN pip install "$(basename "$TORCH_WHEEL")" --no-deps \

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

Lines changed: 31 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -30,21 +30,34 @@
3030
set -eux -o pipefail
3131

3232
PYTHON_VERSION="3.10"
33+
OPENBLAS_VERSION="v0.3.30"
34+
ACL_VERSION="v52.6.0"
3335

3436
# Specify DOCKER_IMAGE_MIRROR if you want to use a mirror of hub.docker.com
35-
IMAGE_NAME="${DOCKER_IMAGE_MIRROR:-}pytorch/manylinux2_28_aarch64-builder:cpu-aarch64-a040006da76a51c4f660331e9abd3affe5a4bd81"
37+
IMAGE_NAME="${DOCKER_IMAGE_MIRROR:-}pytorch/manylinux2_28_aarch64-builder:cpu-aarch64-d8be0384e085f551506bd739678109fa0f5ee7ac"
3638
TORCH_BUILD_CONTAINER_ID_FILE="${PWD}/.torch_build_container_id"
3739

3840
# Output dir for PyTorch wheel and other artifacts
3941
OUTPUT_DIR=${OUTPUT_DIR:-"${PWD}/results"}
40-
PYTORCH_FINAL_PACKAGE_DIR=$OUTPUT_DIR
4142

43+
# Where folders sit locally
4244
PYTORCH_HOST_DIR="${PWD}/pytorch"
4345
ACL_HOST_DIR="${PWD}/ComputeLibrary"
46+
OPENSSL_HOST_DIR="/opt/openssl"
47+
PYTORCH_FINAL_PACKAGE_DIR="${OUTPUT_DIR}"
4448

49+
# Where folders sit mounted in the container
4550
PYTORCH_ROOT=/pytorch
46-
UTILS="/utils"
47-
COMMON_UTILS="/common_utils"
51+
ACL_ROOT=/acl
52+
UTILS=/utils
53+
COMMON_UTILS=/common_utils
54+
55+
# Want a CPU build
56+
DESIRED_CUDA=cpu
57+
GPU_ARCH_TYPE=cpu-aarch64
58+
59+
# Affects the number of jobs used in install_acl.sh and install_openblas.sh
60+
NPROC=${NPROC:-$(nproc --ignore=2)}
4861

4962
if [ -f "$TORCH_BUILD_CONTAINER_ID_FILE" ]; then
5063
TORCH_BUILD_CONTAINER=$(cat $TORCH_BUILD_CONTAINER_ID_FILE)
@@ -55,26 +68,28 @@ else
5568
fi
5669

5770
if ! docker container inspect $TORCH_BUILD_CONTAINER >/dev/null 2>&1 ; then
58-
5971
# Based on environment used in pytorch/.github/workflows/_binary-build-linux.yml
6072
# and pytorch/.github/workflows/generated-linux-aarch64-binary-manywheel-nightly.yml
6173
TORCH_BUILD_CONTAINER=$(docker run -t -d \
74+
-e NPROC=${NPROC} \
75+
-e OPENBLAS_VERSION=${OPENBLAS_VERSION} \
76+
-e ACL_VERSION=${ACL_VERSION} \
6277
-e BINARY_ENV_FILE=/tmp/env \
6378
-e BUILD_ENVIRONMENT=linux-aarch64-binary-manywheel \
64-
-e DESIRED_CUDA=cpu \
65-
-e DESIRED_PYTHON=$PYTHON_VERSION \
79+
-e DESIRED_CUDA=${DESIRED_CUDA} \
80+
-e DESIRED_PYTHON=${PYTHON_VERSION} \
6681
-e GITHUB_ACTIONS=0 \
67-
-e GPU_ARCH_TYPE=cpu-aarch64 \
82+
-e GPU_ARCH_TYPE=${GPU_ARCH_TYPE} \
6883
-e PACKAGE_TYPE=manywheel \
69-
-e PYTORCH_FINAL_PACKAGE_DIR=$PYTORCH_FINAL_PACKAGE_DIR \
70-
-e PYTORCH_ROOT=$PYTORCH_ROOT \
84+
-e PYTORCH_FINAL_PACKAGE_DIR="${PYTORCH_FINAL_PACKAGE_DIR}" \
85+
-e PYTORCH_ROOT="${PYTORCH_ROOT}" \
7186
-e SKIP_ALL_TESTS=1 \
7287
-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'" \
73-
-e OPENSSL_ROOT_DIR=/opt/openssl \
74-
-e CMAKE_INCLUDE_PATH="/opt/openssl/include" \
88+
-e OPENSSL_ROOT_DIR="${OPENSSL_HOST_DIR}" \
89+
-e CMAKE_INCLUDE_PATH="${OPENSSL_HOST_DIR}/include" \
7590
-v "${PYTORCH_HOST_DIR}:${PYTORCH_ROOT}" \
7691
-v "${PYTORCH_FINAL_PACKAGE_DIR}:/artifacts" \
77-
-v "${ACL_HOST_DIR}:/ComputeLibrary" \
92+
-v "${ACL_HOST_DIR}:${ACL_ROOT}" \
7893
-v "${PWD}/utils:${UTILS}" \
7994
-v "${PWD}/../utils:${COMMON_UTILS}" \
8095
-w / \
@@ -83,14 +98,12 @@ if ! docker container inspect $TORCH_BUILD_CONTAINER >/dev/null 2>&1 ; then
8398
# Currently changes in these scripts will not be applied without a clean
8499
# build, which is not ideal for dev work. But we have to balance this with
85100
# extra time/network traffic when rebuilding many times.
86-
docker exec -t $TORCH_BUILD_CONTAINER bash -c $PYTORCH_ROOT/.circleci/scripts/binary_populate_env.sh
101+
docker exec -t $TORCH_BUILD_CONTAINER bash -c "$PYTORCH_ROOT/.circleci/scripts/binary_populate_env.sh"
87102
docker exec -t $TORCH_BUILD_CONTAINER bash -c "$PYTORCH_ROOT/.ci/aarch64_linux/aarch64_ci_setup.sh"
88103

89-
# Build a newer version of libgomp from source (see https://github.com/pytorch/pytorch/pull/152361)
90-
docker exec -t $TORCH_BUILD_CONTAINER bash -c "bash $PYTORCH_ROOT/.ci/docker/common/install_libgomp.sh"
91-
92104
# This must be in this if block because it cannot handle being called twice
93-
docker exec -t $TORCH_BUILD_CONTAINER bash -c "bash $UTILS/build_openblas.sh"
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"
94107

95108
echo "Storing torch build container id in $TORCH_BUILD_CONTAINER_ID_FILE for reuse: $TORCH_BUILD_CONTAINER"
96109
echo $TORCH_BUILD_CONTAINER > "$TORCH_BUILD_CONTAINER_ID_FILE"

ML-Frameworks/pytorch-aarch64/bump-sources.sh

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

33
# *******************************************************************************
4-
# Copyright 2024 Arm Limited and affiliates.
4+
# Copyright 2024-2025 Arm Limited and affiliates.
55
# SPDX-License-Identifier: Apache-2.0
66
#
77
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -42,13 +42,7 @@ function git-bump {
4242
)
4343
)
4444

45-
(
46-
cd ComputeLibrary
47-
git-bump main
48-
)
49-
5045
echo "Put this into your get-sources.sh file"
5146
echo PYTORCH_HASH=$(cd pytorch && git rev-parse HEAD)
5247
echo IDEEP_HASH=$(cd pytorch/third_party/ideep && git rev-parse HEAD)
5348
echo ONEDNN_HASH=$(cd pytorch/third_party/ideep/mkl-dnn && git rev-parse HEAD)
54-
echo ACL_HASH=$(cd ComputeLibrary && git rev-parse HEAD)

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

Lines changed: 23 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -20,62 +20,41 @@
2020
source ../utils/git-utils.sh
2121

2222
set -eux -o pipefail
23-
PYTORCH_HASH=45d9dcccc5bfb46a9eaca037270278bc3d7c95ea # 2.10.0.dev20250923 from viable/strict, September 23rd
24-
IDEEP_HASH=fd11055f4800ac89291e30b5387a79a1e6496aa6 # From ideep_pytorch, September 10th
25-
ONEDNN_HASH=9e8f619477469ed75d323d4915bf7a2513f01713 # From main, September 23rd
26-
ACL_HASH=531a4968cecb7b4fc0a3b65482e2c524289e087e # From main, September 23rd
27-
TORCH_AO_HASH=8e2ca35ea603349e71c2467e10fd371e34bf52bc # From main, September 23rd
28-
KLEIDIAI_HASH=bd2e6ae060014035e25bf4986be682762c446c2d # v1.14 from main
23+
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
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/152361 - Build libgomp (gcc-11) from source
36-
apply-github-patch pytorch/pytorch 7c54b6b07558c330ee2f95b4793edb3bfbb814c9
37-
apply-github-patch pytorch/pytorch 3e17ce1619b2d02543a619f6217919b5adb36123
38-
apply-github-patch pytorch/pytorch 2c884c2b580a93cd0b1e5eea36aa24e3acab91a9
39-
apply-github-patch pytorch/pytorch c4c280eb27859221159108356b7c91376202cdd8
40-
4135
# https://github.com/pytorch/pytorch/pull/160184 - Draft: separate reqs for manywheel build and pin
4236
# Note: as part of this patch, setuptools is pinned to ~= 78.1.1 which is not affected by
4337
# CVE-2025-47273 and CVE-2024-6345
4438
apply-github-patch pytorch/pytorch 4d344570e5a114fa522e3370c5d59161e2ed8619
4539

46-
# https://github.com/pytorch/pytorch/pull/158250 - Ingtegrate INT4→BF16 via KleidiAI, with fallback
47-
apply-github-patch pytorch/pytorch 7c55f2af0adf9ce62c2226e739a3c84902fe0048
48-
apply-github-patch pytorch/pytorch 8c27947566c85d44bc7dcd7189db5da608453bbb
49-
apply-github-patch pytorch/pytorch 15d78c833b032d3c76b70b12a5f2762fa87d2640
50-
apply-github-patch pytorch/pytorch 186cbcf641f99a301cb26013e8d74d444ad1dcb9
51-
apply-github-patch pytorch/pytorch a6128ce3a0d2080d80e6fa59061d6c085865376c
52-
apply-github-patch pytorch/pytorch 52ee4ddc9a5a9cec8793b1ffeb0d74113e3da417
53-
apply-github-patch pytorch/pytorch ab2a6760e4a4891accbacb9187cf3782cb4b55c3
54-
apply-github-patch pytorch/pytorch 93384233d166dccab5724f9d2e50b6eb3f47cbe6
55-
apply-github-patch pytorch/pytorch 9f6d435629dd251620a1e17b8baa6bc18997f8ab
56-
apply-github-patch pytorch/pytorch b68b7867a72fe2ef4c38f9a3cdd93693700a182e
57-
58-
# https://github.com/pytorch/pytorch/pull/161049 - optimised SVE exp_u20 implementation
59-
# based on Arm Optimised Routines - https://github.com/ARM-software/optimized-routines
60-
apply-github-patch pytorch/pytorch 3de5651bafcdabbc52d5205c0de3976188eba7fb
61-
62-
# https://github.com/pytorch/pytorch/pull/160080 - VLA Vectorized POC
63-
apply-github-patch pytorch/pytorch e84eabd4f9761362ba081512b2922b4f18c97d41
64-
apply-github-patch pytorch/pytorch a49982892480af69fae8bb19505b31b3304cda7a
65-
apply-github-patch pytorch/pytorch 6ca9dc026d8d65c575c880ebe8b678f724d609a1
66-
apply-github-patch pytorch/pytorch 3b92a1adfe40ca9c37e7db523eccaad4358d949c
67-
apply-github-patch pytorch/pytorch 0384f48daa4b27d155632329521128212dd6fda3
68-
apply-github-patch pytorch/pytorch bf4b0e8c41c75d9106e2e432c6b9a00319295930
69-
apply-github-patch pytorch/pytorch dae9a71d99faa19764c47c602cb92bbf72ca7260
70-
apply-github-patch pytorch/pytorch 8ac81dba2155808427ec3943c4d057f6b05b23d6
40+
# 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
7154

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

75-
# https://github.com/pytorch/pytorch/pull/164741 - Enable mimalloc on non-Windows platforms and
76-
# make default for AArch64 builds
77-
apply-github-patch pytorch/pytorch 9f6a4018f6e7d77d4ac974a38f68fbd7c8eef25c
78-
7958
# https://github.com/pytorch/pytorch/pull/144992 - Enable fp16 linear layers in PyTorch via ACL
8059
apply-github-patch pytorch/pytorch 00076d21ed6cd7df2a61165b1fb1d0a436f4e403
8160
apply-github-patch pytorch/pytorch 850db41fe6d33c6460740da781b40e009f04a47c
@@ -120,8 +99,9 @@ git-shallow-clone https://github.com/pytorch/pytorch.git $PYTORCH_HASH
12099
(
121100
cd mkl-dnn
122101
git fetch origin $ONEDNN_HASH && git clean -f && git checkout -f FETCH_HEAD
123-
# https://github.com/uxlfoundation/oneDNN/pull/3022 - cpu: aarch64: enable jit conv for 128
124-
apply-github-patch uxlfoundation/oneDNN b43cc9c4526c16a292860dadf34b3585b1f33531
102+
103+
# https://github.com/uxlfoundation/oneDNN/pull/4237 - cpu: aarch64: jit_reorder: cache blocking 4/8 inner blocks
104+
apply-github-patch uxlfoundation/oneDNN 8bdff1a2a6625432701363185a9bd34f7c22f241
125105
)
126106
)
127107
(
@@ -136,6 +116,4 @@ git-shallow-clone https://github.com/pytorch/pytorch.git $PYTORCH_HASH
136116
fi
137117
)
138118

139-
git-shallow-clone https://github.com/ARM-software/ComputeLibrary.git $ACL_HASH
140-
141119
git-shallow-clone https://github.com/pytorch/ao.git $TORCH_AO_HASH

ML-Frameworks/tensorflow-aarch64/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ where `YY` is the year, and `MM` the month of the increment.
1111
- Adds patch fixing CPUIDInfo initialization, re-enabling oneDNN+ACL path
1212

1313
### Changed
14+
- Updates TensorFlow hash to f40a10e064561ed66c03359c7751ccc5ae03dc4d, from nightly, Nov 10th
1415

1516
### Removed
1617

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=6aa8fd07270293b918255af5988aef45b844c5b4 # from nightly, September 22nd
24+
TENSORFLOW_HASH=f40a10e064561ed66c03359c7751ccc5ae03dc4d # from nightly, Nov 10th
2525

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

0 commit comments

Comments
 (0)