torch breaking changes
Every breaking API change we have recorded in torch on PyPI: 103 breaking changes in 7 versions. Below are its newest 6 versions, removals and renames first, each with its source.
Newest change July 8, 2026

On this page
2.13.0
- Removed
The Bazel build files and CI jobs were removed. Build from source with the CMake/pip flow instead. github.com - Removed
PyTorch 2.13 no longer ships cp313t wheels. Free-threaded users should move to Python 3.14t. github.com - Removed
c10.StorageImpl.is_cow
Out-of-tree C++ backends calling is_cow must migrate to the new materializer API. github.com - Removed
c10.StorageImpl.maybe_materialize_cow
Out-of-tree C++ backends must register a materializer instead of calling this method. github.com - Removed
Tensor.align_as
Named tensor APIs are gone. Track dimensions by position instead. github.com - Removed
Tensor.align_to
Named tensor APIs are gone. Track dimensions by position instead. github.com - Removed
Tensor.names
Named tensor APIs are gone. Track dimensions by position instead. github.com - Removed
Tensor.refine_names
Named tensor APIs are gone. Track dimensions by position instead. github.com - Removed
Tensor.rename
Named tensor APIs are gone. Track dimensions by position instead. github.com - Removed
torch.align_tensors
Named tensor APIs are gone. Track dimensions by position instead. github.com
And 7 more in this version.
2.12.1
- Removed
Release v2.12.1 no longer ships binary builds for CPython 3.13t (free-threaded). Users on that Python version need another install path or a different Python version. github.com
2.12.0
- Behavior changed
Source builds with SVE enabled are now validated more strictly and may fail during CMake configuration. Fix the compiler/toolchain flags or disable SVE for that build. github.com - Behavior changed
MPS tensors are always allocated in unified memory now. Code relying on device-only placement may see different performance. github.com - Behavior changed
Compiled autograd with FSDP2 needs graph breaks around FSDP2 hooks, or compiled autograd must be disabled for the FSDP2 training step. github.com - Behavior changed
torch.distributed.nn.functional
Ops in torch.distributed.nn.functional now raise RuntimeError when called inside torch.compile. Migrate to the functional collectives API. github.com - Behavior changed
torch.linalg.cholesky_inverse
On CUDA this call uses the cuSolver implementation. Code relying on MAGMA-specific numerical behavior or performance may need review. github.com - Behavior changed
torch.linalg.cholesky_solve
On CUDA this call uses the cuSolver implementation. Code relying on MAGMA-specific numerical behavior or performance may need review. github.com - Behavior changed
torch.linalg.eigh
On CUDA this call uses the cuSolver implementation. Code relying on MAGMA-specific numerical behavior or performance may need review. github.com - Behavior changed
torch.linalg.lu_solve
On CUDA this call uses cuSolver/cuBLAS. Code relying on MAGMA-specific numerical behavior or performance may need review. github.com - Behavior changed
torch.utils.cpp_extension
The cpp_extension and cpp_builder utilities now build extensions as C++20. Extensions that assume C++17 may need updating. github.com - Default changed
torch._inductor.config.max_autotune_defer_layout_freezing
The 2.11 deferred layout freezing for max_autotune is off by default again. Set max_autotune_defer_layout_freezing to True to keep the deferred behavior. github.com
And 3 more in this version.
2.11.0
- Removed
Pre-built CUDA 12.8 and 12.9 binaries no longer support Volta GPUs such as V100. Volta users should install the CUDA 12.6 builds or build from source. github.com - Removed
torch.ao.quantization.pt2e
torch.ao.quantization.pt2e is gone from PyTorch. Install torchao and import the same APIs from torchao.quantization.pt2e. github.com - Removed
torch.ao.quantization.quantizer
The quantizer module is gone from PyTorch. Install torchao and import from torchao instead. github.com - Removed
torch.export.export_for_training
Use torch.export.export instead, which returns the same graph as the previous export_for_training. github.com - Removed
torch.nn.attention.varlen_attn
Causal attention is now expressed with window_size=(-1, 0) instead of is_causal=True. github.com - Removed
torch.onnx.export
Remove fallback=True or fallback=False from calls. Implement any fallback to the legacy exporter in your own code. github.com - Behavior changed
Plain pip install torch now pulls CUDA 13.0 wheels, which only support Turing and newer GPUs on Linux x86_64. Users with older drivers or GPUs must pass a CUDA 12.x index URL. github.com - Behavior changed
_PhiloxState.offset
Code that reads offset as an int must call .item(). Setting it requires a tensor. github.com - Behavior changed
_PhiloxState.seed
Code that reads seed as an int must call .item(). Setting it requires a tensor. github.com - Behavior changed
DebugInfoWriter
Debug info is now written under $XDG_CACHE_HOME/torch when that variable is set, instead of always under ~/.cache/torch. github.com
And 12 more in this version.
2.10.0
- Removed
nn.attention.flex_attention
Nested Jagged Tensor support was removed from nn.attention.flex_attention. github.com - Removed
torch.utils.data.datapipes.iter.grouping
The imports SHARDING_PRIORITIES and ShardingFilterIterDataPipe from torch.utils.data.datapipes.iter.grouping are no longer supported. Import them from torch.utils.data.datapipes.iter.sharding instead. github.com - Renamed
pytorch-triton
The package pytorch-triton was renamed to triton. github.com - Behavior changed
DeviceMesh._flatten
Implicit slicing of a flattened dim from the root mesh now emits a warning and will eventually be removed; keep your own bookkeeping of the flattened mesh. github.com - Behavior changed
Sampler
Custom samplers that use the data_source argument must be updated accordingly. github.com - Behavior changed
TORCH_CHECK_{COND}
TORCH_CHECK_{COND} behavior changed to be non-fatal, so error handling in C++ code may change. github.com - Behavior changed
torch.compile
The aot_eager backend may now give results that differ from before because extra compile-only decompositions no longer run. github.com - Behavior changed
torch.nn.functional.flex_attention
Using a sliced BlockMask in nn.functional.flex_attention now raises an error. github.com - Default changed
torch._inductor.config.combo_kernels
Turn on LOAF for OSS by default; behavior of compiled code may change. github.com - Default changed
torch.onnx.export
torch.onnx.export uses fallback=False by default; set fallback=True manually to keep 2.9 behavior. github.com
2.9.0
- Removed
MPS is only supported on macOS 14 or later, so older macOS versions such as Ventura can no longer use it with this release. github.com - Removed
The minimum Python version for PyTorch 2.9.0 is 3.10. Users on older Python must upgrade before installing. github.com - Removed
torch.compile
The experimental ONNX Runtime compile backend is no longer supported. github.com - Removed
torch.export.draft_export
The draft export fallback is no longer triggered automatically; set TORCH_ONNX_ENABLE_DRAFT_EXPORT=True to opt in. github.com - Removed
torch.export.export_for_training
Use torch.export.export instead; export_for_training is deleted. github.com - Removed
torch.onnx.dynamo_export
Use torch.onnx.export instead. github.com - Removed
torch.onnx.enable_fake_mode
The function is removed; dynamo=True exports use FakeTensors by default. github.com - Removed
torch.onnx.symbolic_caffe2
Caffe2 support in the ONNX exporter has ended and the module is removed. github.com - Removed
torch.onnx.symbolic_opsets
Private torch.onnx.symbolic_opsets functions can no longer be accessed; copy the source if needed. github.com - Removed
torch.onnx.verification
Deprecated members in torch.onnx.verification are removed. github.com
And 8 more in this version.
Check your code
These are the changes. To see which of them reach your code, scan a public repository, or have your coding agent call check_code with your manifest or lockfile over MCP. The API reads every change in every version, not only the newest. On Team and up, a fix pull request opens for the changes that reach a connected repository. Nothing merges or deploys.

Put your code on continuous management.
Scan a public repository now, or give your agent one line.
See how out of date your code is.
Tell your agent what changed since it was trained.
claude mcp add --transport http since https://api.since.dev/mcp