Skip to content

Commit 108ea47

Browse files
authored
Merge pull request #389 from jondea/remove-transitive-deps
pytorch: remove some unused transitive deps
2 parents 25bc41a + 473d7c0 commit 108ea47

2 files changed

Lines changed: 21 additions & 0 deletions

File tree

ML-Frameworks/pytorch-aarch64/CHANGELOG.md

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

1414
### Removed
15+
- Delete unused submodules of PyTorch's third-party modules.
1516

1617
### Fixed
1718

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

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,26 @@ git-shallow-clone https://github.com/pytorch/pytorch.git $PYTORCH_HASH
8484
# Not used for CPU only builds
8585
git rm third_party/cudnn_frontend
8686
git rm third_party/cutlass
87+
git rm third_party/flash-attention
8788
git rm third_party/NVTX
8889

8990
# Update submodules
9091
git submodule sync
9192
git submodule update --init --checkout --force --recursive --jobs=$(nproc)
93+
94+
# Remove deps that we don't need which come from third party. It would be nice to avoid
95+
# fetching completely, but this was tricky with git submodule update --init --checkout --force --recursive
96+
(
97+
cd third_party/fbgemm
98+
git rm external/cutlass
99+
git rm external/composable_kernel
100+
git rm -r fbgemm_gpu/experimental
101+
)
102+
(
103+
cd third_party/aiter
104+
git rm 3rdparty/composable_kernel
105+
)
106+
92107
(
93108
cd third_party/ideep
94109
git fetch origin $IDEEP_HASH && git clean -f && git checkout -f FETCH_HEAD
@@ -105,6 +120,11 @@ git-shallow-clone https://github.com/pytorch/pytorch.git $PYTORCH_HASH
105120
git fetch origin $KLEIDIAI_HASH && git clean -f && git checkout -f FETCH_HEAD
106121
)
107122

123+
# rebuild third_party/LICENSES_BUNDLED.txt after modifying PyTorch submodules if we can
124+
# this will also get done in PyTorch build too
125+
if command -v python3 >/dev/null 2>&1; then
126+
python3 third_party/build_bundled.py
127+
fi
108128
)
109129

110130
git-shallow-clone https://github.com/ARM-software/ComputeLibrary.git $ACL_HASH

0 commit comments

Comments
 (0)