Skip to content

Commit 5e20f7d

Browse files
authored
Merge pull request #329 from nSircombe/feature/may_updates
Add option for auth. GitHub access and update CHANGELOGS for 25.05
2 parents 54ed07c + 7bfcdfb commit 5e20f7d

7 files changed

Lines changed: 64 additions & 24 deletions

File tree

ML-Frameworks/pytorch-aarch64/CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,21 @@ where `YY` is the year, and `MM` the month of the increment.
77

88
## [unreleased]
99

10+
### Added
11+
12+
### Changed
13+
14+
### Removed
15+
16+
### Fixed
17+
18+
### [r25.04] 2025-05-18
19+
https://github.com/ARM-software/Tool-Solutions/tree/r25.05
20+
1021
### Added
1122
- WIP patch to build a newer version of libgomp from source - https://github.com/pytorch/pytorch/pull/152361
1223
Improve scaling for >16 threads.
24+
- Support for authenticated GitHub access in apply-github-patch
1325

1426
### Changed
1527
- Updates hashes for:

ML-Frameworks/pytorch-aarch64/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ You can then test your changes by installing the wheel in a virtual environment
5454
of your choice or use `./dockerize.sh <name-of-wheel>` to launch a container
5555
with the wheel installed (along with examples).
5656

57+
Note: if the environment variable `GITHUB_TOKEN` is set then the build will
58+
attemmpt to use `GITHUB_TOKEN` for authenticated access when downloading WIP patches.
59+
This can avoid issues with rate-limiting on annonymous access.
60+
5761
### Flags useful for development
5862
- `--use-existing-sources` skips `get-source.sh` and just builds
5963
- `--force` overwrites sources

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

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,15 @@ git-shallow-clone https://github.com/pytorch/pytorch.git $PYTORCH_HASH
3030
(
3131
cd pytorch
3232

33-
apply-github-patch pytorch/pytorch 143190 6e5628b1f648d862e8fdd150ad277120b236ed15 # Enable AArch64 CI scripts to be used for local dev
34-
apply-github-patch pytorch/pytorch 140159 ca4a718be80eb88ca6804b91201e4f98a3e236c8 # cpu: enable gemm-bf16f32 for SDPA BF16
35-
apply-github-patch pytorch/pytorch 140159 406fe1fbd066401774c104d125a7ac0b3d6eb52b
36-
apply-github-patch pytorch/pytorch 152361 7c54b6b07558c330ee2f95b4793edb3bfbb814c9 # Build libgomp (gcc-11) from source
37-
apply-github-patch pytorch/pytorch 150833 02987a7c2e9b249a669723224c8d3cd80c6cb64e # Pin all root requirements to major versions
33+
# https://github.com/pytorch/pytorch/pull/143190 - Enable AArch64 CI scripts to be used for local dev
34+
apply-github-patch pytorch/pytorch 6e5628b1f648d862e8fdd150ad277120b236ed15
35+
# https://github.com/pytorch/pytorch/pull/140159 - cpu: enable gemm-bf16f32 for SDPA BF16
36+
apply-github-patch pytorch/pytorch ca4a718be80eb88ca6804b91201e4f98a3e236c8
37+
apply-github-patch pytorch/pytorch 406fe1fbd066401774c104d125a7ac0b3d6eb52b
38+
# https://github.com/pytorch/pytorch/pull/152361 - Build libgomp (gcc-11) from source
39+
apply-github-patch pytorch/pytorch 7c54b6b07558c330ee2f95b4793edb3bfbb814c9
40+
# https://github.com/pytorch/pytorch/pull/150833 - Pin all root requirements to major versions
41+
apply-github-patch pytorch/pytorch 02987a7c2e9b249a669723224c8d3cd80c6cb64e
3842

3943
git submodule sync
4044
git submodule update --init --checkout --force --recursive --jobs=$(nproc)
@@ -45,19 +49,22 @@ git-shallow-clone https://github.com/pytorch/pytorch.git $PYTORCH_HASH
4549
(
4650
cd mkl-dnn
4751
git fetch origin $ONEDNN_HASH && git clean -f && git checkout -f FETCH_HEAD
48-
apply-github-patch uxlfoundation/oneDNN 3022 4a00e92b995388192e666ee332554e4ef65b484a # cpu: aarch64: enable jit conv for 128
52+
# https://github.com/uxlfoundation/oneDNN/pull/3922 - cpu: aarch64: enable jit conv for 128
53+
apply-github-patch uxlfoundation/oneDNN 4a00e92b995388192e666ee332554e4ef65b484a
4954
)
5055
)
5156
)
5257

5358
git-shallow-clone https://review.mlplatform.org/ml/ComputeLibrary $ACL_HASH
5459
(
5560
cd ComputeLibrary
56-
apply-gerrit-patch https://review.mlplatform.org/c/ml/ComputeLibrary/+/12818/1 # perf: Improve gemm_interleaved 2D vs 1D blocking heuristic
61+
# Improve gemm_interleaved 2D vs 1D blocking heuristic
62+
apply-gerrit-patch https://review.mlplatform.org/c/ml/ComputeLibrary/+/12818/1
5763
)
5864

5965
git-shallow-clone https://github.com/pytorch/ao.git $TORCH_AO_HASH
6066
(
6167
cd ao
62-
apply-github-patch pytorch/ao 1447 738d7f2c5a48367822f2bf9d538160d19f02341e # [Feat]: Add support for kleidiai quantization schemes
68+
# https://github.com/pytorch/ao/pull/1447 - Add support for kleidiai quantization schemes
69+
apply-github-patch pytorch/ao 738d7f2c5a48367822f2bf9d538160d19f02341e
6370
)

ML-Frameworks/tensorflow-aarch64/CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,18 @@ where `YY` is the year, and `MM` the month of the increment.
1515

1616
### Fixed
1717

18+
#### [r25.04] 2025-05-18
19+
https://github.com/ARM-software/Tool-Solutions/tree/r25.05
20+
21+
### Added
22+
- Support for authenticated GitHub access in apply-github-patch
23+
24+
### Changed
25+
26+
### Removed
27+
28+
### Fixed
29+
1830
## [r25.04] 2025-04-16
1931
https://github.com/ARM-software/Tool-Solutions/tree/r25.04
2032

ML-Frameworks/tensorflow-aarch64/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ You can then test your changes by installing the wheel in a virtual environment
5454
of your choice or use `./dockerize.sh <name-of-wheel>` to launch a container
5555
with the wheel installed (along with examples).
5656

57+
Note: if the environment variable `GITHUB_TOKEN` is set then the build will
58+
attemmpt to use `GITHUB_TOKEN` for authenticated access when downloading WIP patches.
59+
This can avoid issues with rate-limiting on annonymous access.
60+
5761
## Motivation
5862
TensorFlow + oneDNN + ComputeLibrary is a deep stack. The purpose of
5963
`tensorflow-aarch64` is to let us see the future of that stack, so that we can:

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ git-shallow-clone https://github.com/tensorflow/tensorflow.git $TENSORFLOW_HASH
3737
cd tensorflow
3838

3939
# Apply TensorFlow WIP patches here
40-
apply-github-patch tensorflow/tensorflow 84975 1ca7978322313cd62733075ea354f2af5d1e54a0 # build(aarch64): Update to oneDNN-3.7 + ACL-24.12
40+
# https://github.com/tensorflow/tensorflow/pull/84975 - build(aarch64): Update to oneDNN-3.7 + ACL-24.12
41+
apply-github-patch tensorflow/tensorflow 1ca7978322313cd62733075ea354f2af5d1e54a0
4142

4243
cd tensorflow
4344

@@ -68,7 +69,8 @@ git-shallow-clone https://github.com/tensorflow/tensorflow.git $TENSORFLOW_HASH
6869

6970
# Apply WIP patches here
7071
cd oneDNN
71-
apply-github-patch uxlfoundation/oneDNN 2958 ce72a428594c58e925de38c5eb6fea725fe9d0ff # cpu: aarch64: default num_threads to max for acl_threadpool
72+
# https://github.com/uxlfoundation/oneDNN/pull/2958 - set default num_threads to max for acl_threadpool
73+
apply-github-patch uxlfoundation/oneDNN ce72a428594c58e925de38c5eb6fea725fe9d0ff
7274
)
7375

7476
# ACL patches

ML-Frameworks/utils/git-utils.sh

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -35,26 +35,25 @@ function git-shallow-clone {
3535
}
3636

3737
function apply-github-patch {
38-
# Apply a specific commit from a specific GitHub PR
39-
# $1 is 'organisation/repo', $2 is the PR number, and $3 is commit hash
40-
set -u
38+
# Apply a specific GitHub commit.
39+
# $1 is 'organisation/repo', $2 is the commit hash
40+
# To use an API token, which may avoid rate limits, set the environment variable GITHUB_TOKEN
4141

42-
local github_url='https://github.com'
42+
set -u
4343

44-
# Look in the PR first
45-
curl --silent -L $github_url/$1/pull/$2/commits/$3.patch -o $3.patch
44+
local github_api_url='https://api.github.com/repos'
45+
local github_url='https://github.com'
4646

47-
# If the PR has been updated, the commit may no longer be there and the .patch will be empty.
48-
# Look in the full repo instead.
49-
# If it can't be found, this time curl will error
50-
if [[ ! -s $3.patch ]]; then
51-
>&2 echo "Commit $3 not found in $1/pull/$2. Checking the full repository..."
52-
curl --silent --fail -L $github_url/$1/commit/$3.patch -o $3.patch
47+
# Download the .patch file.
48+
if [ -n "$GITHUB_TOKEN" ]; then
49+
curl --silent -H "Authorization: token $GITHUB_TOKEN" -H "Accept: application/vnd.github.v3.patch" -L $github_api_url/$1/commits/$2 -o $2.patch
50+
else
51+
curl --silent -L $github_url/$1/commit/$2.patch -o $2.patch
5352
fi
5453

5554
# Apply the patch and tidy up.
56-
patch -p1 < $3.patch
57-
rm $3.patch
55+
patch -p1 < $2.patch
56+
rm $2.patch
5857
return 0
5958
}
6059

0 commit comments

Comments
 (0)