# PyTorch changelog
> Tensor and neural-network library for Python and C++, with GPU acceleration and eager execution.
- Vendor: PyTorch Foundation
- Category: AI
- Official site: https://pytorch.org
- Tracked by: What's New (https://whatsnew.fyi/product/pytorch)
- Harvested from: GitHub (pytorch/pytorch)
- Entries below: 10 (newest first)
What's New is an index, not a publisher: every entry below links to the vendor's own release notes, which are the authoritative source. Entries are labelled where they are hand-curated sample data, pre-releases, or drawn from a secondary source such as a developer blog.
## Releases
### v2.13.0 — PyTorch 2.13.0 Release
- Date: 2026-07-08
- Version: v2.13.0
- Original notes: https://github.com/pytorch/pytorch/releases/tag/v2.13.0
- Permalink: https://whatsnew.fyi/product/pytorch/releases/v2.13.0
#### PyTorch 2.13.0 Release Notes
- [Highlights](#highlights)
- [Backwards Incompatible Changes](#backwards-incompatible-changes)
- [Deprecations](#deprecations)
- [New Features](#new-features)
- [Improvements](#improvements)
- [Bug fixes](#bug-fixes)
- [Performance](#performance)
- [Documentation](#documentation)
- [Developers](#developers)
#### Highlights
| FlexAttention lands on Apple Silicon (MPS), with up to ~12x speedup over SDPA on sparse patterns, and gains a deterministic backward path on CUDA for reproducible gradient computation. |
| CuTeDSL "Native DSL" backend gives Inductor a second high-performance code path (alongside Triton) for key GPU operations, with faster compilation. [Prototype] |
nn.LinearCrossEntropyLoss combines the final prediction and loss computation to cut peak GPU memory by up to 4x for large-vocabulary language model training. |
| torchcomms, a new communications backend for PyTorch Distributed, improves fault tolerance, scalability, and debuggability for large-cluster training. |
| FSDP2 now overlaps reduce-scatter and all-gather communications via a dedicated process group (opt-in), increasing distributed training throughput. |
| Python 3.15 wheel support for PyTorch on Linux via the pytorch repository index, including builds compatible with free-threaded 3.15t. |
Broader platform support: ROCm gains AOTriton 0.12b with native HIP CMake, Arm adds Armv9-A torch.compile targeting, and Intel XPU exposes new device telemetry APIs. |
For more details about these highlighted features, you can look at the release blogpost. Below are the full release notes for this release.
#### Tracked Regressions
###### ROCm wheels break `torch.compile` on CPU in environments without a GPU
Running a `torch==2.13.0+rocm7.2` wheel in an environment where no GPU is available (`torch.cuda.is_available()` is `False`) breaks `torch.compile` on the CPU path: the first compile raises `RuntimeError: Can't detect vectorized ISA for CPU` ([#189194](https://github.com/pytorch/pytorch/issues/189194)). This is a regression from `torch==2.12.1+rocm7.2`, which compiles CPU code fine (detecting e.g. `VecAVX2`) in the same setup. The 2.13 ROCm wheel appears to rely on something present in the ROCm builder image to detect the CPU vectorized ISA, so it works when run on a ROCm image but fails on a plain CPU-only image.
Workaround: run the `+rocm` wheel on a ROCm image, or install a standard CPU/CUDA build for GPU-less environments.
#### Backwards Incompatible Changes
- Stop building CPython 3.13t (free-threaded) binaries (#182951)
Upstream `pypa/manylinux` removed CPython 3.13t (free-threaded) on 2026-05-07, because 3.13t
was experimental and has been superseded by the now-non-experimental CPython 3.14t. As a result,
PyTorch 2.13 no longer ships `cp313t` wheels (Linux, Triton, and related artifacts). Users on the
free-threaded interpreter should move to Python 3.14t.
PyTorch 2.12:
```bash
# cp313t (free-threaded 3.13) wheels were available
python3.13t -m pip install torch
```
PyTorch 2.13:
```bash
# Use free-threaded Python 3.14t instead
python3.14t -m pip install torch
```
- Bare `PyObject` is no longer allowed in operator schemas (#184209)
Bare `PyObject` was accidentally accepted in operator schema strings in
PyTorch 2.12. This was undocumented and is now rejected, since `torch.compile`
does not support arbitrary `PyObject` inputs to custom ops. If
you parse or register a schema with a bare `PyObject` argument or return type,
you will now get a schema parse error.
PyTorch 2.12:
```python
>>> from torch._C import parse_schema
>>> parse
_[Truncated at 4000 characters — full notes: https://github.com/pytorch/pytorch/releases/tag/v2.13.0]_
### v2.12.1 — PyTorch 2.12.1 Release, bug fix release
- Date: 2026-06-18
- Version: v2.12.1
- Original notes: https://github.com/pytorch/pytorch/releases/tag/v2.12.1
- Permalink: https://whatsnew.fyi/product/pytorch/releases/v2.12.1
This release is meant to fix the following regressions and silent correctness issues:
##### Regression fixes
- Fix nondeterministic outputs in test_batch_invariance with FLASH_ATTN on NVIDIA B200 GPUs ([#181248](https://github.com/pytorch/pytorch/issues/181248)), fixed by updating Triton to 3.7.1 ([#186814](https://github.com/pytorch/pytorch/pull/186814))
- Fix illegal memory access in the Triton convolution2d_bwd_weight kernel on B100/B200 (sm100) GPUs ([#187081](https://github.com/pytorch/pytorch/issues/187081)), fixed by updating Triton to 3.7.1 ([#186814](https://github.com/pytorch/pytorch/pull/186814))
- Fix fill_ on byte-dtype views with misaligned storage offset ([#186821](https://github.com/pytorch/pytorch/pull/186821))
##### Releng / Build
- Drop CPython 3.13t from the binary build matrix ([#182951](https://github.com/pytorch/pytorch/pull/182951))
### v2.12.0 — PyTorch 2.12.0 Release
- Date: 2026-05-13
- Version: v2.12.0
- Original notes: https://github.com/pytorch/pytorch/releases/tag/v2.12.0
- Permalink: https://whatsnew.fyi/product/pytorch/releases/v2.12.0
#### PyTorch 2.12.0 Release Notes
- [Highlights](#highlights)
- [Backwards Incompatible Changes](#backwards-incompatible-changes)
- [Deprecations](#deprecations)
- [New Features](#new-features)
- [Improvements](#improvements)
- [Bug fixes](#bug-fixes)
- [Performance](#performance)
- [Documentation](#documentation)
- [Developers](#developers)
- [Security](#security)
#### Highlights
| Batched linalg.eigh on CUDA is up to 100x faster due to updated cuSolver backend selection. |
| New torch.accelerator.Graph API unifies graph capture and replay across CUDA, XPU, and out-of-tree backends. |
| torch.export.save now supports Microscaling (MX) quantization formats, enabling full export of aggressively compressed models. |
Adagrad now supports fused=True, joining Adam, AdamW, and SGD with a single-kernel optimizer implementation. |
| torch.cond control flow can now be captured and replayed inside CUDA Graphs. |
| ROCm users gain expandable memory segments, rocSHMEM symmetric memory collectives, and FlexAttention pipelining. |
For more details about these highlighted features, you can look at the release blogpost. Below are the full release notes for this release.
#### Backwards Incompatible Changes
##### Build Frontend
- Strengthened SVE compile checks in `FindARM.cmake`, which may reject previously accepted but incorrect SVE configurations ([#176646](https://github.com/pytorch/pytorch/pull/176646))
Source builds that enable SVE now validate the compiler configuration more strictly. If a build previously passed with an incomplete or mismatched SVE setup, it may now fail during CMake configuration instead of later in compilation. Update the compiler/toolchain flags so they accurately describe the target SVE support, or disable SVE for that build.
- Updated the minimum CUDA version required to build PyTorch from source to CUDA 12.6 ([#178925](https://github.com/pytorch/pytorch/pull/178925))
Building PyTorch from source with CUDA versions older than 12.6 is no longer supported. Users building custom binaries should install CUDA 12.6 or newer and make sure `CUDA_HOME` points to that installation.
Version 2.11:
```bash
CUDA_HOME=/usr/local/cuda-12.4 python setup.py develop
```
Version 2.12:
```bash
CUDA_HOME=/usr/local/cuda-12.6 python setup.py develop
```
- Enforced a C++20 minimum in CMake build files ([#178662](https://github.com/pytorch/pytorch/pull/178662))
Source builds now require a compiler and build configuration that support C++20. If you maintain custom build scripts or downstream extensions that build PyTorch from source, update the compiler and remove assumptions that PyTorch can be built as C++17.
##### Distributed
- `torch.distributed.nn.functional` ops now raise `RuntimeError` under `torch.compile` ([#177342](https://github.com/pytorch/pytorch/pull/177342))
All ops in `torch.distributed.nn.functional` (e.g., `broadcast`, `all_reduce`, `all_gather`, `reduce_scatter`, `all_to_all_single`) now raise `RuntimeError` when called inside `torch.compile`. Users should migrate to the functional collectives API in `torch.distributed._functional_collectives`.
Version 2.11:
```python
@torch.compile
def my_func(x):
return torch.distributed.nn.functional.all_reduce(x, op=ReduceOp.SUM)
```
Version 2.12:
```python
@torch.compile
def my_func(x):
return torch.distributed._functional_collectives.all_reduce(x, reduceOp="sum", group=group)
```
##### TorchElastic
- `torchrun` now defaults to an OS-assigned free port for single-node training instead of port 29500 ([#175699](https://github.com/pytorch/pytorch/pull/175699))
When running `torchrun --nproc-per-node=N script
_[Truncated at 4000 characters — full notes: https://github.com/pytorch/pytorch/releases/tag/v2.12.0]_
### v2.11.0 — PyTorch 2.11.0 Release
- Date: 2026-03-23
- Version: v2.11.0
- Original notes: https://github.com/pytorch/pytorch/releases/tag/v2.11.0
- Permalink: https://whatsnew.fyi/product/pytorch/releases/v2.11.0
#### PyTorch 2.11.0 Release Notes
- [Highlights](#highlights)
- [Backwards Incompatible Changes](#backwards-incompatible-changes)
- [Deprecations](#deprecations)
- [New Features](#new-features)
- [Improvements](#improvements)
- [Bug fixes](#bug-fixes)
- [Performance](#performance)
- [Documentation](#documentation)
- [Developers](#developers)
- [Security](#security)
#### Highlights
Python 3.14 support for torch.compile(). Python 3.14t (freethreaded build) is experimentally supported as well.
|
| Reduced kernel launch overhead with combo-kernels horizontal fusion in torchinductor |
| A new varlen_attn() op providing support for ragged and packed sequences |
| Efficient eigenvalue decompositions with DnXgeev |
torch.compile() now respects use_deterministic_mode |
| DebugMode for tracking dispatched calls and debugging numerical divergence - This makes it simpler to track down subtle numerical bugs. |
| Intel GPUs support: Expand PyTorch support to the latest Panther Lake on Windows and Linux by enabling FP8 (core ops and scaled matmul) and complex MatMul support, and extending SYCL support in the C++ Extension API for Windows custom ops. |
For more details about these highlighted features, you can look at the [release blogpost](https://pytorch.org/blog/pytorch-2-10-release-blog/). Below are the full release notes for this release.
#### Backwards Incompatible Changes
##### Dataloader Frontend
- Removed unused `data_source` argument from Sampler ([#163134](https://github.com/pytorch/pytorch/pull/163134)). This is a no-op, unless you have a custom sampler that uses this argument. Please update your custom sampler accordingly.
- Removed deprecated imports for torch.utils.data.datapipes.iter.grouping ([#163438](https://github.com/pytorch/pytorch/pull/163438)). `from torch.utils.data.datapipes.iter.grouping import SHARDING_PRIORITIES, ShardingFilterIterDataPipe` is no longer supported. Please import from `torch.utils.data.datapipes.iter.sharding` instead.
##### torch.nn
- Remove Nested Jagged Tensor support from `nn.attention.flex_attention` ([#161734](https://github.com/pytorch/pytorch/pull/161734))
##### ONNX
- `fallback=False` is now the default in `torch.onnx.export` ([#162726](https://github.com/pytorch/pytorch/pull/162726))
- The exporter now uses the `dynamo=True` option without fallback. This is the recommended way to use the ONNX exporter. To preserve 2.9 behavior, manually set `fallback=True` in the `torch.onnx.export` call.
##### Release Engineering
- Rename pytorch-triton package to triton ([#169888](https://github.com/pytorch/pytorch/pull/169888))
#### Deprecations
##### Distributed
- DeviceMesh
- Added a warning for slicing flattened dim from root mesh and types for _get_slice_mesh_layout ([#164993](https://github.com/pytorch/pytorch/pull/164993))
We decided to deprecate an existing behavior which goes against the PyTorch design principle (explicit over implicit) for device mesh slicing of flattened dim.
###### Version <2.9
```python
import torch
from torch.distributed.device_mesh import
device_type = (
acc.type
if (acc := torch.accelerator.current_accelerator(check_available=True))
else "cpu"
)
mesh_shape = (2, 2, 2)
mesh_3d = init_device_mesh(
device_type, mesh_shape, mesh_dim_names=("dp", "cp", "tp")
)
mesh_3d["dp", "cp"]._flatten()
mesh_3["dp_cp"] # This comes with no warning
```
###### Version >=2.10
```python
import torch
from torch.distributed.device_mesh import
device_type = (
acc.type
if (acc := torch.accelerator.current_accelerator(chec
_[Truncated at 4000 characters — full notes: https://github.com/pytorch/pytorch/releases/tag/v2.10.0]_
### v2.9.1 — PyTorch 2.9.1 Release, bug fix release
- Date: 2025-11-12
- Version: v2.9.1
- Original notes: https://github.com/pytorch/pytorch/releases/tag/v2.9.1
- Permalink: https://whatsnew.fyi/product/pytorch/releases/v2.9.1
This release is meant to fix the following issues (regressions / silent correctness):
###### Tracked Regressions
Significant Memory Regression in F.conv3d with bfloat16 Inputs in PyTorch 2.9.0 ([#166643](https://github.com/pytorch/pytorch/issues/166643))
This release provides work around this issue. If you are impacted please install nvidia-cudnn package version 9.15+ from pypi. ([#166480](https://github.com/pytorch/pytorch/pull/166480)) ([#167111](https://github.com/pytorch/pytorch/pull/167111))
###### Torch.compile
Fix Inductor bug when compiling Gemma ([#165601](https://github.com/pytorch/pytorch/pull/165601))
Fix InternalTorchDynamoError in bytecode_transformation ([#166036](https://github.com/pytorch/pytorch/pull/166036))
Fix silent correctness error_on_graph_break bug where non-empty checkpoint results in unwanted graph break resumption ([#166586](https://github.com/pytorch/pytorch/pull/166586))
Improve performance by avoiding recompilation with mark_static_address with cudagraphs ([#162208](https://github.com/pytorch/pytorch/pull/162208))
Improve performance by caching get_free_symbol_uses in torch inductor ([#166338](https://github.com/pytorch/pytorch/pull/166338))
Fix fix registration design for inductor graph partition for vLLM ([#166458](https://github.com/pytorch/pytorch/pull/166458)) ([#165815](https://github.com/pytorch/pytorch/pull/165815)) ([#165514](https://github.com/pytorch/pytorch/pull/165514))
Fix warning spamming in torch.compile ([#166993](https://github.com/pytorch/pytorch/pull/166993))
Fix exception related to uninitialized tracer_output variable ([#163169](https://github.com/pytorch/pytorch/pull/163169))
Fix crash in torch.bmm and torch.compile with PyTorch release 2.9.0 ([#166457](https://github.com/pytorch/pytorch/pull/166457))
###### Other
Fix warning spamming on new APIs to control TF32 behavior ([#166956](https://github.com/pytorch/pytorch/pull/166956))
Fix distributed crash with non-contiguous gather inputs ([#166181](https://github.com/pytorch/pytorch/pull/166181))
Fix indexing on large tensor causes invalid configuration argument ([#166974](https://github.com/pytorch/pytorch/pull/166974))
Fix numeric issue in CUDNN_ATTENTION ([#166912](https://github.com/pytorch/pytorch/pull/166912)) ([#166570](https://github.com/pytorch/pytorch/pull/166570))
Fix symmetric memory issue with fused_scaled_matmul_reduce_scatter ([#165086](https://github.com/pytorch/pytorch/pull/165086))
Improve libtorch stable ABI documentation ([#163899](https://github.com/pytorch/pytorch/pull/163899))
Fix image display on pypi project description section ([#166404](https://github.com/pytorch/pytorch/pull/166404))
### v2.9.0 — 2.9 Release Notes
- Date: 2025-10-15
- Version: v2.9.0
- Original notes: https://github.com/pytorch/pytorch/releases/tag/v2.9.0
- Permalink: https://whatsnew.fyi/product/pytorch/releases/v2.9.0
#### PyTorch 2.9.0 Release Notes
- [Highlights](#highlights)
- [Backwards Incompatible Changes](#backwards-incompatible-changes)
- [Deprecations](#deprecations)
- [New Features](#new-features)
- [Improvements](#improvements)
- [Bug fixes](#bug-fixes)
- [Performance](#performance)
- [Documentation](#documentation)
- [Developers](#developers)
- [Security](#security)
#### Highlights
| Unstable (API-Unstable) |
| Updates to the stable libtorch ABI for third-party C++/CUDA extensions |
| Symmetric memory that enables easy programming of multi-GPU kernels |
| The ability to arbitrarily toggle error or resume on graph breaks in torch.compile |
| Expanded wheel variant support to include ROCm, XPU and CUDA 13 |
| FlexAttention enablement on Intel GPUs |
| Flash decoding optimization based on FlexAttention on X86 CPU |
| ARM Platform improvements and optimizations |
| Enablement of Linux aarch64 binary wheel builds across all supported CUDA versions |
For more details about these highlighted features, you can look at the [release blogpost](https://pytorch.org/blog/pytorch-2-9/). Below are the full release notes for this release.
#### Backwards Incompatible Changes
##### Min supported Python version is now 3.10 (#162310)
The minimum version of Python required for PyTorch 2.9.0 is 3.10. We also have 3.14 and 3.14t available as preview with this release.
##### Undefined behavior when an output of a custom operator shares storage with an input
This is a reminder that outputs of PyTorch custom operators (that are registered using the `torch.library` or `TORCH_LIBRARY` APIs) are not allowed to return Tensors that share storage with input tensors. The violation of this condition leads to undefined behavior: sometimes the result will be correct, sometimes it will be garbage.
After [#163227](https://github.com/pytorch/pytorch/pull/163227), custom operators that violated this condition that previously returned correct results under `torch.compile` may now return silently incorrect results under `torch.compile`. Because this is changing the behavior of undefined behavior, we do not consider this to be a bug, but we are still documenting it in this section as a "potentially unexpected behavior change".
This is one of the conditions checked for by [`torch.library.opcheck`](https://docs.pytorch.org/docs/stable/library.html#testing-custom-ops) and is mentioned in [The Custom Operators Manual](https://docs.google.com/document/d/1_W62p8WJOQQUzPsJYa7s701JXt0qf2OfLub2sbkHOaU/edit?tab=t.0#bookmark=id.4c0um7xkba6e)
###### More details
Outputs of PyTorch custom operators are not allowed to return Tensors that share storage with input tensors
For example, the following two custom operators are not valid custom operators:
```py
@torch.library.custom_op("mylib::foo", mutates_args=())
def foo(x: torch.Tensor) -> torch.Tensor:
# the result of `foo` must not directly be an input to foo.
return x
@torch.library.custom_op("mylib::bar", mutates_args=())
def bar(x: torch.Tensor) -> torch.Tensor:
# the result of bar must not be a view of an input of bar
return x.view(-1)
```
The easiest workaround is to add an extra `.clone()` to the outputs:
```py
@torch.library.custom_op("mylib::foo", mutates_args=())
def foo(x: torch.Tensor) -> torch.Tensor:
return x.clone()
@torch.library.custom_op("mylib::bar", mutates_args=())
def bar(x: torch.Tensor) -> torch.Tensor:
return x.view(-1).clone()
```
A common way to get into this situation is for a user to want to create a custom operator that sometimes mutates the input in-place and sometimes returns a new Tensor, like in the following example.
```py
@torch.
_[Truncated at 4000 characters — full notes: https://github.com/pytorch/pytorch/releases/tag/v2.9.0]_
### v2.8.0 — PyTorch 2.8.0 Release
- Date: 2025-08-06
- Version: v2.8.0
- Original notes: https://github.com/pytorch/pytorch/releases/tag/v2.8.0
- Permalink: https://whatsnew.fyi/product/pytorch/releases/v2.8.0
#### PyTorch 2.8.0 Release Notes
- [Highlights](#highlights)
- [Backwards Incompatible Changes](#backwards-incompatible-changes)
- [Deprecations](#deprecations)
- [New Features](#new-features)
- [Improvements](#improvements)
- [Bug fixes](#bug-fixes)
- [Performance](#performance)
- [Documentation](#documentation)
- [Developers](#developers)
#### Highlights
| Unstable |
| torch::stable::Tensor |
| High-performance quantized LLM inference on Intel CPUs with native PyTorch |
| Experimental Wheel Variant Support |
| Inductor CUTLASS backend support |
| Inductor Graph Partition for CUDAGraph |
| Control Flow Operator Library |
| HuggingFace SafeTensors support in PyTorch Distributed Checkpointing |
| SYCL support in PyTorch CPP Extension API |
| A16W4 on XPU Device |
| Hierarchical compilation with torch.compile |
| Intel GPU distributed backend (XCCL) support |
For more details about these highlighted features, you can look at the [release blogpost](https://pytorch.org/blog/pytorch-2-8/).
Below are the full release notes for this release.
#### Tracked Regressions
###### Windows wheel builds with CUDA 12.9.1 stack overflow during build (#156181)
Due to a bug introduced in CUDA 12.9.1, we are unable to complete full Windows wheel builds with this
version, as compilation of `torch.segment_reduce()` crashes the build. Thus, we provide a wheel
without `torch.segment_reduce()` included in order to sidestep the issue. If you need support
for `torch.segment_reduce()`, please utilize a different version.
#### Backwards Incompatible Changes
##### CUDA Support
###### Removed support for Maxwell and Pascal architectures with CUDA 12.8 and 12.9 builds (#157517, #158478, #158744)
Due to binary size limitations, support for sm50 - sm60 architectures with CUDA 12.8 and 12.9 has
been dropped for the 2.8.0 release. If you need support for these architectures, please utilize
CUDA 12.6 instead.
##### Python Frontend
###### Calling an op with an input dtype that is unsupported now raises `NotImplementedError` instead of `RuntimeError` (#155470)
Please update exception handling logic to reflect this.
In 2.7.0
```
try:
torch.nn.Hardshrink()(torch.randint(0, 5, (10,)))
except RuntimeError:
...
```
In 2.8.0
```
try:
torch.nn.Hardshrink()(torch.randint(0, 5, (10,)))
except NotImplementedError:
...
```
###### Added missing in-place on view check to custom `autograd.Function` (#153094)
In 2.8.0, if a custom `autograd.Function` mutates a view of a leaf requiring grad,
it now properly raises an error. Previously, it would silently leak memory.
```
class Func(torch.autograd.Function):
@staticmethod
def forward(ctx, inp):
inp.add_(1)
ctx.mark_dirty(inp)
return inp
@staticmethod
def backward(ctx, gO):
pass
a = torch.tensor([1.0, 2.0], requires_grad=True)
b = a.view_as(a)
Func.apply(b)
```
Output:
Version 2.7.0
```
Runs without error, but leaks memory
```
Version 2.8.0
```
RuntimeError: a view of a leaf Variable that requires grad is being used in an in-place operation
```
###### An error is now properly thrown for the out variant of `tensordot` when called with a `requires_grad=True` tensor (#150270)
Please avoid passing an out tensor with `requires_grad=True` as gradients cannot be
computed for this tensor.
In 2.7.0
```
a = torch.empty((4, 2), requires_grad=True)
b = torch.empty((2, 4), requires_grad=True)
c = torch.empty((2, 2), requires_grad=True)
#### does not error, but gradients for c cannot be comp
_[Truncated at 4000 characters — full notes: https://github.com/pytorch/pytorch/releases/tag/v2.8.0]_
### v2.7.1 — PyTorch 2.7.1 Release, bug fix release
- Date: 2025-06-04
- Version: v2.7.1
- Original notes: https://github.com/pytorch/pytorch/releases/tag/v2.7.1
- Permalink: https://whatsnew.fyi/product/pytorch/releases/v2.7.1
This release is meant to fix the following issues (regressions / silent correctness):
###### Torch.compile
Fix Excessive cudagraph re-recording for HF LLM models ([#152287](https://github.com/pytorch/pytorch/pull/152287))
Fix torch.compile on some HuggingFace models ([#151154](https://github.com/pytorch/pytorch/pull/151154))
Fix crash due to Exception raised inside torch.autocast ([#152503](https://github.com/pytorch/pytorch/pull/152503))
Improve Error logging in torch.compile ([#149831](https://github.com/pytorch/pytorch/pull/149831))
Mark mutable custom operators as cacheable in torch.compile ([#151194](https://github.com/pytorch/pytorch/pull/151194))
Implement workaround for a graph break with older version einops ([#153925](https://github.com/pytorch/pytorch/pull/153925))
Fix an issue with tensor.view(dtype).copy_(...) ([#151598](https://github.com/pytorch/pytorch/pull/151598))
###### Flex Attention
Fix assertion error due to inductor permuting inputs to flex attention ([#151959](https://github.com/pytorch/pytorch/pull/151959))
Fix performance regression on nanogpt speedrun ([#152641](https://github.com/pytorch/pytorch/pull/152641))
###### Distributed
Fix extra CUDA context created by barrier ([#149144](https://github.com/pytorch/pytorch/pull/149144))
Fix an issue related to Distributed Fused Adam in Rocm/APEX when using nccl_ub feature ([#150010](https://github.com/pytorch/pytorch/pull/150010))
Add a workaround random hang in non-blocking API mode in NCCL 2.26 ([#154055](https://github.com/pytorch/pytorch/pull/154055))
###### MacOS
Fix MacOS compilation error with Clang 17 ([#151316](https://github.com/pytorch/pytorch/pull/151344))
Fix binary kernels produce incorrect results when one of the tensor arguments is from a wrapped scalar on MPS devices ([#152997](https://github.com/pytorch/pytorch/pull/152997))
###### Other
Improve PyTorch Wheel size due to introduction of addition of 128 bit vectorization ([#148320](https://github.com/pytorch/pytorch/pull/148320)) ([#152396](https://github.com/pytorch/pytorch/pull/152396))
Fix fmsub function definition ([#152075](https://github.com/pytorch/pytorch/pull/152075))
Fix Floating point exception in torch.mkldnn_max_pool2d ([#151848](https://github.com/pytorch/pytorch/pull/151848))
Fix abnormal inference output with XPU:1 device ([#153067](https://github.com/pytorch/pytorch/pull/153067))
Fix Illegal Instruction Caused by grid_sample on Windows ([#152613](https://github.com/pytorch/pytorch/pull/152613))
Fix ONNX decomposition does not preserve custom CompositeImplicitAutograd ops ([#151826](https://github.com/pytorch/pytorch/pull/151826))
Fix error with dynamic linking of libgomp library ([#150084](https://github.com/pytorch/pytorch/pull/150084))
Fix segfault in profiler with Python 3.13 ([#153848](https://github.com/pytorch/pytorch/pull/153848))
### v2.7.0 — PyTorch 2.7.0 Release
- Date: 2025-04-23
- Version: v2.7.0
- Original notes: https://github.com/pytorch/pytorch/releases/tag/v2.7.0
- Permalink: https://whatsnew.fyi/product/pytorch/releases/v2.7.0
#### PyTorch 2.7.0 Release Notes
- [Highlights](#highlights)
- [Tracked Regressions](#tracked-regressions)
- [Backwards Incompatible Changes](#backwards-incompatible-changes)
- [Deprecations](#deprecations)
- [New Features](#new-features)
- [Improvements](#improvements)
- [Bug fixes](#bug-fixes)
- [Performance](#performance)
- [Documentation](#documentation)
- [Developers](#developers)
#### Highlights