Commit 294c328
authored
Bump PyTorch pin to 2.13 (#20967)
Summary
Bumps the ExecuTorch PyTorch pin to 2.13.0 and updates the matching
torchvision/source branch pins to 0.28/release/0.28.
Also syncs c10 headers from PyTorch release/2.13, bumps third-party/ao
to upstream commit 4aa810113, and pins source installs to
torchao==0.18.0.dev20260715 from the PyTorch nightly wheel index. The
torchao changes include pytorch/ao#4462 (Remove named tensor Dimname
overload reference), needed for PyTorch 2.13 trunk quantization flows.
Pins torchtune installs to 3c1872ace149f03ef4ffec765d3f0a5fd0399497 from
meta-pytorch/torchtune#2960 (Fix import error after torchao NF4Tensor move),
because the latest stable PyPI release and the available PyTorch
wheel-index torchtune versions still import torchao.dtypes.nf4tensor.
For Docker image builds, uses GCC/G++ for the PyTorch source build when
the image default C++ compiler is Clang older than 16. PyTorch 2.13
rejects Clang 12 during configure, while the clang12 image should keep
Clang 12 as its default compiler for ExecuTorch jobs.
Updates ExecuTorch's exportable NVFP4 quantization wrapper for the newer
torchao API: when per-tensor scaling is disabled, pass None to torchao's
nvfp4_quantize and serialize a scalar 1.0 tensor for ExecuTorch
dequantization.
For Metal MPS torchao kernels, keeps the nightly torchao wheel as the
default dependency but installs third-party/ao from the pinned submodule
when TORCHAO_BUILD_EXPERIMENTAL_MPS=1 is set, so the Metal jobs get
libtorchao_ops_mps_aten.dylib.
Adds the PyTorch 2.13 AOTI runtime aoti_torch_get_numel shim to
ExecuTorch's common and SlimTensor AOTI shims, including coverage for
the CUDA-Windows export path that links AOTInductor-generated wrappers.
Regenerates the checked-in CUDA-Windows aoti_cuda_shims.lib import
library so export-time wrapper links can resolve the new symbol.
Test Plan
python3 -m py_compile extension/llm/export/nvfp4.py
install_requirements.py torch_pin.py
bash -n .ci/docker/common/install_pytorch.sh
examples/models/llama/install_requirements.sh
c++ -std=c++17 -DC10_USING_CUSTOM_GENERATED_MACROS -I. -I..
-Iruntime/core/portable_type/c10 -c backends/aoti/common_shims_slim.cpp
-o /tmp/common_shims_slim.o
c++ -std=c++17 -DC10_USING_CUSTOM_GENERATED_MACROS -I. -I..
-Iruntime/core/portable_type/c10 -c backends/aoti/common_shims.cpp -o
/tmp/common_shims.o
nm -g backends/cuda/runtime/aoti_cuda_shims.lib | grep
aoti_torch_get_numel
git diff --check
Verified torchao 0.18.0.dev20260715 exists in PyTorch nightly
cpu/cu126/cu130/cu132 indexes.
Verified torchtune 0.6.1, 0.7.0+cpu, and 0.7.0.dev20250929+cpu still
import torchao.dtypes.nf4tensor; torchtune commit
3c1872ace149f03ef4ffec765d3f0a5fd0399497 imports NF4Tensor from
torchao.quantization.
.ci/scripts/compare_dirs.sh runtime/core/portable_type/c10/c10
/tmp/executorch-pytorch-c10-sync.hRGjXi/c10
.ci/scripts/compare_dirs.sh
runtime/core/portable_type/c10/torch/headeronly
/tmp/executorch-pytorch-c10-sync.hRGjXi/torch/headeronly
Note: could not run the failing XNNPACK export, Phi-4-mini aarch64 model
job, MLX NVFP4 job, Metal model artifact export, CUDA-Windows export, or
full Docker image build locally because this environment does not have
torch/docker configured for those CI paths.
This PR was authored with Claude.1 parent 5442036 commit 294c328
83 files changed
Lines changed: 469 additions & 181 deletions
File tree
- .ci
- docker
- ci_commit_pins
- common
- scripts
- .github/workflows
- backends
- aoti
- tests
- cuda
- runtime
- tests
- examples/models
- dinov2
- llama
- parakeet
- qwen3_5_moe
- sortformer
- voxtral_realtime
- extension/llm/export
- kernels
- optimized/cpu
- portable/cpu
- pattern
- util
- runtime
- core/portable_type/c10
- c10/util
- torch/headeronly/util
- kernel
- third-party
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
19 | 34 | | |
20 | 35 | | |
21 | 36 | | |
| |||
33 | 48 | | |
34 | 49 | | |
35 | 50 | | |
| 51 | + | |
36 | 52 | | |
37 | 53 | | |
38 | 54 | | |
39 | 55 | | |
40 | 56 | | |
41 | 57 | | |
42 | 58 | | |
43 | | - | |
| 59 | + | |
44 | 60 | | |
45 | 61 | | |
46 | 62 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
17 | 21 | | |
18 | 22 | | |
19 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
| 175 | + | |
175 | 176 | | |
176 | 177 | | |
177 | 178 | | |
178 | 179 | | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
179 | 183 | | |
180 | 184 | | |
181 | 185 | | |
182 | 186 | | |
183 | | - | |
184 | | - | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
185 | 192 | | |
186 | 193 | | |
187 | 194 | | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
188 | 200 | | |
189 | 201 | | |
190 | | - | |
| 202 | + | |
191 | 203 | | |
192 | 204 | | |
193 | 205 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | | - | |
| 110 | + | |
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| |||
178 | 178 | | |
179 | 179 | | |
180 | 180 | | |
181 | | - | |
| 181 | + | |
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
27 | 31 | | |
28 | 32 | | |
29 | 33 | | |
| |||
36 | 40 | | |
37 | 41 | | |
38 | 42 | | |
39 | | - | |
| 43 | + | |
40 | 44 | | |
41 | 45 | | |
42 | 46 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
161 | | - | |
| 161 | + | |
162 | 162 | | |
163 | 163 | | |
164 | | - | |
| 164 | + | |
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1006 | 1006 | | |
1007 | 1007 | | |
1008 | 1008 | | |
| 1009 | + | |
1009 | 1010 | | |
1010 | 1011 | | |
1011 | 1012 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
82 | 86 | | |
83 | 87 | | |
84 | 88 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
157 | 162 | | |
158 | 163 | | |
159 | 164 | | |
| |||
0 commit comments