Bump PyTorch pin to 2.13#20967
Open
JacobSzwejbka wants to merge 1 commit into
Open
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/20967
Note: Links to docs will display an error until the docs builds have been completed. ❌ 6 New Failures, 2 Unclassified FailuresAs of commit 91e7fb6 with merge base af62dce ( NEW FAILURES - The following jobs have failed:
UNCLASSIFIED FAILURES - DrCI could not classify the following jobs because the workflow did not run on the merge base. The failures may be pre-existing on trunk or introduced by this PR:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This PR needs a
|
3d847d6 to
b217a08
Compare
b217a08 to
0174fd5
Compare
0174fd5 to
0b30cac
Compare
0b30cac to
7e3efa5
Compare
7e3efa5 to
1a07e5d
Compare
1a07e5d to
d93a8a5
Compare
d93a8a5 to
a323b90
Compare
a323b90 to
3fd187b
Compare
285034d to
60f74f8
Compare
60f74f8 to
c61c28e
Compare
c61c28e to
59d0a6a
Compare
59d0a6a to
179fb16
Compare
179fb16 to
53d99c2
Compare
53d99c2 to
791b688
Compare
791b688 to
91e7fb6
Compare
psiddh
approved these changes
Jul 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.