NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI, #397 most downloaded on PyPI
Tensors and Dynamic neural networks in Python with strong GPU acceleration
Latest stable
2.15.0
Last release 25 days ago
28 Oct 2026
Ships fairly regularly
a new release about every 2 months
Nearly every release is documented
notes for 52 of 52 stable releases
Nothing withdrawn
no release was ever pulled
8 years old
52 releases · first in 2018
Drag across the ruler to compare, or tap a release to open it.
Use FunctionEvent.metadata, a dict populated when _ExperimentalConfig(expose_kineto_event_metadata=True) is set (not the deprecated event_metadata).
<table> <tr><td><strong>Rewritten NCCL backend becomes the default</strong>, with a flight recorder that dumps on hangs and <code>TORCH_DIST_USE_NCCL2=0</code> or <code>nccl-legacy</code> as rollback paths</td></tr> <tr><td><strong>One-sided transports for <code>torch.distributed</code></strong>, with a NIXL backend and CUDA-graph-capturable transfers</td></tr> <tr><td><strong>FSDP2 and pipelining gain finer memory and communication control</strong>, with fp32 for precision-sensitive parameters, CUDA-graph-captured gradient accumulation, and gradient reduction overlapped with compute</td></tr> <tr><td><strong>Faster 4-bit (NVFP4) LLM decoding on NVIDIA Blackwell GPUs</strong> through fewer, better-overlapped kernel launches in NVGEMM</td></tr> <tr><td><strong>Apple Silicon gains FP8 and faster decode</strong>, with <code>float8_e4m3fn</code> and <code>_scaled_mm</code>, a new <code>grouped_mm</code> with a decode fast path (1.32–1.34x tokens/s on MoE decode), and public <code>torch.mps.Stream</code> APIs</td></tr> <tr><td><strong>Broader platform support</strong> with FlyDSL kernels on AMD gfx950, Tensor Data Mover support for gfx1250 (MI450), ROCm 10.0 wheels, simpler SYCL kernel authoring and multi-GPU profiling on Intel GPUs, CUDA 13.2 as the default wheel with CUDA 13.4 alongside it, and <code>torch.compile</code> on Python 3.15</td></tr> </table>
For more details about these highlighted features, you can look at the release blogpost. Below are the full release notes for this release.
import torch can no longer be re-executed in the same process, including via importlib.reload(torch) (#194654)importlib.reload(torch) and del sys.modules["torch"] + re-import now raise, as does retrying import torch after it failed. Re-running the module body was already unsafe in exactly the same way as the retry, so the new check does not distinguish the two. Normal use is unaffected: a successful import leaves torch in sys.modules so the body never re-runs, and re-entrant imports from a backend extension during autoload still short-circuit on sys.modules without reaching the check.
Version 2.14:
import importlib
import torch
importlib.reload(torch)
# RuntimeError: Only a single TORCH_LIBRARY can be used to register the namespace triton; ...
# (re-importing after a failed `import torch` failed with similarly misleading errors or could segfault)
Version 2.15:
import importlib
import torch
importlib.reload(torch)
# ImportError: `torch` can only be initialized once per process, so this module cannot
# be imported again: neither via `importlib.reload(torch)`, nor by re-importing after
# a failed `import torch`.
torch.load(..., weights_only=True) (#194380)Nested jagged and strided nested tensors are no longer on the default weights_only allowlist. Loading a checkpoint that contains one with weights_only=True (the default) now fails with Unsupported global: GLOBAL torch.nested._internal.nested_tensor._rebuild_njt was not an allowed global by default (or GLOBAL torch._utils._rebuild_nested_tensor for strided nested tensors). To load checkpoints containing nested tensors, allow them explicitly with torch.serialization.safe_globals (see below), or use weights_only=False for trusted files.
Version 2.14:
loaded = torch.load("njt.pt", weights_only=True) # works
Version 2.15:
from torch.nested._internal.nested_tensor import _rebuild_njt, NestedTensor
with torch.serialization.safe_globals([_rebuild_njt, NestedTensor]):
loaded = torch.load("njt.pt", weights_only=True)
torch.ops.* and torch._C._dispatch_call_boxed now use PyTorch's own warning and exception translation instead of pybind11's (#193451)We make torch.ops.* calls go through the same exception and warning translation as the rest of the library. This means that some exception translation that used to be handled by pybind is now handled natively. User-defined pybind exception translation is thus lost. Restoring it may be done in a future release as part of a broader exception handler improvement.
In addition, TORCH_WARN warnings from these operators now reach Python's warnings module, so they raise when warnings are turned into errors (-W error). std::out_of_range still becomes IndexError (#195713).
Version 2.14:
# C++ op: throw std::invalid_argument("bad size");
try:
torch.ops.my_lib.my_op(x)
except ValueError: # pybind11 translation
...
Version 2.15:
# C++ op: TORCH_CHECK_VALUE(false, "bad size");
try:
torch.ops.my_lib.my_op(x)
except ValueError:
...
# TORCH_WARN from the op is now a Python warning
with warnings.catch_warnings():
warnings.simplefilter("ignore")
torch.ops.my_lib.my_op(x)
CheckpointPolicy.MUST_RECOMPUTE (#196956)In eager mode, if a create_selective_checkpoint_contexts policy returns CheckpointPolicy.PREFER_RECOMPUTE for a non-aliasing operator with an ordered effect (e.g. via register_effect(torch.library.EffectType.ORDERED)), that choice is now overridden and its outputs are saved, so the side effect is no longer replayed during backward. This can increase activation memory. To keep the 2.14 behavior, return CheckpointPolicy.MUST_RECOMPUTE for that operator. Operators in the c10d namespace are excluded. Under torch.compile, CheckpointPolicy.MUST_RECOMPUTE on an effectful operator now raises at compile time: RuntimeError: AOTAutograd does not support MUST_RECOMPUTE for effectful operations because forward effects cannot join the backward effect-token chain. Use a save policy instead.
policy = lambda ctx, op, *args, **kwargs: CheckpointPolicy.PREFER_RECOMPUTE
checkpoint(fn, x, use_reentrant=False, context_fn=lambda: create_selective_checkpoint_contexts(policy))
# 2.14: an effectful op in fn runs twice; 2.15: once (use CheckpointPolicy.MUST_RECOMPUTE to replay)
nccl backend now uses a rewritten, cleaned-up NCCL implementation by default (#192281, #192895, #193237, #193241)backend="nccl" (also the default CUDA backend of init_process_group()) now creates the new implementation. The legacy implementation is available as backend="nccl-legacy" for this release only: nccl-legacy and TORCH_DIST_USE_NCCL2=0 will be removed in the next release, so migrate to nccl or nccl-lazy.
Use nccl (eager initialization) by default. Use nccl-lazy when you need independent point-to-point communicators: collectives run on one eagerly created communicator, and each send/recv peer pair gets its own lazily created communicator and stream, so concurrent P2P to different peers can overlap (as in the legacy backend).
Differences from the legacy backend:
init_process_group()/new_group(), allocating GPU memory even for unused groups.device_id, else LOCAL_RANK % torch.cuda.device_count() (or the global rank modulo the device count); torch.cuda.set_device() is not used. Tensors on another GPU fail with Expected tensor on cuda:X but found tensor on cuda:Y or ProcessGroupNCCL is bound to device cuda:X but an operation was issued on cuda:Y. Pass device_id if needed; several GPUs per process requires nccl-legacy.dist.get_backend_impl(...) returns the new backend class, so isinstance(..., ProcessGroupNCCL) is False and legacy-only methods such as comm_split_count() are missing.all_gather's work.get_future() value is the list of per-rank outputs, not a one-element list holding a stacked tensor; read the output list passed to all_gather instead (works on both backends).To temporarily restore the legacy behavior in 2.15, set TORCH_DIST_USE_NCCL2=0 on every rank before creating the process group, or use nccl-legacy:
Version 2.14:
dist.init_process_group("nccl") # ProcessGroupNCCL
Version 2.15:
dist.init_process_group("nccl", device_id=torch.device("cuda", local_rank)) # new implementation
dist.init_process_group("nccl-lazy", device_id=torch.device("cuda", local_rank)) # independent P2P communicators
dist.init_process_group("nccl-legacy") # legacy implementation, removed in the next release
TensorProperties gains an optional strides field in the pickled .metadata file. In older versions dcp.load raises a CheckpointException reporting too many values to unpack (expected 5). There is no flag to write the old format.
Version 2.14 (loading a 2.15 checkpoint):
dcp.load(state_dict, checkpoint_id="/ckpt/step_100")
# CheckpointException: ... too many values to unpack (expected 5)
Version 2.15:
dcp.load(state_dict, checkpoint_id="/ckpt/step_100") # loads 2.14 and 2.15 checkpoints
MixedPrecisionPolicy(reduce_dtype=None), fully_shard now accumulates and reduces gradients in the parameter's grad_dtype (its original dtype by default) instead of in param_dtype (#194434)This is BC-breaking: mp_policy.reduce_dtype=None no longer defaults to mp_policy.param_dtype.
MixedPrecisionPolicy(param_dtype=bf16)
MixedPrecisionPolicy(param_dtype=fp32)
How to deal with BC: explicitly set mp_policy.reduce_dtype.
In grad accumulation (no reduce-scatter), the unsharded param's .grad always holds the accumulated value, visible via model.parameters() while unsharded. Before this change, .grad was None when reduce_dtype was set and differed from param_dtype (FSDP kept the sum in a hidden reduce_dtype buffer).
Version 2.14:
# fp32 parameters
mp_policy = MixedPrecisionPolicy(param_dtype=torch.bfloat16)
fully_shard(model, mp_policy=mp_policy)
# gradients accumulate and reduce-scatter in bf16
Version 2.15:
# fp32 parameters
mp_policy = MixedPrecisionPolicy(param_dtype=torch.bfloat16)
fully_shard(model, mp_policy=mp_policy)
# gradients accumulate and reduce-scatter in fp32
# to keep the 2.14 behavior, set reduce_dtype explicitly
mp_policy = MixedPrecisionPolicy(param_dtype=torch.bfloat16, reduce_dtype=torch.bfloat16)
fully_shard(model, mp_policy=mp_policy)
torch.distributed.config.pipeline_per_direction_p2p is renamed to pipeline_per_edge_p2p and now uses one communicator per directed rank-to-rank edge (#196666)The old names were removed with no alias: setting the attribute raises AttributeError: torch.distributed.config.pipeline_per_direction_p2p does not exist, and TORCH_DISTRIBUTED_PIPELINE_PER_DIRECTION_P2P is silently ignored.
Version 2.14:
dist_config.pipeline_per_direction_p2p = True
Version 2.15:
dist_config.pipeline_per_edge_p2p = True # or TORCH_DISTRIBUTED_PIPELINE_PER_EDGE_P2P=1
dladdr instead of addr2line by default (#195462)TORCH_DISABLE_ADDR2LINE now defaults to on, since addr2line is slow and can hang. C++ frames in TORCH_SHOW_CPP_STACKTRACES=1 errors and CUDA memory snapshots now show the library path and offset, plus the symbol name only if exported (otherwise ??). To restore addr2line, set TORCH_DISABLE_ADDR2LINE=0 or TORCH_SYMBOLIZE_MODE=addr2line.
TORCH_SHOW_CPP_STACKTRACES=1 TORCH_DISABLE_ADDR2LINE=0 python train.py
mallocWithAddress tag in a new internal_metadata field instead of appending it to user_metadata (#193432)user_metadata in torch.cuda.memory._snapshot() trace entries is now exactly what was set with torch.cuda.memory._set_memory_metadata (which now also accepts a dict). Tools that searched user_metadata for mallocWithAddress must read internal_metadata instead.
# 2.14
tagged = [e for e in trace if "mallocWithAddress" in e["user_metadata"]]
# 2.15
tagged = [e for e in trace if e.get("internal_metadata") == "mallocWithAddress"]
FunctionEvent.metadata_json property (#198265)Accessing it now raises AttributeError: 'FunctionEvent' object has no attribute 'metadata_json', and the metadata_json constructor argument is removed. Use FunctionEvent.metadata, a dict populated when _ExperimentalConfig(expose_kineto_event_metadata=True) is set (not the deprecated event_metadata).
metadata = event.metadata_json # 2.14: JSON string
metadata = event.metadata # 2.15: dict[str, Any] or None
In _ExperimentalConfig(custom_profiler_config=...), "cupti_monitor" is now "cuspy" and "cupti_monitor_async_export" is now "cuspy_async_export"; old names silently fall back to the default Kineto backend. prof.take_pending_cupti_export() is now take_pending_cuspy_export() (the old name raises AttributeError). Prefer the new torch.profiler.CuspyConfig.
# 2.14
cfg = _ExperimentalConfig(custom_profiler_config='{"backend":"cupti_monitor"}')
# 2.15
cfg = _ExperimentalConfig(custom_profiler_config='{"backend":"cuspy"}')
Before, Dynamo let any higher-order op body mutate or alias its inputs by default. Ops that do not implement those semantics could silently produce invalid graphs. Mutation and aliasing are now off by default. The built-in wrappers that support them (wrap, checkpoint, autograd.Function, autocast/set-grad wrappers) opt in. A flex_attention mask_mod may read captured views but must not mutate inputs or return aliases. Under fullgraph=True, unsupported mutation or aliasing raises Encountered input mutation during higher order op tracing or Encountered aliasing during higher order op tracing; otherwise, Dynamo graph breaks and falls back to eager execution. Rewrite the higher-order op body to avoid mutation or aliasing.
For example, rewrite an in-place flex_attention score modifier as an out-of-place operation:
Version 2.14:
def score_mod(score, b, h, q, k):
score.add_(1)
return score.clone()
Version 2.15:
def score_mod(score, b, h, q, k):
return score + 1
torch.compiler.nested_compile_region(options=...) now accepts only an allowlist of Inductor config patches (#195864, #195865)Patches passed through get_invoke_subgraph_compile_options(fw_inductor_config_patches=..., bw_inductor_config_patches=...) used to accept any torch._inductor.config key, though many were silently ignored. Only fallback_by_default and max_autotune are now accepted; other keys raise ValueError: Inductor config key '<key>' is not supported in forward nested compile-region options (or backward). Apply other options to the whole compiled function. Patch dictionaries are now snapshotted when the options are created, so later mutation has no effect, and the default no longer implicitly sets triton.autotune_at_compile_time=True.
Version 2.14:
opts = get_invoke_subgraph_compile_options(fw_inductor_config_patches={"triton.multi_kernel": 1})
Version 2.15:
opts = get_invoke_subgraph_compile_options(fw_inductor_config_patches={"max_autotune": True})
compiled = torch.compile(fn, options={"triton.multi_kernel": 1})
torch.compiler.precompile is now a module instead of a callable; capture with torch.compiler.precompile.capture(...) and reload with torch.compiler.precompile.load(...) (#197993, #198135, #198213)Calling torch.compiler.precompile(fn, *example_inputs) now raises TypeError: 'module' object is not callable. capture(fn, *, artifact_path, cache_path) returns a context manager that you call once inside the with block; it writes both files when the block exits cleanly (or on cap.save()), and load now takes those paths. decompositions= moves to tracer=MakeFxTracer(decompositions=...).
Version 2.14:
python_code, cache = torch.compiler.precompile(lambda m, x: m(x), model, x)
f = torch.compiler.precompile.load(python_code, cache)
Version 2.15:
with torch.compiler.precompile.capture(lambda m, x: m(x), artifact_path="m.py", cache_path="m.cache") as cap:
cap(model, x)
f = torch.compiler.precompile.load("m.py", "m.cache")
split, split_with_sizes or unbind is now rebuilt as a single slice or select of its base, so its grad_fn is SliceBackward0/SelectBackward0 instead of SplitBackward0/SplitWithSizesBackward0/UnbindBackward0 (#194037)This greatly reduces compile time for code that mutates many split() views (for example 32s to 15s with 128 views). Gradients are unchanged, but the in-place error now names the new op with output index 0: RuntimeError: Output 0 of Select is a view and is being modified inplace. Code that inspects grad_fn names, matches the old error text, or pattern-matches split/unbind nodes in functionalized graphs needs updating. There is no option to restore the previous behavior.
Version 2.14:
>>> out = torch.func.functionalize(f)(x) # f returns base.unbind(0)[1] after base.add_(1)
>>> out.grad_fn
<UnbindBackward0 object at 0x...>
Version 2.15:
>>> out = torch.func.functionalize(f)(x)
>>> out.grad_fn
<SelectBackward0 object at 0x...>
The default PyPI wheel moves from CUDA 13.0 to CUDA 13.2. The 2.15 wheels are cu132 and cu134; cu126 and cu130 are no longer built. CUDA 13 wheels need NVIDIA driver 580 or newer and a GPU of Turing (sm_75) or newer, so Maxwell, Pascal and Volta GPUs and hosts with a CUDA 12.x driver should stay on 2.14.
Version 2.15:
# PyPI wheel now uses CUDA 13.2
pip install torch
# CUDA 13.4 wheels
pip install torch --index-url https://download.pytorch.org/whl/cu134
# To stay on CUDA 12.6 or CUDA 13.0, pin PyTorch 2.14:
pip install torch==2.14.0 --index-url https://download.pytorch.org/whl/cu126 # or cu130
PyTorch 2.15 raises the minimum supported Python version for binaries to 3.11: no cp310 wheels are built for torch or the Triton wheels, and CI no longer tests on Python 3.10. On Python 3.10, pip cannot find a 2.15 wheel. Upgrade to Python 3.11 or newer, or stay on PyTorch 2.14.
Version 2.14:
python3.10 -m pip install torch # cp310 wheel available
Version 2.15:
python3.11 -m pip install torch==2.15.0 # Python 3.11 through 3.15 (including 3.14t and 3.15t)
gfx900 (MI25) and gfx906 (MI50/MI60, Radeon VII) users can stay on 2.14 (rocm7.2) or build from source with those targets in PYTORCH_ROCM_ARCH.
pip install torch --index-url https://download.pytorch.org/whl/rocm7.14 # or rocm10.0
PyTorch only uses the cuRAND device API, so torch no longer links libcurand, no longer preloads it on import torch, and the wheel's CUDA requirements no longer include cuRAND. Extensions or libraries that call the cuRAND host API (for example curandCreateGenerator) and relied on pip install torch bringing in the cuRAND library can fail to load libcurand.so and must now install it themselves.
Version 2.15:
pip install torch
pip install "cuda-toolkit[curand]==13.2.2" # match the toolkit version of your wheel
torch.histc(..., out=...) on CUDA now raises an error when out does not have the same dtype as the input (#196100)CUDA used to silently cast into any out dtype. It now matches CPU and MPS and rejects mismatches, even widening ones. Compute without out and cast instead.
Version 2.14:
>>> torch.histc(x, bins=4, min=-2.0, max=2.0, out=int64_out) # silently truncated
Version 2.15:
RuntimeError: torch.histogram: input tensor and hist tensor should have the same dtype, but got input float and hist long int
>>> int64_out.copy_(torch.histc(x, bins=4, min=-2.0, max=2.0)) # workaround
Graphs captured separately on one stream could share the cached workspace and fail on replay with CUDA error: an illegal memory access was encountered. Workspaces are now freed after each op, so torch.cuda.memory_allocated() excludes them and the handle from torch.cuda.current_blas_handle() has no ATen workspace attached. Set TORCH_CUBLAS_WORKSPACE_CACHE=1 to restore caching (unsafe with multiple graphs on one stream). TORCH_CUBLASLT_UNIFIED_WORKSPACE now only takes effect with caching enabled. ROCm has a matching change (#196920).
Version 2.14:
>>> torch.mm(a, a, out=out)
>>> torch.cuda.memory_allocated() - before > 0 # workspace stays allocated
True
Version 2.15:
>>> torch.cuda.memory_allocated() - before # freed after the op
0
torch.sin and torch.cos on Arm CPUs (NEON and SVE) now use SLEEF's 3.5-ULP kernels instead of the 1.0-ULP kernels, matching the accuracy of the x86 AVX2 implementation and running 1.7x-2.4x faster on Neoverse V1/V2 (#196315)Float32 sin and cos results on Arm can now differ from earlier releases in the last bits. Bit-for-bit comparisons against stored golden outputs, torch.equal, or torch.testing.assert_close with rtol=0, atol=0 may fail; default assert_close tolerances are unaffected. There is no switch to restore the previous kernels; if you need tighter accuracy, compute in float64 and cast back.
Version 2.14:
>>> x.cos() # float32 on Arm: within 1 ULP
Version 2.15:
>>> x.cos() # float32 on Arm: within 2 ULP
>>> x.double().cos().float() # workaround: correctly rounded
macOS 14 has reached end of life, so its MPS workarounds were removed. On macOS 14, torch.backends.mps.is_available() returns False and allocating on mps raises the error below. To keep using MPS, stay on PyTorch 2.14 or upgrade macOS; CPU builds still run on older macOS. C++ extensions: at::mps::MacOSVersion::MACOS_14_4 was removed.
>>> torch.ones(2, device="mps") # 2.15 on macOS 14
RuntimeError: The MPS backend is supported on macOS 15.0+. Current OS version can be queried using `sw_vers`
allocator property from torch.xpu.MemPool, aligning with other accelerators (#192041)torch.xpu.MemPool no longer exposes the allocator it was constructed with, so pool.allocator now raises AttributeError. Keep your own reference to the allocator instead; passing one to the MemPool constructor is unchanged.
Before:
pool = torch.xpu.MemPool(allocator.allocator())
my_allocator = pool.allocator
After:
my_allocator = allocator.allocator()
pool = torch.xpu.MemPool(my_allocator)
TypeError instead of RuntimeError (#192350)This covers order-dependent ops (sort, argsort, topk, argmax/argmin, max/min with dim, maximum/minimum, fmax/fmin, aminmax), isposinf/isneginf, view_as_real/imag on real tensors, and view_as_complex on complex tensors, matching Python (1j < 2j is a TypeError). except RuntimeError: no longer catches these; catch (RuntimeError, TypeError). Ops not yet implemented for a dtype (e.g. rad2deg, nansum, heaviside on complex, topk/argmax on bool) now raise NotImplementedError, which except RuntimeError: still catches. Full max()/min()/amax/amin are unchanged.
torch.sort(torch.randn(3, dtype=torch.cfloat))
# 2.14: RuntimeError: Sort does not support complex dtypes on CPU
# 2.15: TypeError: Sort does not support complex dtypes on CPU
set of parameters to an optimizer is deprecated and now emits a FutureWarning; it will become an error in a future release (#198710)Set iteration order can change between runs, so optimizer state could silently mismatch parameters on reload. The warning reads: optimizer parameters need to be organized in ordered collections, but the ordering of tensors in sets will change between runs. Please use a list instead.
opt = torch.optim.Adam(set(model.parameters())) # 2.15: FutureWarning
opt = torch.optim.Adam(list(model.parameters())) # recommended
torch.linalg.lu_factor, torch.linalg.lu, and the ops that use it internally (torch.linalg.solve, torch.linalg.inv, torch.linalg.det, torch.linalg.slogdet) now always use cuSOLVER (#190661)This only affects code that sets torch.backends.cuda.preferred_linalg_library("magma"): pivoted LU now uses cuSOLVER anyway; a new built-in batched LU kernel replaces MAGMA's for large batches. When MAGMA is preferred, the first call warns: linalg.lu_factor: MAGMA, as a linear algebra backend, is deprecated and will be removed in future releases. pivot=False still uses MAGMA when it is preferred. To avoid the warning, use the default or cuSOLVER backend.
torch.backends.cuda.preferred_linalg_library("magma")
LU, pivots = torch.linalg.lu_factor(A) # 2.14: MAGMA; 2.15: cuSOLVER + UserWarning
torch.backends.cuda.preferred_linalg_library("default") # recommended
torch.autograd.profiler.load_nvprof, parse_nvprof_trace and EnforceUnique are deprecated and will be removed in PyTorch 2.17 (#198396)nvprof does not support recent GPUs. They now emit a FutureWarning such as `torch.autograd.profiler.load_nvprof` is deprecated and will be removed in PyTorch 2.17. Use torch.profiler.profile or Nsight Systems with torch.autograd.profiler.emit_nvtx().
events = torch.autograd.profiler.load_nvprof("trace.prof") # 2.14
with torch.profiler.profile() as prof: # 2.15
run_workload()
FunctionEvent.event_metadata is deprecated in favor of FunctionEvent.metadata (#198405)metadata is a typed dict[str, Any] with everything event_metadata had. Accessing event_metadata emits FutureWarning: event_metadatais deprecated. Usemetadata instead.
grid = event.event_metadata.grid # 2.14
grid = event.metadata["grid"] # 2.15
torch._inductor.config.triton.use_block_ptr because Triton removed its block-pointer API (#191007)With a Triton that no longer provides block pointers, use_block_ptr=True is now a no-op that falls back to the default indexing path with a one-time FutureWarning: config.triton.use_block_ptr=True but the installed Triton no longer provides the block-pointer frontend API, instead of failing with CompilationError: ... Block pointers have been removed in favor of the tensor descriptor API. Use tensor descriptors instead.
Version 2.14:
torch._inductor.config.triton.use_block_ptr = True
Version 2.15:
torch._inductor.config.triton.use_tensor_descriptor = True
torch._inductor.config.use_mixed_mm and torch._inductor.config.mixed_mm_choice settings (#193721)These settings have been ignored since the tuned mixed_mm path was removed. Reading or setting either now emits a one-time FutureWarning such as torch._inductor.config.use_mixed_mm is deprecated and does not do anything. autoheuristic_collect.mixed_mm and autoheuristic_use.mixed_mm were removed, and "mixed_mm" is no longer the TORCHINDUCTOR_AUTOHEURISTIC_USE default. Delete these settings from your code.
Version 2.14:
torch._inductor.config.use_mixed_mm = True # silently ignored
Version 2.15:
# FutureWarning; delete the line
torch._inductor.config.benchmark_epilogue_fusion to benchmark_template_fusion and max_epilogue_benchmarked_choices to max_template_fusion_benchmarked_choices (#198430)The settings also cover prologue fusion, so the old names were misleading. The old names remain as deprecated aliases that emit a one-time FutureWarning. The environment variable is now TORCHINDUCTOR_BENCHMARK_TEMPLATE_FUSION; TORCHINDUCTOR_BENCHMARK_EPILOGUE_FUSION is still read as a fallback.
Version 2.14:
torch._inductor.config.benchmark_epilogue_fusion = False
Version 2.15:
torch._inductor.config.benchmark_template_fusion = False
torch.cuda.graph_annotations.clear_kernel_annotations() is deprecated and now emits a FutureWarning (#195398)The CUDA graph kernel annotation registry now cleans up after itself: annotations are rekeyed to the executable graph when it is instantiated and dropped when that graph is destroyed. A global clear also discards annotations for graphs that are still live. Remove the call, and reset or delete a graph to drop its annotations.
Version 2.14:
annotations = get_kernel_annotations()
clear_kernel_annotations()
Version 2.15:
annotations = get_kernel_annotations()
# No clear needed; g's annotations are dropped when g is reset or destroyed.
torch.nn.functional.scaled_addmm and in-place scaled_addmm_, which compute beta * input + alpha * scaled_mm(mat1, mat2) in a single cuBLASLt GEMM on CUDA with the same scaling recipes as scaled_mm; also supported under torch.compile (#195409, #195410)torch.optim.functional, a public module of functional optimizers (adam, adamw, sgd, muon and others) that run the same implementations as the optimizer classes while the caller manages parameters, gradients and state (#194986)ctx.input_grad_buffers to custom torch.autograd.Function backward, exposing the engine's gradient accumulation buffers (or None when unavailable) so a fused kernel can accumulate an input's gradient in place and return None for it. Availability depends on backward order, so keep an out-of-place fallback; buffers must be updated synchronously within the current backward call, and the property is unavailable with create_graph=True, anomaly detection, or post-hooks on the producing node (#196491)torch.autograd.graph.queue_callback(callback), a public API to run a callback when the current backward pass finishes (#193958)torch.distributed._transport, with a NIXL backend and CUDA-graph-capturable stream-ordered transfers (#195643, #197032, #198889, #198918)torch.distributed._watchdog, that detects hung CPU and GPU operations in Python distributed backends and dumps thread stacks on timeout (#192075)get_peer_cft_handle(peer) and get_multimem_cft_handle() to NCCL symmetric memory for NCCL Compute Fabric Transport (#191685)ProcessGroupNCCL.Options.lazy_init so nccl and nccl-lazy groups create their communicator on first use instead of allocating ~200 MiB in new_group (#200020)FsspecReader and FsspecWriter are now public in torch.distributed.checkpoint, and FsspecWriter supports dcp.async_save through a new cache_staged_state_dict argument placed before overwrite (pass overwrite and later arguments by keyword); importing the old private _fsspec_filesystem module emits a DeprecationWarning (#188698)FSDPModule.set_manual_backward_finalization(True) and FSDPModule.finalize_backward() to run gradient reduction and resharding at a chosen point instead of in the autograd final callback (#196640)finalize_backward(async_op=True), which returns a GradientReductionHandle so gradient reduction can overlap other compute (#196724)FSDPModule.set_keep_unsharded_storage() to keep unsharded parameter storage allocated across reshard() (#198417)fsdp_post_all_gather by implementing fsdp_should_release_all_gather_outputs_after_post_all_gather() (#194114)PipelineStage.register_forward_context(factory) to wrap each stage forward in a context manager that receives the stage and microbatch indices (#196462)torch.distributed.pipelining.analyze_pipeline_activation_liveness, which computes activation lifetimes and reusable storage slots from a schedule (#196464)DeviceMesh.abort() to abort all process groups of a root mesh, avoiding hangs when a peer exits early (#189655)torch.profiler.ProfilerActivityConfig and torch.profiler.PerformanceMetricsConfig to configure collection per activity group, such as CUDA hardware performance counters (#196065)torch.profiler.CuspyConfig to enable the experimental Cuspy CUDA collection backend without _ExperimentalConfig (#196066)torch.compiler.config.static_sources (TORCH_COMPILE_STATIC_SOURCES), the inverse of dynamic_sources, listing sources that stay static even under automatic dynamic shapes, PGO, or dynamic=True, but not explicit mark_dynamic (#193626)_dynamo_backend_init callable that runs when torch.compile() resolves the backend, so out-of-tree backends can load native libraries or set up devices and fail fast (#192345)TORCH_COMPILE_WORKER_MODE=thread or auto to avoid process-spawn and pickling overhead (#179547, #179548)mm, grouped_mm and MXFP4/MXFP8 scaled_mm, enabled by adding FLYDSL to torch._inductor.config.max_autotune_gemm_backends (#190903, #192877, #194032, #194303, #194981, #196719)num_runners and use_stream_affinity arguments to torch._inductor.aoti_load_package, which keep each non-null CUDA or XPU stream on the same model instance across calls (#194783)AOTIModelContainerRunner: attach a torch::inductor::AOTIModelContainerObserver with set_observer() to get begin/end callbacks around inference, constant swaps and constant folding (#193999)torch.foreach module (beta), which exposes the multi-tensor torch._foreach_* operations under stable, documented names (e.g. torch.foreach.mul_(params, 3)) with parameter names that follow the ordinary ops (#193607)torch::stable::sort to the stable ABI (#198038)c10/util helpers available header-only under torch/headeronly/util (#194673, #194781)torch.dtype/torch.device Python objects and a torch::stable::is_tensor_pyobject check (#192774)scaled_dot_product_attention in Windows CUDA builds and wheels for Ampere and newer GPUs. It was previously disabled on Windows, so SDPA fell back to the math backend; in a GQA benchmark (bf16, sequence length 2048) on an RTX 5090 the forward pass drops from 11.5 ms to 0.49 ms (#186343)torch.compile now works on Python 3.15 (previously it raised RuntimeError: torch.compile is not supported on Python 3.15+; the check now applies to Python 3.16 and newer), and the Python 3.15 and 3.15t wheels are built against CPython 3.15.0rc2, after the ABI freeze, instead of beta releases (#178393, #199356)GreenContext.split and torch.cuda.green_contexts.SMPartition for creating green contexts with disjoint SM allocations, plus a GreenContext.sm_count property reporting the SMs actually allocated; requires a CUDA driver and cuda.bindings 13.1 or newer (#198278)locality_domain_ids to GreenContext.split and SMPartition.split, together with get_num_locality_domains() and is_localization_supported(), to restrict SM partitions to hardware locality domains; requires a CUDA driver and cuda.bindings 13.4 or newer (#198279)"bfx9" mode for torch.backends.cuda.matmul.fp32_precision that keeps FP32 inputs and outputs but lets cuBLAS use its BF16x9 algorithm on compute capability 10.0 and 10.3 GPUs; requires a CUDA 12.9 or newer build (#195301)annotation_config={"record_py_stacks": True}, read via torch.cuda.graph_annotations.get_kernel_py_stacks() (requires CUPTI >= 13.3) (#198419)torch.nn.attention.varlen (varlen_attn and varlen_attn_out), enabling head dimension 256 with a paged KV cache on Blackwell GPUs; requires cuDNN 9.24 or newer (#195650)torch.mps.Stream, current_stream(), default_stream(), set_stream(), the torch.mps.stream() context manager) and Tensor.record_stream on MPS (#191415, #193464)torch.float8_e4m3fn support on MPS (#194074, #196915, #196918, #196945, #196955, #197383, #197801)float8_e4m3fn inputs in torch.nn.functional.scaled_mm on MPS (#196916)torch.xpu.Event across processes, through torch.multiprocessing or ipc_handle() / from_ipc_handle() on an event created with interprocess=True (#191182, #192495, #193399, #192514)clamp and hardtanh instead of wrapping or raising (e.g. torch.clamp(uint8_tensor, min=-255) is a no-op) (#193169)skip_unsupported to FlopCounterMode to warn instead of failing on higher-order operators without a FLOP formula, and count flex_attention FLOPs (#167224)Optional[list[Tensor]] annotations in torch.library.infer_schema and custom_op (#187012)torch.iinfo and torch.finfo hashable (#193290)torch.no_grad-style decorators (#186502)Tensor @ scalar and torch.utils re-exports (#195220, #195289)uint16, uint32 and uint64 support to torch.clamp, torch.maximum and torch.minimum on CPU and CUDA (#189953)reduction="none" on the chunked linear_cross_entropy path (#188296)scaled_dot_product_attention with different query/key and value head dimensions (#193039)bicubic F.interpolate backward (#193707)bicubic mode for 5-D input in F.grid_sample (#194787)varlen_attn to dispatch causal attention to cuDNN (#193630)weight to the F.mse_loss type stub (#196126)lambd and alpha in torch.optim.ASGD (#193303)torch.special Bessel functions (#189872)F.grid_sample (#195280)torch._functorch.config.activation_memory_budget_require_full_coverage to let region_activation_memory_budget apply to a whole compiled graph (#195932)Tensor.grad_dtype on non-leaf tensors (#190852)compile_on_one_rank (#196150, #196938, #196939, #196940)reconfigure() path, legacy-matching errors, and windows and reconfiguration on ROCm (#192854, #192855, #199240, #194953, #193282, #194774)comm_ptr property returning the ncclComm_t on all NCCL backends (#197558, #198865)ReduceOp.PREMUL_SUM in functional all_reduce and under LocalTensorMode, and backward for MIN/MAX (#190942, #193868, #191947)FutureWarning from all_gather_into_tensor and reduce_scatter_tensor (#193874)device_id in init_process_group (#198340)TORCH_NCCL_TEARDOWN_ON_TIMEOUT to terminate on a legacy NCCL timeout instead of hanging (#196187)enable_reconfigure to dynamically created TorchComms communicators (#199099)is_symm_mem_enabled_for_group() no longer requires the deprecated enable_symm_mem_for_group() call (#193115)torch.compile for DTensor random ops on XPU (#187969)DistributedDataParallel: set ddp.require_manual_backward_finalization = True and call ddp.finalize_backward(), so other work can overlap the in-flight gradient all-reduce (#196651)lazy_bucket_allocation option to DistributedDataParallel that allocates gradient buckets during backward and frees them afterward, lowering peak memory (#199110)param_dtype_override_fn to MixedPrecisionPolicy for per-parameter mixed precision in fully_shard, keeping one all-gather per group (#196626)WAIT_SEND_F/WAIT_SEND_B schedule actions and an optional max_outstanding_sends limit on pending sends (#196726, #196727)max_active_stages argument to multi-stage schedules to control how many FSDP stages stay unsharded at once (#193972)enable_annotations=True (#195072)finalize_gradients to pipeline schedule step() for gradient accumulation across several schedule runs with FSDP stages (#196641)cas_backoff_max_seconds rendezvous option that adds random backoff after failed rendezvous state writes (#185930)ErrorHandlers see the @record entrypoint name and observe success through record_success() (#194269, #194746, #195034)preserve_rank_order option to DeviceMesh so subgroups keep the mesh's rank order (#193224)torch._scaled_mm (#186271)torch.cuda.tunable.dynamic_dims_mask and wildcard fallback (PYTORCH_TUNABLEOP_WILDCARD_FALLBACK=1) (#191658)bytearray, types.SimpleNamespace, bytes(), calling classmethod/staticmethod, list subclasses overriding __new__, del of captured variables, and more of math, cmath, operator and heapq (#192205, #199252, #193719, #196103, #197499, #197781, #191512, #189216, #196867, #197498, #197222, #198685, #195999, #192942, #192834, #195765)delattr and super().__init__(msg) on exceptions, non-string assert messages, property attributes, types.DynamicClassAttribute, and closure-cell comparison (#191404, #196722, #196051, #197798, #194642, #199260, #197189)TypeError) for user errors detected while tracing instead of graph breaking (#196432)requires_grad = True on in-region tensors, Tensor.storage_offset() on inputs, Tensor.is_pinned(), builtin function __name__, hasattr/getattr on opaque objects such as ProcessGroup, attribute reads on autograd.Function subclasses, setattr on torch.split outputs, and torchvision roi_align (#191129, #197224, #186494, #196049, #196050, #185316, #198514, #185528)allow_rnn disabled, graph break at the nn.RNN/nn.GRU/nn.LSTM call so the rest of the frame compiles (#186614)DeviceInterface streams and events, renamed PrivateUse1 tensor classes, cross-stream deallocation safety, and torch.mtia streams (#194343, #195432, #197187, #195649)torch.compile(..., name=...) to custom backends as kwargs["name"] (#196229)aot_compile serializes more functions (functools.wraps helpers, types.MethodType, closure cells) and prunes unpicklable values no guard reads (#196472, #196473, #196474, #196476, #196478, #196479, #196481, #196684, #196685, #196686, #196687, #196691, #196692, #197750, #197752, #197754, #197755, #197833, #197762)load_compiled_function(..., f_globals=...) and loaded aot_compile modules resolve guarded globals against the live scope and re-read them on each call; a guarded global missing from f_globals fails with KeyError on G['NAME'] (#196815, #196817, #196818, #196908, #196897, #197218, #196904)aot_compile module dispatch more robust and improve its error messages for guard mismatches, missing globals, unpicklable values and incompatible artifacts (#197055, #196826, #197047, #196823, #197149, #197048, #197220, #197050, #197257, #197319, #196816, #196693, #196819, #197391, #198061, #196470, #197756)maybe_mark_dynamic accepts min/max for an initial value range, and passing only one of them to mark_dynamic no longer crashes (#194625)torch.cuda.synchronize() unresolved under the experimental torch.distributed.config.compile_on_one_rank mode, so the artifact is not rank-specific (#196937)swap_ab configs) and support nvidia-cutlass-operators 0.2.0 (#190820, #190821, #190822, #191514, #191515, #192298, #194792, #194793, #194873, #195231, #195538, #193940, #196984)triton.cudagraph_managed_input_rerecord_limit, triton.cudagraph_initial_mempool_allocation_gb and triton.cudagraph_dynamic_shape_rerecord_limit to limit re-recording and memory-pool fragmentation (#191369, #196378, #197433)autotune_cudagraph_benchmarking_iters and hold the benchmark lock across multi-kernel comparisons to reduce autotuning noise (#196413, #192876)pad_mm use datasheet values (#194297, #196398, #196506, #196944, #198220)fusion_memory_timeline_peak_memory_increase_gb and fusion_memory_timeline_peak_memory_pct_threshold to reject fusions that raise peak memory (#190344)bmm template for a batch-broadcast left operand (bmm_shared_a) (#193049)alignment_asserts_inputs to assert, rather than silently clone, misaligned graph inputs (#196379)"<device>.<key>" in torch.compile(options=...) (#194998)assume_32bit_indexing for dynamic size arguments (#194127)torch.concatenate (#195174)bmm_skip_dynamic_shape_dim_check to decompose CPU bmm whose batch size cannot be proven (#197016)"strict_pointwise" and "strict_reduction" values to torch._inductor.config.numerics and make "strict" match eager numerics more closely (#192883, #195640)torch.compiler.nested_compile_region in the AOTInductor C++ wrapper (#194703, #194704)TensorDescriptor arguments in torch.library.triton_op (#193608) and Triton's launch_pdl option (#194079) in AOTInductor C++ wrappersAOTI_RUNTIME_FAILURE from AOTInductor runtime entry points instead of letting C++ exceptions unwind across the C ABI (#194613)config.aot_inductor.check_upperbound to control whether AOTI_RUNTIME_CHECK_INPUTS=1 rejects dimensions above the compile-time upper bound (#196131)TORCHINDUCTOR_LITE_MODE=1 to apply torch.compile(mode="lite") globally, including to AOTInductor compilation (#195880)torch._inductor.config.unsafe_skip_scalar_range_asserts to skip generated range asserts when compile-time bounds are too strict (#192857)torch._inductor.aoti_load_package now loads an extracted package directory directly (#195115)AOTI_TORCH_SAVE_DIR to choose where the AOTInductor debug printer saves tensors (#195869)TORCH_TRACE logs (#186495)inference_mode regions (#191409)torch.histogramdd helper ops, enabling fake-tensor tracing (#198897)expand and broadcasting (#198258)_to_dense (#192091)embedding_bag on CUDA (#194934)TORCH_TARGET_VERSION and libtorch headers (#193962)torch.utils.cpp_extension CUDA builds on Windows ARM64 (#191656)cu134) wheel and libtorch builds for Linux x86_64, Linux aarch64 and Windows, with cuBLAS 13.8.1 and cuDNN 9.26; the Linux wheels depend on cupti-python 13.4.0 (not installed on Python 3.15 and free-threaded interpreters) (#196560, #194996, #196014, #199269, #194942, #197212, #198912, #194905, #192769, #197764)intel-sycl-rt, dpcpp-cpp-rt and intel-opencl-rt 2026.1.2, oneccl 2022.1.2, intel-pti 1.1.0), and build the Linux XPU CI and CD images with Intel OMIX (#195128, #187900)scatter for float8 dtypes on CUDA (#197199)annotation_config argument to torch.cuda.graph with a CUPTI backend (#191999), key_by="source" and "auto" modes that can annotate kernels inside nested torch.cond / torch.while_loop bodies (#196528, #196530, #197577), and a cuda_graph_annotations argument to export_chrome_trace that writes them into the trace (#194854)CUDAGraph.get_graph_data() now reports kernel grid and block dimensions, dynamic shared memory size, and programmatic dependency edges (#196018, #196527)PYTORCH_CUDA_ALLOC_CONF options expandable_segments_reserve and expandable_segments_reserve_by_class to shrink the virtual-address reservation of expandable segments (#192269), and explain these options when that reservation fails (#193211)MemPool allocator returned a null pointer (#199363)TORCH_CUDA_CHECK_STRAY_CONTEXT=warn|error, which makes torch.cuda.set_device warn or raise when another device already holds a CUDA primary context (#191036)sum and norm on NEON use the same accumulation order as AVX2 and SVE256, so results are bitwise identical across these CPU types; NEON results can differ from earlier releases in the last bits (#197037, #197252)torch.logspace, torch.take/Tensor.put_, torch.frexp, torch.heaviside, torch.special.laguerre_polynomial_l, and unsigned integer comparisons (#190495, #192980, #194110, #195265, #195225, #198860)linalg.lu_factor, linalg.lu_solve, triangular solves and tanh backward (#188473, #195369, #195861, #195601)sinh, hypot, ldexp and other math ops in torch.compile on MPS (#197403)PYTORCH_MPS_METAL_VERSION to choose the Metal language version (#196881)torch.use_deterministic_algorithms(True) for nondeterministic MPS ops (#195754)torch.lerp in float on MPS (#196923)torch.nn.functional.grouped_mm for mixture-of-experts models (#194933, #198725)torch._int_mm, which also enables it in AOTInductor on MPS (#193153)scaled_mm (SwizzleType.SWIZZLE_32_8) (#190290), and allow all operand layouts in torch._scaled_mm with FP8 tensorwise scaling (#196884)mm/addmm, pointwise and reduction codegen, and FlexAttention (#191166, #196525, #197329)no_split and use_on_oom support to torch.xpu.MemPool (#192048, #192033, #192038)torch.xpu.mem_get_info and torch.accelerator.get_memory_info with a pluggable XPU allocator (#197412)linalg.polar, linalg.qr (out variant), geqrf, linalg.householder_product, sparse.spsolve and sparse linalg.vector_norm; linalg.qr, geqrf and linalg.householder_product now run natively instead of falling back to CPU (#188253, #187564, #189372, #194165, #189238, #193110)enable_gqa=True is not passed, consistent with the CUDA and CPU checks (#196731)where and float8 in scatter fill on XPU (#198720)Adam and AdamW implementations on XPU (#200289)upsample_bilinear2d channels-last by using 64-bit indexing (#200289)_philox_normal and _philox_uniform on XPU (#198200)torch.xpu.MemPool (#197065, #198720)Float4_e2m1fn_x2 and Float8_e8m0fnu in XCCL non-reduction collectives (#198200)torch.asarray on buffer-protocol objects to take the dtype from the buffer format (#188784)torch.load with map_location="meta" or FakeTensorMode losing storage sharing (#193566)torch.aminmax returning wrong results for overlapping out= tensors (#195342)torch.accelerator.empty_host_cache() segfaulting on MPS (#197593)Multinomial.entropy() precision for float64 and after expand() (#198006)torch.finfo(torch.float8_e5m2fnuz).eps being off by 2x (#198855)Tensor.__dlpack__ exporting tensors on a non-current non-CUDA device (#195721)torch.isinf/isfinite raising for fp8 dtypes without infinity (#197444)torch.isfinite reporting NaN as finite for float8_e8m0fnu (#199878)torch.linspace for float16 and bfloat16 on CPU, and torch.linspace and torch.logspace on CUDA, losing precision because the step was rounded to the output dtype; for example element 3 of torch.linspace(0, 10, 38, dtype=torch.half) on CPU was 0.8105 instead of the correctly rounded 0.8110 (#198415)softmax/log_softmax gradients, layer_norm (CUDA backward and ROCm forward) and memory-efficient SDPA on very large tensors (#188031, #193016, #199438, #199594)varlen_attn ignoring the sdpa_kernel backend selection, defects in its cuDNN backend, and FlashAttention-4 split selection (#193631, #194818, #198872)causal_lower_right when the query is longer than the key (#193632)grid_sample returning zeros with the AVX512 CPU kernel (#197635)weight_norm producing nan gradients for empty inputs on CPU (#192179)native_batch_norm without running stats and in max_pool1d/F.unfold with overflowing sizes (#194031, #194112)rms_norm with an engaged but undefined C++ weight (#195574)pixel_shuffle/pixel_unshuffle meta errors for non-positive factors (#195224)Module.to_empty() hint in meta-module to() errors with TORCH_SHOW_CPP_STACKTRACES=1 (#191151)Muon overwriting momentum with bf16 grads (#194664)torch.fmin/fmax gradients when one input is NaN (#193035)grad_fn (#196514)gradcheck checking the wrong output or raising IndexError (#194222, #194991)region_activation_memory_budget across graph breaks (#194808)Work outlives destroy_process_group(), tensors kept alive after wait_tensor, a stray CUDA context on GPU 0, failed nonblocking splits treated as ready, and errors destroying a group used in CUDA graphs (#195485, #193239, #198339, #199263, #199226)nccl groups that use the new NCCL backend (#192858)reduce_scatter dropping the PREMUL_SUM factor (#198961)torch.compile (#196077)all_gather_single with a negative gather_dim (#194865)split_group rejecting valid splits or hanging when backends differ from the default group (#195758, #197568)ProcessGroup subclasses' reconfigure overrides being bypassed from C++ (#198251)LocalTensorMode collectives on groups with unsorted ranks (#192777)NCCL host communicator for group ... not found errors from separately linked extensions (#193942)barrier()/put_signal()/wait_signal(), stream ordering, rendezvous and multicast hangs, signal-pad races, and freeing memory still in use (#192579, #195947, #196350, #195596, #196546, #192300, #198306, #196003)register_mem_pool(pool, symm=True) on the nccl backend not registering later pool segments as symmetric windows (#200771)all_gather on the nccl backend failing with RuntimeError: shape '[...]' is invalid for input of size 0 when outputs contain zero-element tensors (#200585) (not in the final RC; ships only if another RC is cut)BlockMask block sizes (#188766, #198250)Shard splits that leave trailing ranks empty (#195641, #198168)NO_SHARD plus CPUOffload(offload_params=True) (#194519)torch.inference_mode() (#197327)set_all_reduce_hook on a separate stream (#198804)AttributeError: 'FSDPParam' object has no attribute '_unsharded_param' in gradient accumulation with unused parameters (#194058)fully_shard keeping prefetched all-gather outputs alive, a reduce-scatter use-after-free, and cudaErrorStreamCaptureUnjoined under CUDA graph capture (#196460, #193686, #199677)uint8 views (#199733)multiprocessing.spawn treating a child's KeyboardInterrupt as success (#194439)find_free_port() raising UnboundLocalError and EtcdServer leaking its subprocess (#191451, #197711, #197744)get_socket_with_port() returning in-use ports (TCPStore EADDRINUSE) and a file-store rendezvous file descriptor leak (#199015, #191425)launch_agent shutdown errors hiding ChildFailedError (#195211, #195316)RRef error handling (#192960)linalg.det, slogdet and solve (#192667)torch.linalg.matrix_exp results for some inputs (#196658)torch._int_mm results for strided size-1 dimensions (#194682)record_function kwargs sent as raw JSON (#195471, #196352)torch._check(not expr) on a symbolic boolean as a runtime assertion, and fix a TypeError comparing two symbolic booleans (#186043, #186461)specialize_float=False (#195040)GraphModules from aot_export_module and non-strict export, and graphs with fake view tensors in metadata (#186418, #194771)replace_pattern producing an invalid graph when adjacent matches share a node (#185365)torch.fx.wrap keeping caller frames alive and torch.export retaining every traced graph (#198561, #198295)-0.0 and 0.0 as equal and rejecting NaN constants, which reused graphs with the wrong float (#192604, #192608)isinstance with @runtime_checkable Protocols, zero-argument super() in classmethods, user descriptors, and closure-list mutations in local classes (#196124, #198435, #198410, #197830)random module draws returning stale values on cache hits, ignoring random.seed(), or using float32 (#196921, #197221, #199075)torch.Tensor(torch.Size([...])) selecting the wrong overload (#196717)autograd.Functions under torch.func, graph breaks at torch.autograd.grad, and shape-changing Parameter.data assignments (#193724, #185829, #186512)capturable=True in the optimizer's param_groups (visible after a graph break, e.g. in optimizer.state_dict()) (#184704)out= variants of torch.max, torch.min and torch.topk recompiling on every new shape (#187952)list.pop() with a shape-derived index, in-place ops on __torch_function__ subclasses, activation checkpointing with dynamic shapes, torch._C._infer_size, nested torch.compile calls, and torch.random.fork_rng (#196590, #193969, #193254, #185471, #185742, #184793, #195413, #191977, #184977, #185373, #185462, #186168, #196865, #198330, #197191, #197745, #198153, #194749, #197049, #197585, #185300, #198060)torch.compile (#185469, #188799, #188632, #194556)f"{x=}") abandoning the whole frame (#186500)set_stance(skip_guard_eval_unsafe=True) leaking between threads (#191281, #199210, #196637)dict_keys views, frozenset, deque edge cases, range.index, operator.length_hint, and unbound numeric dunders (#193679, #193649, #193580, #197454, #195010, #195029, #195030, #196711, #196901, #198482, #198604, #198726)except X as e scoping, getattr() argument checks, .index(), and attribute errors (#198590, #198380, #196526, #197443, #198476, #198512, #192509, #196080, #195496)is_inference, and keep the original backend failure (#186546, #196620, #194827, #194595, #193565)aot_compile artifacts: pruned interned values such as torch.float32 failing on load (argument 'dtype' must be torch.dtype, not _Missing), one unserializable compile discarding others, and global-name collisions (#197749, #196505, #196756, #196895, #196822, #196814)canonicalize_output_graph_node_order moving ops out of inference_mode, making outputs require grad (#195518)repeat_interleave with int32 repeats (#197035)TORCHINDUCTOR_USE_RAND4X=1 restores it) (#198680)index_put whose sources alias the input, remove_noop_ops on copies of mutated inputs, fusions across repeated mutations of one buffer, and mutations of buffers already referenced by views (#198010, #198132, #198325, #198549, #198637)torch.while_loop whose cond_fn mutates a captured tensor (#192575, #195393)XBLOCK (#193103, #196565)nested_compile_region that inherited donated-buffer indices (#193960)scaled_mm template, including DeepSeek-style scales (#195751, #197028, #197458)key.transpose(-2, -1), and failures with a 0-d tensor scale (#195383, #191496)aten.sub dropping alpha, batched linear mixing dtypes, one-element tuple replacements, merge_select_cat_aten, and batch math fusion of torch.clamp and in-place dropout (#195463, #197069, #197832, #198638, #198285)cumsum pattern (#194366, #193052, #193708, #193422, #193959)torch.special.log_ndtr, torch.frexp and torch.nextafter edge cases (signed zeros, subnormals, float16/bfloat16), torch.randn with align_random_eager=True, and torch.nan_to_num on complex inputs (#191339, #195041, #196578, #194118, #190428)float16/bfloat16 Triton scans such as cumsum in float32 (#199088)index_put(..., accumulate=True) on GPU (#193584)adaptive_max_pool3d gradients on channels-last inputs (#197596, #199068)argmax/argmin indices after layout changes or loop reordering (#195178)dynamic=True when a dimension guarded equal to 1 is broadcast (#198774)cannot determine truth value of Relational, GuardOnDataDependentSymNode, ValueRangeError) with symbolic strides, unbacked tiling and reshapes, and negative constant_pad_nd padding (#185871, #196081, #199105, #195465)mm_plus_mm and bmm/baddbmm Triton templates (#189516)grouped_mm template on very large inputs (#192649)float16/bfloat16 scalar arguments being passed with the wrong width (#184065)Detected N tensor(s) in the cudagraph pool not tracked as outputs errors with pending backwards, static kernels partitioned out under cudagraph_skip_dynamic_graphs, and backward graphs treating activations as static inputs (#190555, #194124, #197139, #197438)NameError for complex indexed assignment with mode="reduce-overhead" and graph partitioning (#199414)CUDA driver error: misaligned address in backward for misaligned saved inputs (#192263)SymInt inputs when prefer_deferred_runtime_asserts_over_guards=True (#185588)tl.constexpr values, aliased triton.language imports, float literals, and buffer views in the FX wrapper backend (#192227, #189692, #196237, #190340, #193820)bmm inputs, pipelined autotuning, stale benchmark futures, decompose-K or ROCm multi_kernel_hints (NoValidChoicesError), 0-d addmm biases, CantSplit template-fusion choices, and deterministic combo kernels (#188268, #193094, #196148, #196453, #196510, #197214, #199113, #189724)max_autotune_gemm_search_space="EXHAUSTIVE" with decompose-K and benchmark all candidates under the same CUDA graph policy (#192285, #194649)control_deps lowering and manual collective bucketing, and remove duplicate waits on one collective (#192268, #192628, #192903, #195517, #197323, #199227, #199228)TORCHINDUCTOR_EMIT_POINTER_RANGE_32=0 being ignored (#198543, #194555, #194136)cutlass.operators install, and when benchmarking aliased inputs (#194727, #198292, #199072)ZeroDivisionError from integer %, wrong mkldnn transposed-convolution channels, and integer bmm returning int64 (#184155, #199560, #192025, #184950, #191324)float16 kernels and float8_e4m3fnuz/float8_e5m2fnuz cast errors (#193902, #197905)torch.backends.cuda.matmul.fp32_precision (#189955, #196860)libcuda.so.1, the CUDA_HOME fallback for nvcc, ROCm on Windows, and DSL ops with triton-rocm (#186538, #197573, #194471, #195022)AttributeError with torch._foreach_pow on integer tensors (#198675)float16/bfloat16 floor division of arange values, nested grouped-reduction epilogues, fallback kernels without tensor inputs, and an early FakeTensorUpdater (#197132, #195874, #197584, #196946)alloc_id size-mismatch errors after reseeding random between compilations (#192089)add(..., alpha=a); add with alpha != 1 is no longer fused into addmm (#199871, #200442)InductorError: AttributeError: 'NotImplementedType' object has no attribute 'expr' when fusing a prologue with a float16/bfloat16 cast into a Triton matmul (#201029)torch.compile(mode="lite") (#193767, #199204, #193768, #194261, #194262, #194324, #194700)int_array_N (#193621), duplicate stream variables in while_loop (#196324), kernel profiling (#179698), unbacked symbols in torch.cond predicates (#186094), and custom ops returning nested tensor lists (#194644)cond/while_loop models with subgraph tensor constants failing with Can not find the original value for ..._constant0 (#199188)dlopen on other machines (#198232) and segfaulting on Metal compile errors (#196634)torch.return_types outputs, e.g. from torch.max (#197128)torch._assert (now a runtime assertion), scaled_dot_product_attention with data-dependent head dims, and torch.distributions argument validation (#186306, #184983, #186291)move_to_device_pass leaving stale device arguments in generated code (#185105)... is not tracked with proxy errors from the fake tensor dispatch cache (#185100)torch.export.export raising GuardOnDataDependentSymNode for x[mask] = scalar when x has a data-dependent size (#200412)Tensor subclasses without __torch_dispatch__ (#193968)keep_inference_input_mutations (#198622)PendingUnbackedSymbolNotFound when a compiled saved_tensors_hooks pack hook allocates unbacked SymInts (#193258)torch.device nodes (#196146)resize_() on a no-op view of a returned intermediate (#191844)assert_size_stride failures on the second call of a compiled training graphNote truncated.
Your coding agent can read these notes before it upgrades. Set up the MCP server →
This release is meant to fix the following regressions and silent correctness issues:
This release is meant to fix the following regressions and silent correctness issues:
torch.linalg.lstsq solutions on MPS for complex batched underdetermined systems (#196113), fixed by #196128U and inaccurate small singular values from torch.linalg.svd on MPS for rank-deficient and ill-conditioned inputs (#196112), fixed by #196139 and #199063cublasLtMatmul() could ignore tensor-wide scaling for NVFP4 matrix multiplications (introduced in CUDA 13.2 Update 1)Remove the deprecated torch.cholesky() and Tensor.cholesky() APIs
<table> <tr><td><strong>NVGEMM</strong> brings CuTeDSL-generated CUTLASS kernels to Inductor, with epilogue fusion, scaled and NVFP4 GEMM, and grouped-reduction epilogues autotuned alongside Triton and ATen</td></tr> <tr><td><strong><code>torch.switch</code></strong> generalizes <code>torch.cond</code> to multi-way branching, and <code>torch.while_loop</code> can now be captured in a CUDA graph</td></tr> <tr><td><strong>Declarative dynamic shapes via <code>@dynamic_spec</code></strong>, shared across <code>torch.compile</code>, <code>torch.export</code> and <code>make_fx</code></td></tr> <tr><td><strong>Experimental <code>torch.compile</code> support for complex-valued tensors</strong>: Opt-in support decomposes supported complex operations into real and imaginary computations, enabling compiler backends to optimize more complex-number workloads.</td></tr> <tr><td><strong>A preview of our rewritten NCCL backend for PyTorch</strong>, ported from torchcomms, implementing the full collective contract with nonblocking communicators and eager communicator splitting and advanced features such as fault tolerance and windows designed as a drop-in replacement of existing NCCL c10d backend</td></tr> <tr><td><strong>Fault tolerance becomes a first-class <code>c10d</code> concept</strong>, with in-place process-group reconfiguration, one-sided RMA windows, and a Flight Recorder that works for any backend rather than only NCCL</td></tr> <tr><td><strong>Apple Silicon gains native linear algebra</strong>, including Jacobi-kernel SVD, <code>eigh</code>, QR and Cholesky, alongside a five-part reduction rewrite and a further MPSGraph to Metal kernel migration</td></tr> <tr><td><strong>Broader platform support</strong>: ROCm 7.14 wheels are produced from the TheRock pip SDK, Intel XPU adds native graph capture, and Inductor targets Rubin (<code>sm_107</code>)</td></tr> </table>
For more details about these highlighted features, you can look at the release blogpost. Below are the full release notes for this release.
torch.nn.LinearCrossEntropyOptions no longer accepts acc_policy="balanced"; use "compact" instead (#188283)
The "balanced" policy was removed because "compact" provides the same weight-gradient accumulation precision with lower memory use on CUDA, already uses the equivalent scratch layout for mixed-precision inputs on other devices, and was never selected by "auto". Constructing the options with acc_policy="balanced" now raises ValueError: invalid acc_policy: 'balanced'; expected one of 'auto', 'accurate', 'compact'.
Before:
options = torch.nn.LinearCrossEntropyOptions(acc_policy="balanced")
loss = torch.nn.functional.linear_cross_entropy(
input, linear_weight, target, options=options
)
After:
options = torch.nn.LinearCrossEntropyOptions(acc_policy="compact")
loss = torch.nn.functional.linear_cross_entropy(
input, linear_weight, target, options=options
)
Clamp and min/max boundary subgradients now follow the selected dispatcher schema's input space (#191142)
This affects gradients exactly at nondifferentiable bounds or ties. A scalar clamp bound is a fixed parameter, so the input gradient at equality changes from 1 to the minimum-norm subgradient 0. A Tensor bound is part of the differentiable input space, so clamp, clamp_min, and clamp_max now split the gradient evenly between the input and bound at an ordinary tie instead of assigning it entirely to the input. fmin and fmax use the same even tie split, and forward-mode AD for the min/max family is aligned with these rules. Code that intentionally depends on the old tie-breaking behavior can express it explicitly with torch.where, such as torch.where(value >= bound, value, bound).
Version 2.13:
import torch
x = torch.tensor(0.0, requires_grad=True)
torch.clamp_min(x, 0.0).backward()
print(x.grad) # tensor(1.)
value = torch.tensor(0.0, requires_grad=True)
bound = torch.tensor(0.0, requires_grad=True)
torch.clamp_min(value, bound).backward()
print(value.grad, bound.grad) # tensor(1.) tensor(0.)
Version 2.14:
import torch
x = torch.tensor(0.0, requires_grad=True)
torch.clamp_min(x, 0.0).backward()
print(x.grad) # tensor(0.)
value = torch.tensor(0.0, requires_grad=True)
bound = torch.tensor(0.0, requires_grad=True)
torch.clamp_min(value, bound).backward()
print(value.grad, bound.grad) # tensor(0.5000) tensor(0.5000)
Custom Python process groups that implement new_group() must now accept a backend keyword argument (#188489)
This applies when the default process group supplies its own new_group() method and torch.distributed.new_group() delegates subgroup creation to it. PyTorch now forwards the resolved backend so custom implementations can construct the requested subgroup correctly. Existing implementations without this parameter will raise TypeError: ... got an unexpected keyword argument 'backend'. Accept and use the argument, or accept and ignore it when the implementation has only one backend.
Before:
class MyProcessGroup(...):
def new_group(
self, ranks, *, timeout=None, pg_options=None,
group_name=None, group_desc=None
):
...
After:
class MyProcessGroup(...):
def new_group(
self, ranks, *, timeout=None, backend=None, pg_options=None,
group_name=None, group_desc=None
):
...
NCCL symmetric-memory pools no longer automatically upgrade segments allocated after register_mem_pool(..., symm=True) to symmetric windows (#192112)
Registering those late segments from the CUDA allocator callback could invoke a collective NCCL operation on only some ranks while holding the allocator lock, causing an unrecoverable hang. Late segments now remain ordinary registered NCCL buffers. Applications that need newly allocated segments to use symmetric-window algorithms must collectively deregister and register the pool again after those allocations are created.
Before:
backend.register_mem_pool(pool, symm=True)
with torch.cuda.use_mem_pool(pool):
tensor = torch.empty(size, device="cuda")
# Newly allocated segments were automatically upgraded, but this could hang.
After:
backend.register_mem_pool(pool, symm=True)
with torch.cuda.use_mem_pool(pool):
tensor = torch.empty(size, device="cuda")
# Collectively refresh registration after the pool grows.
backend.deregister_mem_pool(pool)
backend.register_mem_pool(pool, symm=True)
Nonmember ranks now receive GroupMember.NON_GROUP_MEMBER instead of None from experimental torch.distributed.split_group() (#190725)
When the calling rank is absent from every requested split, split_group() now returns the same nonmember sentinel as new_group(). Code that identifies nonmembers with is None must compare against torch.distributed.GroupMember.NON_GROUP_MEMBER instead.
Before:
group = torch.distributed.split_group(
split_ranks=[[0, 1], [2, 3]]
)
if group is None:
return
After:
group = torch.distributed.split_group(
split_ranks=[[0, 1], [2, 3]]
)
if group == torch.distributed.GroupMember.NON_GROUP_MEMBER:
return
Remove the deprecated torch.cholesky() and Tensor.cholesky() APIs (#186817)
Calls now raise a RuntimeError directing users to torch.linalg.cholesky(). The replacement returns a lower-triangular factor; callers that previously requested upper=True should take the conjugate transpose with .mH.
Version 2.13:
lower = torch.cholesky(a)
upper = torch.cholesky(a, upper=True)
Version 2.14:
lower = torch.linalg.cholesky(a)
upper = torch.linalg.cholesky(a).mH
Remove the deprecated torch.qr() and Tensor.qr() APIs (#186815)
Calls now raise a RuntimeError directing users to torch.linalg.qr(). Replace the Boolean some argument with mode="reduced" or mode="complete".
Version 2.13:
q, r = torch.qr(a)
q_full, r_full = torch.qr(a, some=False)
Version 2.14:
q, r = torch.linalg.qr(a, mode="reduced")
q_full, r_full = torch.linalg.qr(a, mode="complete")
The deprecated use_cuda argument has been removed from torch.profiler.profile and torch.autograd.profiler.profile (#192543)
Passing use_cuda to either profiler now raises TypeError: profile.__init__() got an unexpected keyword argument 'use_cuda'. Select CUDA explicitly through activities when using torch.profiler.profile, or use use_device="cuda" with torch.autograd.profiler.profile.
Version 2.13:
with torch.profiler.profile(use_cuda=True) as prof:
run_workload()
with torch.autograd.profiler.profile(use_cuda=True) as prof:
run_workload()
Version 2.14:
with torch.profiler.profile(
activities=[
torch.profiler.ProfilerActivity.CPU,
torch.profiler.ProfilerActivity.CUDA,
]
) as prof:
run_workload()
with torch.autograd.profiler.profile(use_device="cuda") as prof:
run_workload()
The tvm backend now uses TVM's relax frontend exclusively; the relay path has been removed (#190766, #189639)
Relay was removed in TVM 0.20, so the backend now requires a TVM providing tvm.relax.frontend.torch. Two things are gone with it: the relay-only scheduler / trials options, replaced by a TVM pipeline passed as options={"pipeline": ...}; and the tvm_meta_schedule / tvm_auto_scheduler backend entry points, which no longer exist in torch._dynamo.backends.tvm. With an older TVM installed, torch.compile(..., backend="tvm") now raises ImportError: Please install apache-tvm to use the tvm backend.
Version 2.13:
opt = torch.compile(model, backend="tvm", options={"scheduler": "meta_schedule", "trials": 20000})
# or through the relay-only entry points
from torch._dynamo.backends.tvm import tvm_meta_schedule, tvm_auto_scheduler
Version 2.14:
import tvm
pipeline = tvm.relax.get_pipeline("static_shape_tuning", target="llvm", total_trials=2000)
opt = torch.compile(model, backend="tvm", options={"pipeline": pipeline})
# tvm_meta_schedule / tvm_auto_scheduler no longer exist:
# ImportError: cannot import name 'tvm_meta_schedule'
Remove the deprecated zero-argument C++ overloads c10::Scalar::isIntegral() and c10::isIntegralType(ScalarType) (#187115)
Code that calls either overload without specifying whether Boolean values count as integral will no longer compile. Pass includeBool explicitly; use false to preserve the removed overloads' behavior.
Version 2.13:
bool scalar_is_integer = scalar.isIntegral();
bool dtype_is_integer = c10::isIntegralType(dtype);
Version 2.14:
bool scalar_is_integer = scalar.isIntegral(/*includeBool=*/false);
bool dtype_is_integer =
c10::isIntegralType(dtype, /*includeBool=*/false);
setup.py is now a deprecation shim; build PyTorch through pip or python -m build (#180248)
setup.py is now a thin shim. install and develop still forward to pip, but
build, bdist_wheel, clean, sdist and the rest print the replacement
command instead of falling through to setuptools. Builds that already go through
a PEP 517 frontend are unaffected, since pip and python -m build never ran
setup.py. The shim prints the schedule: install/develop keep forwarding
through 2.15, every command stops working in 2.16, and setup.py is removed
in 2.18.
Version 2.13:
python setup.py bdist_wheel
Version 2.14:
python -m build --wheel --no-isolation
The C++ MPS macOS-version helper and its enum members have been renamed (#188645)
Downstream C++ code that includes <ATen/mps/MPSDevice.h> must replace the exported at::mps::is_macos_13_or_newer() function with at::mps::is_macos_at_least(). The associated MacOSVersion members also drop the VER and PLUS portions of their names. No compatibility aliases are provided, so code using the old names will no longer compile.
Version 2.13:
const bool supported = at::mps::is_macos_13_or_newer(
at::mps::MacOSVersion::MACOS_VER_15_0_PLUS);
Version 2.14:
const bool supported = at::mps::is_macos_at_least(
at::mps::MacOSVersion::MACOS_15_0);
Complex type promotion for bfloat16 now uses the new torch.bcomplex32 shell dtype instead of torch.complex64 (#186928)
torch.bcomplex32 stores real and imaginary components as bfloat16. Operations that combine a bfloat16 tensor with a complex scalar or otherwise request its corresponding complex type can therefore produce bcomplex32 instead of complex64. Because bcomplex32 is a shell dtype with limited operator support, an operation that previously ran in complex64 may now raise a not-implemented error. Explicitly cast to complex64 when the previous precision or operator coverage is required.
Version 2.13:
x = torch.ones(4, dtype=torch.bfloat16)
assert torch.result_type(x, 1j) == torch.complex64
Version 2.14:
x = torch.ones(4, dtype=torch.bfloat16)
assert torch.result_type(x, 1j) == torch.bcomplex32
# Preserve the previous complex64 behavior explicitly.
y = x.to(torch.complex64) + 1j
Selective activation checkpointing will change to honor surrounding saved_tensors_hooks by default; use the new respect_saved_tensors_hooks argument to choose the behavior explicitly (#190581)
The current default, None, preserves the legacy behavior in which tensors retained by selective activation checkpointing bypass user hooks, but now emits a FutureWarning when hooks are active. Pass True to opt into the future behavior or False to preserve the legacy behavior without a warning. This option requires use_reentrant=False.
Before:
with torch.autograd.graph.saved_tensors_hooks(pack, unpack):
output = torch.utils.checkpoint.checkpoint(
function,
input,
use_reentrant=False,
context_fn=sac_context_fn,
)
After:
with torch.autograd.graph.saved_tensors_hooks(pack, unpack):
output = torch.utils.checkpoint.checkpoint(
function,
input,
use_reentrant=False,
context_fn=sac_context_fn,
respect_saved_tensors_hooks=True,
)
Use torch.compiler.config.compile_on_one_rank instead of torch.distributed.config.compile_on_one_rank (#187869)
The distributed spelling remains as a forwarding alias but now emits a FutureWarning. The preferred environment variable is also TORCH_COMPILE_ON_ONE_RANK; the older TORCH_DISTRIBUTED_COMPILE_ON_ONE_RANK remains supported for compatibility.
Before:
import torch.distributed.config
torch.distributed.config.compile_on_one_rank = True
After:
import torch.compiler.config
torch.compiler.config.compile_on_one_rank = True
The experimental profiler_metrics and profiler_measure_per_kernel options no longer enable CUPTI range profiling and now emit a FutureWarning when set to a non-default value (#187204)
Kineto no longer supports this range-profiler path on PyTorch's supported CUDA versions. The arguments remain accepted temporarily for compatibility, but they are ignored and have no direct replacement.
Before:
config = torch.profiler._ExperimentalConfig(
profiler_metrics=["sm__cycles_elapsed.avg"],
profiler_measure_per_kernel=True,
)
After:
config = torch.profiler._ExperimentalConfig()
The with_modules profiler option is deprecated and now emits a FutureWarning (#192808)
with_modules=True only collected module hierarchy for TorchScript models and did nothing in eager mode. For eager models, use with_stack=True to record nn.Module events.
Before:
with torch.profiler.profile(with_modules=True) as prof:
run_workload()
After:
with torch.profiler.profile(with_stack=True) as prof:
run_workload()
torch._dynamo.config.enable_faithful_generator_behavior is deprecated and is now a no-op (#189894)
Faithful (lazy) generator tracing has been the default and is the only supported behavior, so the dead eager-exhaustion path was removed. The config is kept as a deprecated setting that always behaves as True, so setting it does not error but no longer changes anything.
Version 2.13:
# generators were eagerly exhausted on first execution
with torch._dynamo.config.patch(enable_faithful_generator_behavior=False):
torch.compile(fn)(x)
Version 2.14:
# the flag is ignored; generators are always traced lazily
torch.compile(fn)(x)
Deprecate CUDAGraph.register_generator_state(); CUDA graphs now register generator state lazily on first RNG use during capture (#176753)
The method is now a no-op and emits a deprecation warning. Remove explicit registration calls; the graph automatically retains the required state when the generator is used during capture.
Before:
graph = torch.cuda.CUDAGraph()
state = generator.graphsafe_get_state()
graph.register_generator_state(state)
with torch.cuda.graph(graph):
generator.graphsafe_set_state(state)
output = torch.rand(16, device="cuda", generator=generator)
After:
graph = torch.cuda.CUDAGraph()
state = generator.graphsafe_get_state()
with torch.cuda.graph(graph):
generator.graphsafe_set_state(state)
output = torch.rand(16, device="cuda", generator=generator)
Deprecate GreenContext.set_context() and GreenContext.pop_context(); use custom streams to activate a green context instead (#188419)
These methods now emit a FutureWarning. Create a stream from the green context and use it with torch.cuda.stream() instead. Synchronization with streams outside the green context remains the caller's responsibility and should use CUDA events when needed.
Before:
ctx = torch.cuda.green_contexts.GreenContext(num_sms=1)
ctx.set_context()
try:
output = model(input)
finally:
ctx.pop_context()
After:
ctx = torch.cuda.green_contexts.GreenContext(num_sms=1)
stream = ctx.Stream()
with torch.cuda.stream(stream):
output = model(input)
TorchScript APIs now emit visible FutureWarnings instead of normally hidden DeprecationWarnings (#189914)
Calls such as torch.jit.script, torch.jit.trace, torch.jit.save, and torch.jit.load now visibly direct users toward torch.compile or torch.export. Imports of torch.utils.mkldnn, torch.fx.experimental.optimization, and torch.distributed.optim also avoid eagerly compiling TorchScript when those modules are merely imported.
Before:
scripted = torch.jit.script(model)
torch.jit.save(scripted, "model.pt")
After:
exported = torch.export.export(model, example_inputs)
torch.export.save(exported, "model.pt2")
torch.accelerator.initial_seed(), torch.accelerator.get_rng_state(), and torch.accelerator.get_rng_state_all() for backend-agnostic accelerator RNG inspection (#186597)Tensor.__dlpack__(read_only=True) and torch.utils.dlpack.ReadOnlyTensorWrapper, including copy-on-write-preserving exchange with compatible consumers (#188554)torch.Generator.philox_state() so Python-authored kernels can reserve Philox counter ranges that remain correct across CUDA Graph capture and replay (#191019)torch.utils.checkpoint.checkpoint() can now be called without a function to create an eager-mode decorator with checkpoint configuration separated from the wrapped function's arguments (#189411)
checkpointed_function = torch.utils.checkpoint.checkpoint(
use_reentrant=False
)(function)
output = checkpointed_function(*args, **kwargs)
The curried form is initially supported in eager mode; existing direct calls remain the compatible form under torch.compile.
Add torch.autograd.graph.node_creation_hook, a thread-local context manager whose callback receives every fully populated autograd graph node created within its scope. The callback can inspect nodes, store metadata, or register backward pre-hooks and post-hooks, including for nodes created during higher-order differentiation and checkpoint recomputation (#189284)
Add ctx.set_output_grad_dtype(*dtypes) for custom torch.autograd.Function implementations. Called once from forward or setup_context, it declares the gradient dtype expected for each output independently of the output's storage dtype; a concrete dtype converts incoming gradients, while None leaves their dtype unchanged (#189634)
Add second-order gradient support for torch.cdist and torch.nn.functional.pdist, so grad-grad computations no longer fail because _cdist_backward or _pdist_backward lacks a derivative (#188901)
DebugMode.save_logs() and DebugMode.load_logs() so distributed execution logs can be compared across separate processes or model configurations (#185010)torch.distributed.set_timeout() API; the private _set_pg_timeout() alias remains available with a deprecation warning (#187387)torch.distributed.tensor.logspace for constructing distributed logarithmically spaced tensors (#186398)torch.distributed.get_backend_impl() and ProcessGroup.get_backend() accessors for custom backend development (#187494)torch.distributed.tensor.linspace for constructing distributed linearly spaced tensors (#187933)nccl2 backend (#189359, #189360)nccl-lazy backend, which creates per-peer NCCL point-to-point communicators on demand (#189362)CheckpointableTensor protocol so distributed checkpointing can save and load torch.Tensor objects exposing global_shape, global_offsets, local_offsets, and local_sizes metadata (#189492)nccl-legacy backend and the TORCH_DIST_USE_NCCL2=1 opt-in for selecting the experimental replacement behind the nccl name (#191272)ProcessGroupNCCL.Options.config.comm_name to assign readable communicator names for NCCL logs and profiler tools (#191001)torchrun --log-line-prefix-template and a ${hostname} template variable for identifying the host that emitted each worker log line (#191265)arg_mbs, kwarg_mbs, and target_mbs (#188500)torchrun through --print-completion and the shtab package (#191289)torch.linalg.polar() for computing A = U @ H for matrices with at least as many rows as columns, using a portable SVD implementation and cuSOLVER QDWH acceleration for eligible CUDA inputs (#185837)torch.linalg.matrix_sqrth for computing the principal square root of symmetric or Hermitian positive-definite matrices, with support for batched inputs, autograd, vmap, and torch.compile (#187987)torch.cuda.tunable.set_cublaslt_requested_algo_count() and PYTORCH_TUNABLEOP_CUBLASLT_REQUESTED_ALGO_COUNT (#186270)Memory snapshots can now include CPU pinned-memory allocations by passing record_pinned_host_memory=True to torch.cuda.memory._record_memory_history() (#182407)
Pinned-memory allocator state and history are available in the snapshot's host_segments and host_traces fields. Pass record_cuda=False to record only pinned host memory; the web memory visualizer does not yet display host-memory data.
Profiler events now expose Kineto metadata as typed values through FunctionEvent.metadata when expose_kineto_event_metadata=True is enabled (#191756)
The new dictionary avoids reparsing JSON strings and automatically includes metadata fields supported by the active profiler backend.
torch.compiler.nonstrict_trace as a public API (#187737)switch higher-order op, which selects between N branches by index and mirrors jax.lax.switch. It is available as from torch._higher_order_ops.switch import switch and lowers to torch.ops.higher_order.switch; autograd is not yet supported (#182902, #188374, #189028)ShapesSpec / ParamsSpec, now accepted by strict and non-strict torch.export.export, make_fx(tracing_mode="fake"), and torch.compile through a shared dynamic_shapes= keyword (#185982, #186751, #187602, #187010)scan, map, and switch higher-order ops when gradients are disabled; Inductor lowering for these mutations is not yet supported (#186474, #187568, #188903)torch.cuda.use_mem_pool inside a compiled region, so allocations in the context - including fallback and extern kernels - are routed to the pool (#185057)logging.Logger methods that are explicitly registered in torch._dynamo.config.reorderable_logging_functions, so supported positional-argument logging calls run after the compiled region instead of causing graph breaks (#190840)torch.addmm, including fused bias and supported pointwise epilogues (#189774)torch._inductor.config.reorder_for_locality_in_training setting for applying locality-based graph reordering to training graphs (#186643)torch._inductor.config.triton.cudagraph_trees_generation_cloning = "user_visible", preserving live user-visible outputs across generations (#188078)bfloat16 support to torch.fft operations and torch.stft on CUDA and add float16/bfloat16 support on XPU. Native CUDA bfloat16 cuFFT execution requires SM80 or newer and power-of-two transform sizes; unsupported CUDA and XPU cases promote to float32. CPU FFT continues to reject these low-precision dtypes (#180766)autotuning_inputs log artifact, enabled with TORCH_LOGS=autotuning_inputs, to report Triton autotuning input shapes, dtypes, strides, and scalar values (#184399)switch control-flow operator on CPU and GPU, including dynamic shapes, multiple outputs, and AOTInductor; CUDA graphs remain unsupported for graphs containing switch (#188976)torch.compiler.precompile for dimensions marked with torch._dynamo.decorators.mark_unbacked, allowing one artifact to serve multiple runtime sizes without guarding on the marked dimension (#189165)torch.compiler.cudagraph_mark_warmup_incomplete() so code can request another CUDA Graph Trees warmup iteration (#191386)Add AOTInductorModelContainerCreateWithExternalConstants, allowing callers to construct an AOTInductor model container from caller-owned weight tensors for zero-copy sharing such as CUDA IPC (#188643)
The new C API skips loading constants from the package and leaves ownership with the caller. Existing model-container creation and constant-loading paths are unchanged unless external constants are explicitly provided.
Support explicit user-defined streams in the AOTInductor C++ wrapper. A compiled region that selects a stream with torch.cuda.stream(...) now emits stream-guard code so its kernels run on the requested stream, instead of always running on the default stream (#182971)
torch.fx.experimental.dynamic_spec.dynamic_spec decorator for attaching a dynamic-shape specification to a function or nn.Module.forward. torch.compile, torch.export.export, and make_fx automatically use the attached specification; passing a conflicting call-site specification raises an error (#187639)length argument to the prototype torch._higher_order_ops.scan, allowing a scan to run for a fixed number of steps when xs=None, matching the corresponding jax.lax.scan usage pattern (#188349)torch.nn.functional.scaled_dot_product_attention, including native grouped key/value heads, implicit multi-query attention broadcasting, and backward support under vmap (#191085)torch::stable::tensor_from_pyobject and torch::stable::tensor_to_pyobject for converting between Python torch.Tensor objects and torch::stable::Tensor (#183323)c10/util/complex_utils.h helpers and the ATen/NumericUtils.h _isinf and _isnan implementations into the header-only ABI (#192552, #192557)torch::stable::permute and the dtype overload of torch::stable::view (#192083)torch::stable::Tensor overloads for bitwise_and, bitwise_or, bitwise_left_shift, bitwise_right_shift, index_select, floor_divide, and is_pinned (#191973, #192097)torch::stable::Tensor::has_storage() (#189877)Expand Python 3.15 and free-threaded (no-GIL) Python 3.15t binary coverage to Windows and macOS, completing support across the PyTorch release matrix (#189722, #190360, #190361, #186033)
PyTorch 2.14 publishes Python 3.15 and 3.15t wheels for Linux on x86-64 and aarch64, Windows x86-64, and macOS on Apple silicon, covering the applicable CPU, CUDA, ROCm, and XPU builds. torchvision 0.29.0 publishes matching Python 3.15 and 3.15t wheels for the same supported platform and accelerator combinations. This is binary and eager-runtime support; torch.compile remains unsupported on Python 3.15 in this release.
Add a cuBLASLt backend for grouped GEMM on Hopper and Blackwell GPUs with CUDA 13.3 or newer (#177037, #190372)
The backend supports float16 and bfloat16, works with torch.compile and CUDA Graphs, and is selected by default for eligible float16 workloads. Set torch.backends.cuda.matmul.prefer_cublaslt_grouped_gemm = True to opt into it for bfloat16. Matrices and leading dimensions must be 16-byte aligned, so some shapes may require padding and slicing.
Add torch.cuda.memory._annotate_tensor() for attaching metadata to a live CUDA tensor allocation after it is created (#190575)
Each annotation is recorded as a timestamped memory-history event, multiple annotations accumulate without replacing allocation-time metadata, and memory snapshot tools display the annotations alongside the affected allocation. Memory history must be enabled with torch.cuda.memory._record_memory_history() for annotations to be observable. Only the native CUDA caching allocator supports annotations.
Add the public torch.cuda.graph_annotations module (#189417)
Annotate backward kernels in mark_kernels via node_creation_hook (#191563)
Allow multiple memory pools in a single CUDAGraph (#187929)
Add CUDA graph support for torch.while_loop (#186055)
Add destroy callbacks and object retention to torch.cuda.CUDAGraph (#190582)
Add replay start/end hooks to torch.cuda.CUDAGraph (#190602)
Add global CUDA graph capture-start/end and replay-start/end hooks, plus torch.cuda.CUDAGraph.register_capture_start_hook() (#192162)
(d_qk, d_v) = (256, 256) (#185553)torch.nn.functional.ctc_loss (#187716, #188187)torch.linalg.matrix_exp, including complex inputs, on macOS 15 or newer (#188954)float32 and complex64 MPS implementations of torch.linalg.svd, svdvals, eigh, eigvalsh, and lstsq, while retaining CPU fallbacks for small matrices and matrices that exceed threadgroup memory (#185954)gfx1250; CK SDPA/GEMM, FP8 grouped GEMM, and int4 matrix multiplication remain unsupported (#187548, #188597, #188612)torch._scaled_mm and torch._scaled_mm_v2 on XPU (#181726, #181727, #187315)torch.xpu.list_gpu_processes to query per-process GPU memory usage on XPU (#185192)torch.quantile and torch.nanquantile to process float32 and float64 inputs larger than 2**24 elements on devices with float64 support by computing ranks in float64 (#187574)torch.nn.functional.linear_cross_entropy to handle probability targets for reduction="mean" and reduction="sum" when the target dtype matches the input and the target does not require gradients (#187053)torch.nn.Sequential indexing so integer keys resolve to Module and slices resolve to Sequential (#187758)memory_format overload to torch.nn.Module.to() so static type checkers accept calls such as module.to(memory_format=torch.channels_last) (#185117)"spectral_unclamped" scaling option to the adjust_lr_fn parameter of torch.optim.Muon (#187402)maximize parameter to torch.optim.LBFGS (#187309)torch.optim.LBFGS.step() a no-op for an empty parameter group (#191666)DTensor sharding strategies for matrix, attention, sorting, scanning, softmax, and related operations (#186667, #179068)ProcessGroup implementations to use batch_isend_irecv and the coalescing manager (#186964)TCPStore check fails (#187191)DTensor single-dimension strategies for tensor operations (#186754)ShardedTensor device transfers work with accelerator backends beyond CUDA (#185266, #187939)nccl2 backend (#189361)split_group support, complete Work semantics, nonblocking communicators, and uneven list collectives to the experimental nccl2 backend (#190943, #191517, #191528, #191542)nccl-lazy pair communicators in error reporting, suspend/resume operations, and memory statistics, and expand its shared backend coverage (#191553, #191556)nccl2 backend (#192108)nccl2 profiler traces (#192114, #192115)DTensor sharding for Conv1d, Conv2d, and Conv3d forward and backward (#192147)commName field while preserving user-specified communicator names (#192487)DTensor redistribution from final-dimension sharding to Partial("sum") (#191828)simple_overlap scheduler pass by default for compiled distributed workloads, moving collective starts earlier and waits later without reordering collectives or increasing peak memory (#184235, #184240)torch.linalg.polar on CPU, CUDA, and MPS (#189732)torch.linalg.eig on ROCm 7.14 or newer through hipSOLVER's generic Xgeev API, and update generated linear-algebra tests to recognize hipSOLVER implementations that do not require MAGMA (#188720)torch.backends.cuda.preferred_blas_library("ck") to select the CK GEMM backend on ROCm gfx90a devices by separating GEMM support from CK attention support (#187267)torch.linalg.eig, torch.linalg.ldl_solve, torch.linalg.solve, and torch.linalg.solve_triangular through hipSOLVER and hipBLAS paths (#185557)OVERHEAD activities, making collection costs visible on a dedicated track in exported traces (#187835)split_const_subgraphs() callers to supply an is_impure_node callback so destination-passing operations and other side-effecting nodes are preserved during dead-code elimination (#190716)get_source_partitions() return input nodes, output nodes, and parameters in deterministic graph order (#188965)torch.compiler.nested_compile_region reuse to source-backed objects, symbolic shapes, dataclasses, and namedtuples (#192003, #191806, #191817)staticmethod, built-in leaf modules, cross-device tensor.data swaps, raw unbacked SymInt inputs, zero-length scans, and methods reached through super() (#190673, #185722, #185980, #187273, #188348, #183850)out= tensors, sourceless DistributedDataParallel, dist.reduce_scatter, SDPAParams, and torch.linalg.polar (#185277, #185089, #187210, #190429, #190839, #188537)torch._check messages (#190324, #188576)min/max, integer bases and formatting, range/slice coercion, object and container subclasses, mutable string splits, rich comparisons, item mutation, and callable() (#191401, #191402, #191408, #187129, #186976, #189021, #187588, #185999, #188306, #191406, #190259, #186971)itertools, dict/set views, and range iterators (#188080, #189022, #186937, #187080, #186240, #188081, #188221, #189575)deque, dict, set, dict-view, __dict__, and list initialization fidelity (#187128, #188220, #191403, #189052, #191405, #186759, #186760, #186669, #186761, #186763, #188908, #187586, #187587, #187583, #187584)ZE_AFFINITY_MASK on XPU while preserving CUDA_VISIBLE_DEVICES behavior on CUDA (#183436)XPUCompileError for SYCL compilation failures and clear loaded XPU libraries when the code cache is reset (#183530)partitioned_scatter_memory_budget setting with memory-headroom controls; set partitioned_scatter_enabled = False to opt out (#184365)CXX="zig c++" when building Inductor-generated C++ code on POSIX systems (#186336)uniform_ and aten.uniform through a native decomposition instead of always falling back to eager execution (#187887)all_reduce operations (#188472)tlparse traces through the configurable compile-worker watchdog (#189485, #189486)torch.float8_e8m0fnu conversions directly on CPU and CUDA instead of relying on fallback conversion code (#190593)TORCH_LOGS=output_code during autotuning (#191381)int[], SymInt[], and optional integer-list arguments in AOTI eager cache keys, enabling cached compilation for operators such as new_zeros, mean.dim, and count_nonzero.dim_IntList (#187360)torch.cond and torch.while_loop when compiling with the AOTInductor dual-wrapper (#184736)AOTI_LOG_LOADING environment variable. When it is set, AOTInductor prints timing and diagnostic messages for each stage of constant loading, prefixed with [AOTI_LOAD], without requiring a rebuild (#186309)scatter, index_put, clone, and tensor-handle shim calls, so a failure inside one of these fallbacks raises an error instead of being silently ignored (#190909, #190910)ObjectSpec, SeqSpec, and DictSpec container types when using shape specifications with strict export (#186167)torch.linalg.vector_norm to the core ATen decomposition table used by ExportedProgram.run_decompositions(), including correct dim=() handling (#185735)out_dtype combinations for torch.mm, torch.bmm, and torch.baddbmm under fake/meta tracing; CUDA and XPU restrictions remain unchanged (#187096)dynamic_spec constraint (#187143)_foreach_mm path only when the loaded cuBLASLt version supports grouped GEMM (#189757)ExportedProgram remains valid when ONNX symbolic operations are inserted during retracing (#185090)-Wdeprecated-declarations diagnostics as warnings rather than errors in c10, ATen, and LibTorch builds (#189948)size_t allocation requests (#190652)libatomic to the manywheel builder image (#192254)DTensor (#190948), plus B200 smoke tests (#191705)nvidia-nvjitlink-cu12 runtime dependency of CUDA 12 wheels so it no longer forces an exact version (#186958)sm_107) awareness for NVIDIA Rubin GPUs with CUDA 13.4 or newer in extension builds and Inductor code generation (#190654)CUDAGraph debug flag, move debug_dump to Python, and add capture hooks (#187749)cudaMallocAsync pool and retry once before raising an out-of-memory error (#188110)torch.float16 and torch.bfloat16 support to torch.angle on CUDA (#191301)Half support to the eager torch.polar kernel (#192311)xeon/run_cpu.py to accept multiple values for --ncores-per-instance (#169916)return_aux(max_scores=True) in MPS flex_attention forward (#188362)SymInt captures in MPS flex_attention score and mask functions, including dynamically shaped compiled graphs (#188403)torch.linalg.polar (#189701)torch.nonzero on tensors containing more than 2**32 elements (#188816)flex_attention (#187722, #187768)torch.nan_to_num and correctly resize empty out= tensors (#189489)torch.geqrf support and align the MPS torch.linalg.qr implementation with other backends (#189192)torch.utils.hipify mappings for the cublasMath_t type, its enum values, and CUBLAS_COMPUTE_16F, so HIP-ported extensions that call cublasGemmEx with CUBLAS_COMPUTE_16F or set a cuBLAS math mode hipify cleanly without per-project aliases (#187752)rocm_smi to amd_smi (#190014)XPUCachingAllocator on XPU (#188789)fpmath mode for XPU deconvolution, matching the existing convolution behavior (#185606)clock_rate and power_draw device property queries through pyzes 0.1.2 (#188248, #188256)xe_stack_count, xe_regions_per_stack, xe_clusters_per_region, and xe_cores_per_cluster (#191477)exp, log, log1p, and tan on XPU (#176262)float16 and bfloat16 support to torch.sparse.sampled_addmm, including supported sparse-CSR backward paths (#187681)torch.linalg.vector_norm, allowing it to replace deprecated torch.norm calls on sparse COO tensors (#185309)torch.vmap to handle the scalar overload of torch.searchsorted (#188974)torch.vmap coverage for copy-view operations by routing them through existing batching rules (#187256)torch.repeat_interleave when repeats is batched; callers must provide a common output_size because per-example output lengths are data-dependent (#187702)Tensor.masked_fill_(), avoiding the slow fallback and its performance warning under torch.vmap (#175513)torch.vmap, including accelerator placement for scalar operands (#189176)torch.arange computing the wrong length for fractional arguments with an integer output dtype because it truncates those arguments too early (#185812)device="mkldnn" instead of triggering an internal assertion (#185711)DataLoader workers exit, preventing producer-side IPC references and allocations from being retained indefinitely (#190485)Enable eligible fused scaled dot-product attention backends for dense rank-3 inputs on CPU, CUDA/ROCm, and XPU instead of always falling back to the math implementation (#192271)
Rank-3 inputs are normalized to rank 4 with a singleton batch dimension before backend selection. This fixes fused execution for rank-3 and vmapped inputs, but automatic backend selection can change floating-point numerics, dropout RNG consumption, whether the result is a view, and higher-order-gradient support. Fused CUDA backends do not support the second derivatives provided by the math backend; code that depends on those semantics should explicitly select the math backend.
from torch.nn.attention import SDPBackend, sdpa_kernel
with sdpa_kernel(backends=[SDPBackend.MATH]):
output = torch.nn.functional.scaled_dot_product_attention(
query, key, value
)
Reject norm_type=0 in functional and module Lp pooling APIs with a descriptive ValueError instead of a deferred ZeroDivisionError (#187861)
Fix failures in memory-efficient scaled dot-product attention backward after torch.autograd.graph.save_on_cpu() changes an attention mask's aligned strides (#188246)
Fix a CUDA illegal memory access in memory-efficient scaled dot-product attention backward when only the floating-point attention mask requires gradients (#188302)
Make the cuDNN CTC loss backend correctly zero infinite losses and their gradients when zero_infinity=True (#176911)
Validate each output dimension for replication_pad2d and replication_pad3d so excessive negative padding raises a clear error instead of attempting to create a negative-sized tensor (#184254)
Fix silently incorrect CUDA gradients from channels-last avg_pool2d when padding is nonzero (#188345)
Make CPU eager and decomposed torch.nn.functional.softshrink cast scalar lambd values consistently for reduced-precision inputs (#186358)
Prevent CUDA avg_pool3d backward from corrupting gradients when an overlapping-window input contains more than 2**31 elements (#188229)
Reject non-positive kernel_size values in raw fractional_max_pool2d and fractional_max_pool3d operations instead of returning -inf outputs with invalid indices (#190480)
Support 64-bit indexing for channels-last CUDA bilinear upsampling so outputs with at least 2**31 elements no longer fail with CUDA error: invalid configuration argument (#185788)
Fall back to the ATen CUDA implementation when the fused RMSNorm override's normalized dimension exceeds the device's shared-memory capacity, avoiding compiler hangs or crashes (#186941)
Reject invalid dim types when constructing torch.nn.Softmax or torch.nn.LogSoftmax instead of failing later during the forward pass with a confusing overload error (#185055)
Handle misaligned input and weight storage in the fused RMSNorm override instead of raising Misaligned Tensor data on argument #0 (#186235)
Make CUDA float16 softmax with dtype=torch.float32 use the same persistent-kernel range as the float16 output path, fixing rounding inconsistencies for dimensions between 1025 and 2048 (#188247)
float16/bfloat16 casts in fused CPU torch.optim.SGD and torch.optim.Adagrad (#192545)torch.pow backward when the base is a Boolean scalar by promoting the scalar before computing its logarithm, avoiding an internal assertion failure (#182564)torch.pow backward under torch.compile(dynamic=True) when a Python integer exponent becomes symbolic, avoiding the NYI SymInt equality crash without specializing on the exponent (#185851)native_group_norm and native_group_norm_backward safely handle non-contiguous tensors, fixing vmap failures and possible out-of-bounds memory accesses (#186414)torch.ldexp gradient for negative integer exponents so it returns 2.0 ** exponent instead of zero (#186566)DeviceContext mode leaks during checkpoint recomputation and default-device restoration (#189286)cudaErrorStreamCaptureIsolation failures and providing an actionable error when the crossing cannot be safely skipped (#189591)native_group_norm_backward kernel and its decomposition by applying the missing upcasts (#190245)register_full_backward_pre_hook-only modules from emitting a warning intended for register_full_backward_hook when their forward inputs do not require gradients (#190685)vmap for channels-last inputs, which previously raised NYI: querying is_contiguous inside of vmap (#191678)torch.autograd.Function validation error messages (#191748)log2 and log10 backward accuracy by using named mathematical constants, including a correctly rounded double-precision log(10) constant (#192613)ProcessGroup subclasses through the (store, rank, size) constructor and ensure their virtual overrides are dispatched correctly (#186853)root arguments in torch.cuda.nccl.broadcast instead of always broadcasting from the first tensor (#187216)output_mask (#187383)torch.distributed.set_timeout() a no-op for fake process groups and warn rather than fail for backends that cannot configure timeouts (#187693)LocalDeviceMesh from returning stale coordinates after a temporary submesh is destroyed and its object ID is reused (#187052)torch.compile(mode="reduce-overhead") because tensors were retained by the wrong work object (#187433)barrier() for the NCCL symmetric-memory backend instead of raising a not-implemented error (#188051)fsync() so buffered writes are persisted correctly on remote filesystems such as GCS (#183877)hipMemMap calls causing symmetric-memory failures on ROCm (#188673)devices argument incorrectly registering each character as a device type (#187960)summon_full_params(offload_to_cpu=True) accessing freed storage when the flattened parameter is already on CPU (#188990)nccl2 backend (#190138)torch.distributed.nn.functional.broadcast producing a zero source gradient for subgroups whose local and global source ranks differ (#190583)nccl2 backend (#190370)GroupMember.NON_GROUP_MEMBER consistently from locally synchronized new_group calls on nonmember ranks (#190588)avg reduction in functional all_reduce backward instead of rejecting it after a successful forward pass (#190224)nccl2 backend (#190622, #190682)nccl2 backend (#191109)new_group ranks through Python's integer protocol so tensor integer ranks work and non-integral values fail clearly (#191377)all_to_all_single with uneven split sizes in LocalTensorMode and raise a clear error for inconsistent splits (#190311)monitored_barrier when TorchComms is enabled (#189070)CommDebugMode hooks from leaking or double-running when a module executes more than once (#191452)nccl2 backend and validate full device identities (#191510)nccl2 (#191511)device_id through ProcessGroupWrapper so debug wrappers do not hang with heterogeneous rank-to-GPU mappings (#182273)nccl-lazy so NCCL symmetric-memory rendezvous can find the primary communicator (#191544)nccl-lazy instead of advertising incomplete membership-change support (#191549)nccl2 when deterministic algorithms are enabled, matching the legacy NCCL backend (#192104)nccl2 watchdog errors, timeouts, explicit aborts, and normal teardown from unconditionally terminating the process (#192105)split_group crashes when the world process group was not the first backend instance created in the process (#192106, #192109)nccl2 process-group initialization failing before the CUDA caching allocator has been initialized (#192107)split_group(backend=...) filtering for parent groups created with a bare backend name (#192111)TCPStore rendezvous under torchrun from hanging by using the agent store only for the agent's own address (#192113)bfloat16 NCCL PREMUL_SUM factors being interpreted as zero and silently producing zero gradients (#190747)address already in use message when TorchElastic retries TCPStore creation (#191561)allgather_into_tensor_coalesced under ProcessGroupWrapper (#185123)out as output-variant operators (#187466)cumprod, cummax, and cummin (#185228)read_dir() calls, including when loading fails (#191607)destroy_process_group() hanging after collectives run on partially split process groups by keeping group names consistent across ranks (#190431)transpose, permute, or movedim (#191784)local_map export failing inside nested compile regions (#186647)torch.linalg.cond() reporting a misleading overflow error for a complex norm order; invalid orders now raise ValueError with a clear message (#188591)torch.lu_unpack segfaulting when LU_pivots has a shape inconsistent with LU_data; invalid shapes now raise a clear error (#187660)torch.linalg.lstsq(driver="gelsy") returning an incorrect rank on CPU when stale pivot values leaked between batched LAPACK calls (#187436)torch.compile(dynamic=True) failing on torch.linalg.cond with p="fro" or p="nuc" because symbolic tensor sizes were queried as concrete values (#187614)TunableOp tuning silently using the wrong GEMM shape when a padded leading dimension matches another matrix dimension (#189355)CUBLAS_STATUS_NOT_SUPPORTED failures in matrix multiplication on CUDA compute capability 11.0 by increasing the default cuBLAS workspace to 32 MiB (#189312)torch.unravel_index() inputs whose shape contains a zero-sized dimension with a clear ValueError instead of an uncaught division-by-zero RuntimeError; empty indices remain supported (#191092)INT64_MAX into torch.uint64 tensors, which previously raised Overflow when unpacking long long (#191604)torch.nn.functional.adaptive_avg_pool2d backward for very large contiguous tensors whose element offsets exceed 32-bit indexing limits (#189082)key_averages() by default so frames such as threading.py: wait do not obscure operator-level hotspots; pass include_python_functions=True to retain the previous view (#188631)record_function profiling, preventing repeated warnings and tracebacks on systems with incompatible cupti-python versions (#187874)layout and dtype properties of profiler tensor metadata (#187068)torch.compile is invoked concurrently from multiple threads (#168999)GraphModule serialization when generated code contains string type annotations (#185051)Optional[Dict[...]] annotations on Python 3.14 (#190580)get_attr nodes whose targets cannot be resolved or refer to modules (#191939)GraphModule copies attributes, keeping those buffers out of state_dict() (#191708)torch.sym_not (#185147)NameError for complex constants whose imaginary component is nan or inf (#188596)skip_folding_node_fn recursively to call_module subgraphs so FX constant folding does not evaluate skipped or symbolic nodes inside them (#189487)tuple[...] annotations from get_signature_for_torch_op for operators that return multiple tensors (#189142)linecache loader warning when executing generated FX GraphModule code on Python 3.15 (#187221)next, set, and frozenset calls (#190624, #189051)torch.compiler.nested_compile_region graph reuse, eager autograd, graph capture, and transposed captured buffers (#192006, #184700, #186137, #191785)DeviceMesh submeshes (#188622, #191388, #187088, #191264, #191523, #189601, #187005, #187701, #188861)eager_then_compile for higher-rank inputs (#184689)torch.func, and autocast (#191128, #191418, #190576, #191428, #184850, #187736, #184562)fullgraph=True now errors (#189644)ctx.needs_input_grad, autocast state, overlapping-view storage, vmap gradients, and captured FlexAttention gradients (#191492, #186530, #187111, #186362, #188869)TorchDispatchMode skip state, symbolic lazy modules, and stale tracing weak references (#190185, #190287, #188595, #190951)vars, pybind enums, pytree equality, call errors, numeric conversion, descriptors, custom isinstance, deque reinitialization, sequence/set operators, subclass types, slice errors, and attribute probing (#185128, #188605, #190649, #190797, #190257, #190776, #186491, #188171, #189554, #189274, #189145, #187777, #190970)torch.combinations, indexed randperm, dynamic-output custom ops, tensor-subclass standalone compilation, torch.cond constants, duplicate kernel registrations, generic associative_scan, dynamic combo reductions, empty scatters, autograd expand, tuple graph outputs, aliased FX outputs, and fused positional arguments (#189305, #184066, #185601, #185638, #185838, #186262, #186633, #187275, #188466, #188758, #189887, #190255, #190976)addmm, remainder, min/max, low-precision scalar math, unsigned abs, CELU, Bessel functions, multiply-by-zero folding, signbit, floor division, cummax/cummin, cumsum, adaptive pooling, index propagation, and CPU integer arithmetic (#183511, #185168, #185970, #186818, #186933, #187024, #187321, #187354, #187580, #187941, #188049, #188361, #188556, #188862, #190328, #190427, #190531, #190566, #191132)expm1, small transposed GEMMs, and noncontiguous uniform_ (#185855, #186121, #188771, #189291, #189896, #185873, #190533, #191127, #191709, #192344)index_put_, including an out-of-bounds atomic that could produce wrong results; fix max-autotune failures with reused GEMM inputs or outputs and zero-hinted symbolic rows (#185325, #185767, #186523, #191502, #191861, #192553)_scaled_mm scale-shape compilation; fall back safely for _scaled_mm_v2 with swizzled MXFP8/NVFP4 scales; and fix complex signatures, float8 storage, dtype bitcasts, and CUTLASS INT8 target filtering (#183964, #185501, #186384, #188209, #189561, #189584, #192414)ConvTranspose2d, and unsupported 3D SDPA key permutations (#184132, #186067, #187372, #189660, #191260)addmm, torch.cond, fused epilogues, stride guards, tiling, and FX wrappers (#184566, #185369, #185778, #185890, #187371, #189529, #189890, #190965, #191605, #191811)score_mod, kernel options, sparse masks, and mixed or 64-bit captured indices (#185264, #185991, #186876, #187886, #187904, #188484, #188876)torch.use_deterministic_algorithms() for compiled scans (#183803, #183804, #186022, #186023, #186025, #187224, #188533, #189095, #189096, #190519, #191714)Enum metadata correctly (#184248, #186922, #186932, #187209, #189494)torch.linalg.eigh, and suppress internal TypedStorage warnings (#185541, #187427, #188384, #188641, #191383)typing_extensions, localized MSVC output, initialized CUDA, Windows path limits, Python 3.11/3.12, UTF-8 templates, dead workers, and library paths containing spaces (#185708, #185972, #187408, #187641, #187700, #189196, #189290, #191010)NoValidChoicesError (#190024)Any arguments, including distributed operators such as all_gather_into_tensor (#188124)SymInt, SymBool, or SymFloat arguments through boxed C++ wrapper dispatch, avoiding runtime API call failed errors (#188154)None passed to non-optional tensor arguments as an undefined tensor in C++ wrappers, matching eager custom-operator behavior (#188485)Tensor[] (#190551)std::array::data() pointers in generated CPU wrappers instead of relying on iterator-to-pointer conversion (#191240)Note truncated.
The named tensor feature (a long-deprecated prototype) has been fully removed to reduce overhead and code bloat. All associated Python and C++ APIs ar…
<table> <tr><td><strong>FlexAttention</strong> 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.</td></tr> <tr><td><strong>CuTeDSL "Native DSL" backend</strong> gives Inductor a second high-performance code path (alongside Triton) for key GPU operations, with faster compilation. [Prototype]</td></tr> <tr><td><strong><code>nn.LinearCrossEntropyLoss</code></strong> combines the final prediction and loss computation to cut peak GPU memory by up to 4x for large-vocabulary language model training.</td></tr> <tr><td><strong>torchcomms</strong>, a new communications backend for PyTorch Distributed, improves fault tolerance, scalability, and debuggability for large-cluster training.</td></tr> <tr><td><strong>FSDP2</strong> now overlaps reduce-scatter and all-gather communications via a dedicated process group (opt-in), increasing distributed training throughput.</td></tr> <tr><td><strong>Python 3.15 wheel support</strong> for PyTorch on Linux via the pytorch repository index, including builds compatible with free-threaded 3.15t.</td></tr> <tr><td><strong>Broader platform support</strong>: ROCm gains AOTriton 0.12b with native HIP CMake, Arm adds Armv9-A <code>torch.compile</code> targeting, and Intel XPU exposes new device telemetry APIs.</td></tr> </table>
For more details about these highlighted features, you can look at the release blogpost. Below are the full release notes for this release.
torch.compile on CPU in environments without a GPURunning 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). 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.
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:
# cp313t (free-threaded 3.13) wheels were available
python3.13t -m pip install torch
PyTorch 2.13:
# 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:
>>> from torch._C import parse_schema
>>> parse_schema("foo(PyObject x) -> ()") # accepted
PyTorch 2.13:
>>> from torch._C import parse_schema
>>> parse_schema("foo(PyObject x) -> ()") # raises a schema parse error
Remove Bazel build support (#180883)
The Bazel build was never broadly adopted and still depended on the antiquated Bazel 6,
while the wider ecosystem has since moved to Bazel 9. All Bazel build files and CI jobs have
been removed. Users building PyTorch with Bazel should migrate to the supported CMake/pip install
build flow.
PyTorch 2.12:
# Build PyTorch with Bazel
bazel build //:torch
PyTorch 2.13:
# Bazel build files have been removed; build from source with pip instead
pip install --no-build-isolation -e .
StorageImpl's built-in copy-on-write (COW) materialization is replaced by a pluggable materializer hook (#179063)
StorageImpl no longer knows about COW directly. Its internal COW entry points
StorageImpl::is_cow(), StorageImpl::maybe_materialize_cow(), and the friend
cow::materialize_cow_storage() have been removed in favor of a single pluggable
MaterializeFn hook (void(*)(StorageImpl*)) that a backend registers to run once,
on the first mutable data-pointer access. COW is now just one consumer of this hook
(c10::impl::cow::materialize_cow), and all COW behavior (lazy clone, refcounted
shared data, copy-on-write) is unchanged. This also gives accelerator backends and
eager-mode graph compilers a zero-fast-path-cost place to commit deferred allocations
or materialize symbolic buffers on first mutation.
This is a C++-only change. It affects out-of-tree backends/extensions that called the
removed StorageImpl COW symbols directly; they will fail to compile against 2.13
with errors such as no member named 'is_cow' in 'c10::StorageImpl'. Migrate to the
new hook API (set_materializer() / has_materializer() / clear_materializer()).
PyTorch 2.12:
// Detect a COW storage and force it to materialize.
if (storage.is_cow()) {
storage.maybe_materialize_cow();
}
PyTorch 2.13:
// Register a one-shot materializer; it runs on the next mutable-data access
// and then clears itself. COW registers c10::impl::cow::materialize_cow this way.
storage.set_materializer(&my_backend_materialize); // void(StorageImpl*)
// `has_materializer()` replaces `is_cow()` for "is a deferred materialization pending?"
if (storage.has_materializer()) { /* ... */ }
Convert shared_ptr<Node> to intrusive_ptr<Node> (#181139). This changes the signature of Tensor::grad_fn. Accesses to Tensor.grad_fn() should change from std::shared_ptr<Node> to c10::intrusive_ptr<Node>. Similarly, construction of a C++ autograd function should change:
PyTorch 2.12:
std::shared_ptr<CustomCppNode> node(new CustomCppNode(), torch::autograd::deleteNode);
PyTorch 2.13:
auto node = c10::make_intrusive<CustomCppNode>();
The minimum supported NCCL version when building from source is now 2.23 (#186292)
PyTorch now requires NCCL >= 2.23 at compile time, and the preprocessor/runtime gates that guarded NCCL features introduced in 2.23 or earlier have been removed. Users who build PyTorch from source against a system NCCL older than 2.23 will hit compile errors against the dropped gates. Upgrade the NCCL installation to >= 2.23 to build. The prebuilt PyTorch wheels already bundle a compatible NCCL, so pip/conda users are unaffected.
Remove named tensors (#173895)
The named tensor feature (a long-deprecated prototype) has been fully removed to reduce overhead and code bloat. All associated Python and C++ APIs are gone, including Tensor.names, Tensor.rename(), Tensor.refine_names(), Tensor.align_to(), Tensor.align_as(), torch.align_tensors(), the names= keyword on factory functions (e.g. torch.zeros, torch.empty, torch.ones), and the C++ Dimname / DimnameList APIs. Code that previously relied on named dimensions must track dimension order positionally and avoid usage of any of these now-removed APIs or op overloads.
The onednn::qconv2d_pointwise.binary and .binary_tensor operators no longer alias their input but rather return fresh tensors. Previously these ops mutated the qaccum input buffer and returned it directly, violating the PyTorch invariant that custom operator outputs must not alias inputs. This silently bypassed aliasing checks via the old -> Tensor(a!) schema and would become a hard error in a future PyTorch version (as mentioned in #182063), so the schema and implementation were corrected to return a fresh output. Most users are unaffected, only code that calls these ops directly and relies on the in-place mutation of qaccum must now read the returned tensor instead. (#177171)
Custom operators that return an output aliasing one of their inputs are deprecated (#182063)
When a custom operator returns an output that is the same tensor as (or otherwise aliases) one of its inputs under torch.compile, PyTorch now emits a UserWarning stating that this is deprecated and will become an error in a future version of PyTorch. Previously the warning stated the change would land in PyTorch 2.12; that timeline has been pushed back. To update your code, return a clone of the offending output instead of the input, or refactor the operator so it does not return the aliased tensor.
Deprecated:
@torch.library.custom_op("mylib::foo", mutates_args=())
def foo(x: torch.Tensor) -> torch.Tensor:
return x # output aliases the input -- deprecated
Updated:
@torch.library.custom_op("mylib::foo", mutates_args=())
def foo(x: torch.Tensor) -> torch.Tensor:
return x.clone() # return a clone instead
Creating tensors with the quantized dtypes quint8, qint8, and qint32 is now deprecated and emits a warning. This covers both Python and C++ call sites; see #184982 for migration guidance (#184984)
PyTorch 2.12:
>>> x = torch.quantize_per_tensor(torch.randn(3), 0.1, 0, torch.quint8)
PyTorch 2.13:
>>> x = torch.quantize_per_tensor(torch.randn(3), 0.1, 0, torch.quint8)
UserWarning: Creating tensors with quantized dtypes (quint8, qint8, qint32) is deprecated
Rename distributed collective ops to the _single naming scheme and deprecate the old names (#186123, #186124, #186125, #186134, #186135, #186144)
To align the public torch.distributed collective APIs with the naming used by torchcomms' TorchCommBackend, all_gather_into_tensor is renamed to all_gather_single and reduce_scatter_tensor to reduce_scatter_single. The previous names continue to work as thin wrappers that delegate to the new functions, but now emit a FutureWarning.
PyTorch 2.12:
dist.all_gather_into_tensor(output, input)
dist.reduce_scatter_tensor(output, input)
PyTorch 2.13:
dist.all_gather_single(output, input)
dist.reduce_scatter_single(output, input)
torch.Tag.inplace and torch.Tag.out, that let an operator declare how it writes its result: inplace means it mutates a tensor in place, and out means it writes into a caller-provided output tensor. Native PyTorch operators are tagged automatically, and custom operators defined with torch.library can opt in by adding the tag. To be tagged inplace, an operator must take the tensor it mutates as its first positional argument (declared as Tensor(a!), and the only mutable argument) and return that same tensor. Tagging a custom operator this way improves its behavior under torch.compile: inplace ops now go through auto_functionalize, so the reinplacing pass can analyze clones and skip unnecessary copies, and both inplace and out ops get their fake/meta kernels generated for free. See the Python custom operators tutorial for how to author and tag custom operators. (#181100, #181099, #184199, #184200, #184201, #184202, #184203, #180851, #180852)const_data_ptr() Python binding to torch.Tensor for read-only data pointer access (#180382)abbr property to torch.dtype that returns a dtype's short string abbreviation (e.g. torch.float32.abbr returns "f32") (#177296)Functions (#182206)rearrange in the torch.func namespace for einops-style tensor reshaping (#173183)nn.LinearCrossEntropyLoss, a fused linear-projection plus cross-entropy loss module that avoids materializing the full logits tensor (#181573, #185852, #172286, #186113)torch.autograd.graph.region_activation_memory_budget (#185979)dict to torch.autograd.grad and torch.autograd.backward (#178140)Add a registration API for symmetric memory arguments (lib.register_symm_mem_args()), letting operators (including out-of-tree ops) declare which arguments require symmetric-memory allocation (#173513)
Remove NCCLSymmetricMemory's explicit dependency on ProcessGroupNCCL, enabling symmetric memory to work with out-of-tree backends such as torchcomms (#184260)
Support accessing the ReduceOp.PREMUL_SUM factor from Python when implementing process group backends in Python (#185863)
Expose the NCCL 2.30 maxP2pPeers config binding (#181686)
Add rocSHMEM Triton integration for symmetric memory on ROCm (#178658)
Support passing extra keyword arguments to the loss function in pipeline schedules via a new loss_kwargs parameter to step(), enabling loss functions that require arguments beyond (output, target) (such as chunked cross-entropy needing token counts for scaling) (#181057)
FSDPModule.set_separate_reduce_scatter_group to give reduce-scatter its own NCCL communicator, enabling opt-in overlap of all-gather and reduce-scatter (#186335)set_reduce_scatter_max_input_buffers to keep multiple reduce-scatter input buffers in flight, so backward compute no longer stalls waiting to recycle a single reduce-scatter buffer (#186000)torch.compiler.set_default_backend to override the default torch.compile backend globally, so out-of-tree backend authors don't need to pass backend= at every call site (following the pattern of torch.set_default_dtype/torch.set_default_device). Explicit backend= arguments still take precedence (#178944)torch.compile(f, isolate_recompiles=True) to give each torch.compile call its own isolated cache bucket, preventing cross-compile interference in cache lookups and recompile-limit checks when multiple torch.compile calls target the same function (#178351)register_multi_grad_hook support to @leaf_function, allowing a backward hook to fire once per backward pass when all requires_grad inputs have their gradients computed (#179609)FlexAttention template (chosen when query length is 1) with a new configurable PARTITION_SIZE kernel option (#159835)decomp_comms) that eliminates all_gather for Gram-matrix optimizer patterns (Muon/Shampoo) under FSDP, gated by config.aten_distributed_optimizations.allow_comms_decompositions, yielding 1.25-1.95x training speedups (#184370)TORCH_TARGET_VERSION, so shims introduced in newer releases are only exposed when the target version supports them (#181916)torch._inductor.aoti_compile_and_package / aoti_load_package API, including packaging and loading of the multiple .so files emitted per kernel (#182251)torch_exception_get_what, torch_exception_get_what_without_backtrace, and STABLE_TORCH_ERROR_CODE_CHECK) so extensions built against the stable ABI can retrieve the original error message across the C API boundary (target version 2.13+) (#180135)aoti_torch_stream_native_handle and torch::stable::accelerator::Stream::nativeHandle(), gated behind TORCH_FEATURE_VERSION >= 2.13, for retrieving a native stream handle from the stable ABI (#183930)CUDAGraph.get_graph_data() for graph topology introspection (#183165)torch.distributions.Dirichlet on MPS by adding _sample_dirichlet and _dirichlet_grad Metal implementations (#185458, #185854)grid_sampler_2d backward support on MPS (#179756)grid_sampler_3d backward support on MPS (#179388)lcm support on MPS via a new Metal kernel (#186279)c10/metal/reduction_utils.h (#180708) and a complex->bool specialization (#185938)enable_language(HIP) (#180485)torch.xpu.* (#181082, #183427, #183428, #183429, #183430, #183431)scaled_mm on XPU (#173630, #176043)torch.load (#170592)Storage.pin_memory / Storage.is_pinned device-agnostic (#186223)op_overloads to OpOverloadPacket to enumerate an operator's overloads (#182993)num_splits in FlashAttention-2 and bump the flash-attention submodule (#179760)linear_bias in linear_cross_entropy on the reference and chunked paths (#185129, #185276)SequentialLR wrong learning rate initialization when milestones contain 0 (#185986)torch.nextafter (#148820)torch.autograd.enforce_grad_layout_policy to control the memory layout policy for accumulated gradients (#180552)When TorchComms is enabled, route new_group through split_group for subgroup creation, raising NotImplementedError for arguments split_group cannot honor (e.g. use_local_synchronization=True, sort_ranks=False) instead of silently falling back (#185416)
Delegate dist.new_group to custom process group subclasses (#184262)
Surface started-work metadata in NCCL watchdog timeouts (#183656)
Add a health check endpoint to the distributed debug server (#179326)
Make the DeviceMesh non-overlapping check stricter (#172343)
Allow elastic_launch/launch_agent to accept a pre-created torchelastic health check server, so it can be started before rendezvous (#180543)
Add an overlap_pp_comm flag to pipeline schedules (default True) that, when set to False, defers each pipeline RECV op to immediately before the compute op that consumes it, using rank-parity P2P ordering to avoid deadlock (helps platforms such as AMD ROCm where a pending RECV blocks unrelated compute) (#178815)
.out, inplace, functional, and foreach), expanding strategy coverage to hundreds of additional ops (#185386)scatter, upsample/interpolation backward, anti-aliased upsample, batch norm backward, and aten.detach_.default (#186149, #180311, #184626, #182743, #181876)torch.func.jvp) on models wrapped with fully_shard or replicate, including with mixed precision (#182732)Half and BFloat16 dispatch support for torch.trace on CPU (#184874)torch.linalg.lu (#185344).events() output (#180275)split_module now supports torch.Size crossing graph split boundaries by decomposing size() calls into per-dimension sym_size nodes, and builds submodules lazily for faster inference graph splitting (#179839)
CapabilityBasedPartitioner can now opt out of horizontal fusion via skip_horizontal_fusion=True, partitioning only through direct data dependencies (#184904)
Enable rewriting of FX traces containing complex tensors during compilation (#169832)
divmod (#185655)einops 0.8.2 (#185619), record_function as a decorator (#184703), inference_mode retracing helpers (#185066), mark_dirty in the autograd Function HOP (#184267), warn_only deterministic toggles (#180373), and the _maybe_view_chunk_cat functional collective (#180389)__setitem__/__delitem__) on more container types in Dynamo via sq_ass_item/mp_ass_subscript slots (#182862, #182996)torch.accelerator.device_index and torch.xpu.device in the device context manager (#181846, #181847)torch.compile: accept tl.constexpr values as kernel arguments (#181783) and handle capture_triton as a no-op during tracing (#183555)SeqSpec for list/tuple specs with better walk-spec errors (#185327), add ObjectSpec (#182764), pipe dynamic spec through torch.compile (#184501), and revisit guarding in mark_dynamic APIs (#181469)torch.compile device mismatch errors with a dedicated FakeTensorDeviceMismatchError and actionable guidance to place inputs, parameters, and buffers on the same device (#185412).any()/.all() (#180406), clearer torch._check tensor predicate errors (#185777), user-friendly reasons for skipped frames (#183596), carets in stack traces (#182393), and reporting why a symbol was created dynamically in symbolic_shapes logs (#168331)pin_memory for torch.ones, torch.zeros and torch.full (#174595)pointer_range_32 optimization (#179604)x_scale/x_zp and ReinterpretView strides (#181090)aot_inductor.autotune_per_kernel_alloc config to allocate-run-delete tensors per kernel during AOTI autotuning, avoiding OOM on large models (#181176)AsyncCompile future waits with the compile_worker_wait_timeout setting (#181293)a100_default_flex_config entries for head_dim=192 (#181835)aten.multinomial to avoid graph breaks (#182423)_scaled_mm_v2 (#182527)combo_kernel_autotune_grouping by default (#182567)cudagraph_partition_memory_budget config for partition reordering (#183569)bincount, unique variants, and AMP scale ops so they compile without graph breaks (#183590)addmm when the bias is a narrowing dtype cast (fp32->bf16/fp16) to preserve bias precision in XPU AMP training (#183680).grad buffer is invalidated on a later run (gradient accumulation) (#184003)index_add-style atomic scatter mutations into Triton template epilogues behind a config flag (#184179)cpp.march Inductor config knob so AOTInductor cpp-only builds can override or suppress the default CPU architecture flag (#184297)rsqrt, exp2, log2, log10, tan, acos, asin, atan, atan2, floor, logical_xor) (#184538)fake_mode argument to standalone_compile (with dynamic_shapes="from_example_inputs") so it can reuse the caller's FakeTensorMode/ShapeEnv instead of always creating a fresh one (#184776)signbit on unsigned integer dtypes (#185985)keep_static_cubin_raw config to retain cubin bytes in cached kernels so caches restored on another machine avoid recompilation (#186404)BatchLinearLHSFusion's matcher to also match the inlined torch._C._nn.linear form so the (opt-in) fusion can fire on Dynamo-inlined linear (#186632)torch._C._nn.linear operations are grouped into a single batched kernel (#180477)detach() method calls (#180513)update_constant_buffer (#181114)shim.h (#178120)cudaMemcpy for AOTI constant loading to reduce peak memory usage (#184823)proxy_executor error messages (#180884)cpp_wrapper (#182089)AOTIModelPackageLoader (#182149)torch.export save/load (#181676)torch.export-able (#179686)UpdateConstantBufferFromCpu for host-to-device copy (#181637)merge_view_inputs error messages, so non-differentiable view input mutation errors identify the specific offending inputs (#180424)_transformer_encoder_layer_fwd so it traces under torch.compile (#183916)torch.compile on AArch64 (#184555)c10d collectives in standalone compile (#181836)_foreach_max (#173483)adaptive_max_pool2d and adaptive_max_pool3d decompositions for ONNX export (#184396)set_python_module on torch::Library (#182720)== overloads for HeaderOnlyArrayRef (#185379)torch::stable::Generator (#186423)c10::layout typecaster for torch.layout (#179607)def_static (#175644)setup.py to CMake (#177641)BinaryDivFloorKernel.cu (#179260)opmath_t in i1 and i1e CUDA kernels (#183778)resize_ with address hint (#178215)bfloat16 in _embedding_bag_per_sample_weights_backward on CUDA (#185889)parsePerProcessMemoryFraction's return type with other parsers (#185139)cuda-bindings version is too old (#185990)torch.cuda.current_solver_handle for cuSOLVER handle sharing (#176705)cudnn_frontend submodule to 1.24 (#185554)bernoulli (#182210), native_dropout (#182232), uniform/normal/randint (#182386), randperm (#182528), comparison ops eq/ne/lt/le/gt/ge (#183019), bitwise ops (#182839), scatter/gather (#184028), copy-cast (#184740), gelu/gelu_backward (#181451), replication pad (#183065), embedding backward (#185119), trace (#183627), count_nonzero (#180725), amax/amin/aminmax/all/any (#180752), and cumsum/cumprod (#185609), native_group_norm (#183830, native_group_norm_backward #184437), topk and kthvalue Metal kernels (#184106), single-block and multi-block sort, including a stable sort path (#180714, #182242, #181736)histc (#178624)out variants of unary ops (#184743)is_causal support (#181855), head dim 256 (#181852), float mask support (#183458), and a clearer error for causal + attn mask (#181856).contiguous() calls: Col2Im (#181949), Im2Col (#182709), Repeat (#182718), LossOps (#182714), and HistogramKernel (#181951)NDHWC+DHWIO fast path for Conv3d on channels_last_3d (#184612)torch.mps.empty_cache() (#181485)stride > 0 in pool ops (#184875), F.fold (#182067), im2col (#183593), and bernoulli probabilities (#185065)dropout_p (#184126)cub::DeviceHistogram hipify mappings (#180433)head_dim != head_dim_v, use_deterministic_algorithms, gfx1100 and gfx1151 promoted out of experimental, partial FAv3 support on gfx950 (#184288)last_level_cache_size and is_integrated_gpu to XPU device properties (#184499, #182624)_fused_adagrad_ (#185577)torch.xpu.device in Dynamo device management (#181847)bmm_outer_product Triton override on XPU (#180441)vmap batching rule for torch.unbind_copy (#178035)vmap batching rule for Tensor.view(dtype) (aten::view.dtype) (#180728)mat1/mat2 layouts in sspaddmm and clarify error messages (#179037)opt_dtype validation to torch.nanmean() for consistent error handling (#172809)torch.nansum integer output dtype through nan_to_num + sum for correct results (#183808)CUDAStream::stream() (#184237)logspace/linspace ref tests with upstream XFAIL state (#178734)DataLoader file descriptor leak from atexit cleanup (#176607)stride/padding/kernel_size length in slow_conv3d (#181063)math_channel_shuffle (#181029)delta type in nn.HuberLoss constructor (#184012)torch/serialization.py so it matches the true values (#180959)layer_norm on CUDA for tensors with more than 2^32 elements (#181600)NestedTensor inputs in flex_attention with a clear error instead of an unclear backend failure (#183516)reflection_pad1d backward CUDA launch for large batches (#185024)lp_pool infinity norm handling (#183997)torch.autograd.enforce_grad_layout_policy decorator state leak (#183868)Fix NCCLComm::abort() to use the correct deregister API for window-registered handles (#181626)
Fix FakeProcessGroup all_gather on tensors that require grad (#181790)
Fix gather and allgather_coalesced on FakeProcessGroup to copy input to output (#182364)
Fix the scatter and reduce_scatter family on FakeProcessGroup to copy input to output (#182365)
Fix all_to_all on FakeProcessGroup and validate splits (#182366)
Fix conflict between broadcast_buffers and init_sync in DDP (#178054)
Fix gather on non-destination ranks for the TorchComms backend (#178533)
Fix TCPStore compilation with Clang 20 (#185785)
Fix NCCL symmetric memory mismatch by using an allocation-time counter instead of address for block ordering (#183489)
Fix a symbol lookup issue with the symmetric memory __init__ (#186416)
Fix the value returned by Work.exception() so the exception can be inspected from Python instead of being unusable (#184697)
Fix false assertion errors in the flight recorder when using the ncclx, gloo, rccl, rcclx, mccl, or hccl backends (#179753)
Fix a failure when creating a subgroup on a fake backend via new_group, which has no underlying communicator to split (#186172)
Fix torch.compile of the _c10d_functional all_gather_tensor_out and reduce_scatter_tensor_out ops, which previously failed functionalization with "Found a custom (non-ATen) operator whose output has alias annotations" (#183597)
Fix split_group on multi-backend process groups (e.g. init_process_group(backend="cpu:gloo,cuda:nccl")) to split only the relevant backend instead of every backend, avoiding spurious warnings, extra rendezvous overhead, and inconsistent process-group shapes (#182057)
Fix FakeProcessGroup to reject rank >= world_size at construction time, which previously failed silently and only surfaced later when collectives indexed past world_size (#182363)
Fix the torchelastic agent hanging indefinitely (and never exiting) when workers become stuck in an uninterruptible (D-state) process that SIGKILL cannot reap; the final proc.join()/proc.wait() in _close is now bounded by a timeout and the unkillable PID is logged (#185414)
Fix pipelining producing incorrect results or cryptic runtime errors when a PipelineScheduleMulti topology communicates between non-adjacent stages (e.g. skip connections); this is now detected at initialization and raises a clear RuntimeError (#179293)
Fix RuntimeError: only Tensors of floating point dtype can require gradients when building a pipeline for models with non-float intermediates (such as Hugging Face transformer models) (#183582)
Make LocalTensorMode transparent to torch.compile so compilation proceeds as if the debugging mode were not active (#182667)
Fix AssertionError in elastic c10d rendezvous when a node's rank changes across rendezvous rounds (e.g. a node becomes rank 0 after a peer leaves) (#182375)
Fix shared-weight gradient double-counting in zero-bubble pipeline schedules (#181365)
Fix None gradient handling in pipeline backward send/recv (#182182)
Fix a pipelining crash when split_module interleaves get_attr nodes with placeholder nodes (#182644)
FSDP.optim_state_dict and FSDP.optim_state_dict_to_load (#181261)DefaultStager crash when reused (#183424)squeeze leaving a DTensor's spec and local tensor out of sync (spec shape not matching the local tensor) by preventing squeeze from redistributing when strict_view is set (#175798).view() failures (e.g. in ColwiseParallel/RowwiseParallel) after an uneven Shard(dim>0)->Replicate redistribute by making the local tensor contiguous (#184443)make_fx, caused by sharding propagation recording dead global-shape shadow nodes into the graph (#185865)upsample backward crashes when the input is sharded (#182595)Partial placement being lost during the autograd layout invariant (#180511)OpSpec.mesh crash when specs contain None entries (#181541)redistribute(backward_dtype=...) ignoring the backward dtype (#182032)_StridedShard flag conflict during gradient accumulation (#183517)FakeTensor device hint in sharding propagation (#183970)group_norm scalar adjuster crash when weight=None (#184819)to_local() dropping the _is_param marker that nn.Parameter sets on custom tensors (#184422)pad_tensor/unpad_tensor creating unnecessary guards on symbolic pad sizes during tracing (#180887)torch.compile crash caused by an unbound inner symbol at the root tracer (#181797)DTensorSpec refcount leak in OpSchema._recompute_comparison_key (#181792)post_accumulate_grad_hook results under CPUOffloadPolicy (#180666)Tensor/DTensor error in chunk_cat (#183040)IndexError for modules called with no forward inputs by preserving empty args/kwargs, matching FSDP1 behavior (#183943)DTensor with a stale fp32 dtype, causing sharding propagation to fail in eager and torch.compile (#183805)fully_shard([norm, head]) group for chunked loss, where the model forward runs norm only and head is called standalone per chunk; unshard/reshard previously relied on _modules_to_run_forward and produced wrong results for this pattern (#180428)clip_grad_norm results with multiple data-parallel shard axes (e.g. dp_shard + cp passed via DataParallelMeshDims), which exposed separate Shard axes with the wrong float32 reduction order and an incorrect Shard instead of _StridedShard; the axes are now flattened into a single shard axis in the sharding spec (#183629)cast_forward_inputs is enabled, by casting forward inputs during recompute (#182580)_StridedShard (#186126)torch.linalg.ldl_solve CPU kernel (#181032)dict update (#185428), defaultdict inplace union (#185429), frozenset copy identity (#185430), sequence search (#185431), iand on bool constants (#184503), sequence * SymNode spurious graph break (#185260), and torch.Size tensor shape handling (#184613)float/bool + SymNode (#183362), PendingUnbackedSymbolNotFound for 0-d tensor Scalar args (#182660), GuardOnDataDependentSymNode on sparse tensors (#179616), and creating symbolic tensors from foreign fake tensors (#181794)CUDAStream/Event tp_dealloc overrides (#183403) and Dynamo dict guard cleanup (#183753)DeviceMesh is constructed inside torch.compile (#177201)torch.compile crash when an unsupported type is passed to a tensor method inside try/except (#182106)wrap_inline for exec'd Python functions (#181531)torch.compile (#183337)torch.full validation for nn.Parameter fill values in Dynamo (#183915)BlockMask placeholders (#184611)CudagraphsBackend.__call__ (#182989)def forward(self, ..., self, ...) SyntaxError in dynamo_graph_capture_for_export (#185314)context_fn clobbered by DDPOptimizer's propagate_metadata (#179496).grad reads for new in-graph parameters (#184972)manual_seed in Dynamo so compiled random calls stay reproducible (#185761)to_dense no-op (#184586)IndexError in compile mode matching eager mode (#184856)fullgraph=True and a non-default stance is set (#183623)is_compiling flag for the whole torch.compile session (#184614)max_autotune BMM correctness with dynamic OpenMP threads (#169128)LayerNorm by guarding the Welford variance computation (#173989)NameError from Python name mangling for user-defined Triton kernels whose names start with double underscores (#176100)pointer_range_32 to user-defined Triton kernels on ROCm to avoid compilation crashes (#178541)e8m0_rceil_log2 pattern failing to register on any CUDA device (#178698)cpp_wrapper backward compilation failing with a CudaKernelParamCache assertion when set via torch.compile options (#178847)FxGraphCachePickler crash on unpicklable pybind11 extension types during cache key computation (#178853)argmax/argmin indices in the CPP Tile2D vectorized kernel for transposed inputs (#179525)mutation_outputs for the intermediate buffer and add epilogue source to the cache key (#179803)tl.atomic_add for constant-index stores (#179833)fmod/remainder on CPU (#179923)dislike_padding conflicting with contiguous storage layout (#180197)check_bounds forward-reference C++ compile error in the CPU backend (#180212)waves_per_eu, matrix_instr_nonkdim, kpack) when combo kernels rewrite per-subkernel configs on ROCm (#180277)torch.compile crash on cumsum with broadcast input when the scan dimension is 129 or larger (#180369)while_loop codegen for the minimal-arrayref interface (wrap ArrayRefTensor inputs before assign) (#180370)addmm CUTLASS codegen and relax addmm tolerances (#180432)as_strided (#180581)NoValidChoicesError for scaled_mm/scaled_grouped_mm with use_fast_accum=True on Blackwell (#180586)UnicodeDecodeError on Windows when using icx-cl as the CXX compiler by decoding subprocess output with errors='replace' (#180853)tl.float64 in Triton scalar-shape-math codegen on XPU devices without fp64 support (e.g. Intel Arc A770) (#180854)adaptive_avg_pool2d is fused with downstream flatten + reduction for non-power-of-2 channel sizes (#180898)num_warps on AMD RDNA (wave32) GPUs so it is no longer incorrectly halved; only CDNA (warp_size 64) is halved (#181112)index_expr/kindexpr error when using flex_attention with bias/index expressions (#181207)slice lowering early-return path (#181219)fallback_random is enabled (#181245)NotImplementedError: View) when a flatten()-produced view is passed as the conv2d bias (#181363)bfloat16) when running under another (e.g. float16) (#181564)_to_copy decomposition so float64->float32 transfers to XPU devices without fp64 support no longer generate illegal fp64 buffers/crash (#181607)AutoHeuristic initialization from crashing in non-CUDA (e.g. XPU) environments (#181745)AttributeError crash in remove_noop_ops when a node's meta val is a SymInt/SymFloat (auto dynamic shapes) instead of a Tensor (#181752)ConcatKernel channels_last contiguous check to handle symbolic shapes, avoiding a data-dependent (DDE) LoweringException (#181845)tl.load/tl.store being incorrectly eliminated (and not allocated) when epilogue fusion is enabled (#181868)_CollectiveKernel.create_inplace (#181930)print_performance in generated benchmark_compiled_module so timing works on non-CUDA devices (e.g. XPU) (#181957)CompiledFxGraph._original_gm via GraphPickler to fix AOTAutograd/precompile cache serialization crashes for graphs with HOPs that have lifted buffers (e.g. flex_attention with a causal BlockMask) (#182088)maybe_realize in FlexAttention (#182610)AutoHeuristic crash in non-CUDA environments (e.g. XPU and CPU-only builds) (#182614)emulate_precision_casts on CPU C++ codegen so explicit/emulated fp32->fp16->fp32 precision barriers are no longer optimized away (#182882)count_flops_fx) for HigherOrderOperator targets such as flex_attention during overlap/bucketing (#182992)index_add/index_copy/index_reduce instead of silently succeeding under torch.compile (#183007)eager_input_vals propagation (#183334)is_linear_add_bias crash when the bias node argument is a Python float (#183514)torch.compile crash on cumprod backward by disallowing fusion of split-scan nodes with reductions (#183653)argmax logical index for transposed reductions (#183655)while_loop backward expanded gradient strides (#183658)torch.xpu stream APIs instead of CUDA-only calls (#183693)SymInts in associative_scan lowering (#183706)set_.source_Tensor lowering when the source is a view (#183724)select_algorithm input storage check (#183791)log for strict Inductor numerics (#183844)div_ to match eager type-promotion semantics (#183859)handle_synced_deallocation for XPU (#183865)hipModuleLoadData in StaticCudaLauncher on ROCm (#183926)flex_attention autotune logging to use size hints for symbolic dims, avoiding lowering failures under dynamic shapes (#183933)tuned_addmm with max-autotune when the bias is an unrealized view (e.g. a transposed expression) (#183973)gelu backward in opmath dtype for improved numerical accuracy (#183985)float8_e4m3fn dequantization on pre-sm89 CUDA devices to match eager bit patterns (#184008)bucketize/searchsorted on sliced or zero-stride lookup tensors (#184043)needs_fixed_stride_order so fallback custom ops receive tensor-list inputs in the recorded stride order (#184098)asinh overflow (#184105)RReLU (#184136)torch.jagged layout to match eager and meta behavior (#184146)out_dtype for scaled_mm by propagating it to MMKernelInputs (#184168)frexp exponent for non-finite inputs (#184176)convolution_backward lowering so dilated conv2d backward compiles under dynamic shapes (#184224)sort in combo kernels (#184227)as_strided storage offsets for graph input views (#184232)convolution_backward lowering so the Triton backward conv template no longer references undefined sympy symbols under dynamic shapes (#184255)index_put (#184263)aten.topk on ROCm/HIP to avoid a rocPRIM memory fault on cudagraph-tree replays (MI350 / ROCm 7) (#184265)gather bounds for negative indices (#184287)ExternKernelCaller) choices (#184493)INT_MIN / -1 matches eager instead of trapping (#184497)cumsum/cummax/cummin/cumprod) on unsigned integer dtypes (#184514)constant_offset alignment in TMACompatibilityChecker (#184564)acc_type for fp8 dtypes in mm autotuning (use triton_type and accumulate in fp32) (#184591)torch.cond subgraph buffer reuse by scoping EfficientPeakEstimate per subgraph during AOT codegen (#184623)addcmul_ and addcdiv_ under torch.compile (#184629)ZeroTensor view with symbolic sizes (#184651)cpp_micro_gemm that broke AOTI compilation of AVX512 VNNI/WoQ-Int4 kernels (#184693)constant_args and kwargs in ExternKernel.get_read_writes() to prevent index producers from being incorrectly eliminated (#184751)Py_None reference counting in the C++ wrapper (#184869)torch.compile runs inside a multiprocessing child process (#185070)torch.compile(dynamic=True) with torch.func.grad) (#185080)get_stride_order for assorted A/B layouts (#185437)NameError in combo kernels when TMA is enabled by handling DelayReplaceLine load expressions (#185514)cat lowering assertion error with 1-D statically-empty tensors (#185549)wrap_triton when TRITON_INTERPRET=1 is set (#185597)wait_stream reordering by registering it among the synchronization ops that preserve control dependencies (#185627)standalone_compile cache artifact save for grad-enabled graphs whose backward is lowered lazily (#185635)emulate_precision_casts to match eager (#185847)arange) in tensor value computation (#185853)view.dtype lowering when falling back (#185879)FakeTensorUpdater handling of higher-order ops and their subgraphs (#185962)get_stride for PermuteView to avoid a NotImplementedError (#185992)SymFloat under dynamic shapes in overlap scheduling (#186054)torch.bincount so downstream codegen uses the correct dtype (#186077)scatter_upon_const_tensor rewrite for low-precision const tensors (#186481)tl.broadcast_to(False, ...) by using tl.full instead (#186621)diagonal_scatter backward under torch.compile (#185146)SymInt crash in the overlap scheduler's collective/compute node benchmarking (#186065)torch.cat axis handling in Inductor pre-grad fusion (#183995)fp32->bf16->fp32 casts being dropped (#180575)atan numerics in Inductor (#183984)flip on 0-d tensors in the prims.rev lowering (#184104)softmax decomposition for symbolic empty dims (#184454)CppWrapper due to false-positive caching (#178147)cpp_wrapper (#182825)pointer_to_optional_list (#183764)c10::make_scope_exit to avoid exception leaks (#184520)AOTInductorModelContainer::run() during concurrent constant folding (#181941)CUmodule handles to prevent GPU code object leaks (#184860)cpp_wrapper temporary arrays (#179846)cpp_wrapper to fix MSVC compilation (#180120)float('inf')/float('-inf') kernel args (#180297)cond subgraph arrayref dispatch with generic lambda (#180558)cpp_wrapper while loop carried mutations (#183657)TORCHINDUCTOR_CACHE_DIR (#185723)IndexError during decomposition by also excluding lifted tensor constants and custom objects when identifying user-input placeholders (#181179)torch.export save/load (#181263)Min/Max of scaled symbolic terms (e.g. Min(128*s, 512*s) reduces to 128*s) so export no longer rejects valid branch guards (#185092)AssertionError on later eager buffer assignment (#184956)torch.export.load GIL contention during tensor deserialization (#175983)torch.compile crash with batched matmul in inference_mode (#181913)pixel_shuffle, pdist, and reflection/replication padding ops (#183814)max_pool2d/3d_with_indices (#179104)MaxUnpool output sizes in meta/decomposition kernels (#184706)conv2d kernel size in meta and symbolic-shape kernels (#180448)addmv decomposition dtype validation (#184140)fill_ meta value-tensor dimensionality validation (#179363)_weight_int8pack_mm meta inner-dims and scales validation (#179364)torch.empty(..., out=...) shape validation under torch.compile (#182349)torch.compile wrong output shape for norm() with a negative dim (#182405)frac decomposition signed-zero handling (#183640)pad_sequence mixed-dtype padding decomposition (#184173)istft fake tensor length padding (#184532)unfold_backward decomposition for overlapping windows (#183996)Tensor decomposition in Inductor (#184134)aten.hardtanh meta semantics for export (#185298)_fused_dropout decomposition at keep-probability zero (#184979)addmm decomposition crash with out_dtype under FakeTensorMode (#179634)torch.split decomposition for empty dim with nonzero split_size (#181493)torch.distributions.Gamma under torch.compile (#174090)miopen_batch_norm meta save_mean/save_var dtype (#179365)torch.compile (#179837)lp_pool2d compilation (#184000)hardtanh_backward decomposition (#185840)torch.sigmoid() in silu_backward decomposition (#185041)index_copy decomposition shape checks (#184338)zero (#185360)non_overlapping_and_dense (#186785)_cslt_sparse_mm meta registration for hipSPARSELt (#181609)FakeTensor (#183397)ProxyTensor (#183398)mix_order_reduction over-fusion via load count check (#179494)torch.compile crash from aten.lift functionalization on an already-functionalized tensor (e.g. randint followed by lift) (#185805)_foreach_sub under compile (#184421)CastLike handling logic from OpRecorder (#182197)_rotary_embedding_23_fake_impl stride drift for 3D and 4D inputs (#184854)invoke_subgraph export with lifted tensor constants (#182230)mode (#186428)-Winconsistent-dllimport warning in tensor_numpy and tensor_new headers on Windows (#183703)ValueError/NotImplementedError on Windows (#175340)nvrtcCompileProgram changing locale in CUDA < 12.6.2 (#180569)total_weight before accumulating in nll_loss2d (#182082)dtype promotion in max/min kernel (#181505)torch.cuda.ExternalStream(0) to wrap the NULL stream (#183258)native_group_norm in eager (#183946)multinomial SIGSEGV (#180493)F.linear on M5+ (#181466)uint32 offset overflow in scatter/gather kernels for strided views crossing 2^32 elements (#182054) and move col2im offset/stride to long to avoid overflow corruption (#185664)relu (#183571), softshrink (#183710), hardsigmoid (#183939), cholesky (#184588), and fast::tanh overflow (#186286); return NaN for std/var on empty input (#184510)layer_norm_backward silent correctness bug for frozen inputs (#183893)_amp_foreach_non_finite_check_and_unscale_ zeroing fp16/bf16 grads (#184286) and stop ignoring grad scale and found_inf (#186360)copy_kernel_mps (#184403)sort returning out-of-bounds indices for bool/int-max/NaN inputs (#184620)fill_ on byte-dtype views with misaligned storage offset (#183790)precise::sincos (#184749)deviceCount() consistent with Python to fix at::manual_seed() (#164571)scale not being cached (#184122)Support TheRock wheel distribution in _find_rocm_home (#180723)
Fix warpMergeSortTopK padding sentinel for integer dtypes (#182212)
Guard ck_group_gemm on USE_ROCM_CK_GEMM (#182615)
Fix large arange launch (#182657)
Fix triu/tril for 64-bit indexing for large matrices (#179717)
Drop dead CUDA/ROCm version gates from tests and helpers (#184879)
Fix LayerNorm backward kernel for AMD Strix Halo GPUs (#183864)
Decline CuteDSL scatter_add on ROCm (#185678)
For HSTU, fix CK flash-attn GQA seqlen_q==1 garbage output (#186434)
Inductor fixes:
pointer_range_32 optimization (#179604)maybe_hipify_code_wrapper for bare-token inputs (#183725)StaticCudaLauncher (#183926)lookup_device_info is now case-insensitive (#182284)Windows
CMAKE_HIP_FLAGS (#183856)dllimport (#183690, #183324, #183282, #183694)CMAKE_HIP_FLAGS (#183365)USE_ROCM_CK_SDPA on Windows (#183962)CurrentWorkStream (#179140)addmm shape handling and addmv_out stride preservation on XPU (#180985, #178498)XPUPluggableAllocator registration (#183865, #179392)logcumsumexp with complex inputs on XPU (#174492)SyclExtension Windows builds for oneAPI 2025.3 and later (#170701)getGlobalIdxFromDevice(-1) handling on XPU (#181361)MemoryReadAdapter::read (#181193)broadcast_shapes op missing in selective builds (#180860)binary_cross_entropy SymInt error with dynamic shapes by registering aten::broadcast_shapes as a TorchScript builtin (#180583)policy_fn during recompute (#176455)Speed up store-based metadata exchange on TCPStore by using multiGet and a server-side barrier, reducing network round trips from 2*(world_size-1) to 1 (#182132)
Coalesce the NCCL buffer and signal pad into a single symmetric-memory allocation so window registration runs only once (#183344)
Fuse slice-cat TP collective patterns (#184911)
GraphModule reconstruction in CSEPass when no common subexpressions were eliminated (#185479)repr in Dynamo ID_MATCH guard text (#184796)ao::offload ops to avoid per-tensor cudaHostAlloc overhead (gated by the pinned_memory_pool() context manager) (#186162)auto_functionalize, improving FP8 KV-cache performance (#173177)basic_gnn_sage fp32 single-thread performance regression (#177958)_FastCudaLauncher, a vectorcall C extension for pre-bound kernel launch that reduces per-launch overhead (#180507)sympy.gcd on very wide shape expressions, cutting some backward compiles from over 50 minutes to about 6 (#181275)num_stages=4) matmul config that speeds up large Hopper matmul shapes by ~1.3x and up (#181413)nested_compile_region (invoke_subgraph) subgraphs created with options, which were previously skipped (#181834)can_fuse_vertical, reducing kernel count (#183521)grid_sampler_2d lowering on CUDA/XPU when sizes fit, avoiding unnecessary int64 arithmetic (#184269)evict_first for coalesced last-use loads in persistent reductions (#184395)log in reused CPU pointwise so T5-style softmax bias inputs are materialized once (#184473)_safe_softmax SDPA math path back into a native scaled_dot_product_attention call (new SFDP patterns 29/30) (#185574)forward_inference prop kind only for channels-last/MKLDNN-layout, fixing a ~2x dense-contiguous slowdown (#185997)Note truncated.
This release is meant to fix the following regressions and silent correctness issues:
This release is meant to fix the following regressions and silent correctness issues:
Fix SyclExtension Windows build for oneAPI 2025.3+ breaking change
<table> <tr><td><strong>Batched linalg.eigh on CUDA</strong> is up to 100x faster due to updated cuSolver backend selection.</td></tr> <tr><td>New <strong>torch.accelerator.Graph</strong> API unifies graph capture and replay across CUDA, XPU, and out-of-tree backends.</td></tr> <tr><td><strong>torch.export.save</strong> now supports Microscaling (MX) quantization formats, enabling full export of aggressively compressed models.</td></tr> <tr><td><strong>Adagrad</strong> now supports <code>fused=True</code>, joining Adam, AdamW, and SGD with a single-kernel optimizer implementation.</td></tr> <tr><td><strong>torch.cond</strong> control flow can now be captured and replayed inside CUDA Graphs.</td></tr> <tr><td><strong>ROCm</strong> users gain expandable memory segments, rocSHMEM symmetric memory collectives, and FlexAttention pipelining.</td></tr> </table>
For more details about these highlighted features, you can look at the release blogpost. Below are the full release notes for this release.
Strengthened SVE compile checks in FindARM.cmake, which may reject previously accepted but incorrect SVE configurations (#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)
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:
CUDA_HOME=/usr/local/cuda-12.4 python setup.py develop
Version 2.12:
CUDA_HOME=/usr/local/cuda-12.6 python setup.py develop
Enforced a C++20 minimum in CMake build files (#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.
torch.distributed.nn.functional ops now raise RuntimeError under torch.compile (#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:
@torch.compile
def my_func(x):
return torch.distributed.nn.functional.all_reduce(x, op=ReduceOp.SUM)
Version 2.12:
@torch.compile
def my_func(x):
return torch.distributed._functional_collectives.all_reduce(x, reduceOp="sum", group=group)
torchrun now defaults to an OS-assigned free port for single-node training instead of port 29500 (#175699)
When running torchrun --nproc-per-node=N script.py without specifying --master-port or --standalone, the default behavior now automatically uses an OS-assigned free port via the c10d rendezvous backend. This eliminates "Address already in use" errors when running multiple training jobs concurrently. Multi-node training, explicit --master-port, PET_MASTER_PORT env var, and --standalone are unchanged.
Version 2.11:
# Used static rendezvous on port 29500 by default
torchrun --nproc-per-node=4 train.py
Version 2.12:
# Uses OS-assigned free port by default
torchrun --nproc-per-node=4 train.py
# To explicitly use a fixed port:
torchrun --nproc-per-node=4 --master-port=29500 train.py
All MPS tensors are now allocated in unified memory (#175818)
Previously, MPS tensors could be allocated in either device-only or unified memory. Now all MPS tensors use unified memory unconditionally. This simplifies memory management and enables CPU access to MPS tensor data without explicit copies. Code that relied on device-only memory placement may observe different performance characteristics.
The max_autotune layout-constraint deferral introduced in 2.11 is now opt-in (#175330)
In 2.11, Inductor deferred layout freezing for max_autotune templates to expose more fusion opportunities. This caused a regional-inductor failure mode, so the default in 2.12 reverts to immediate layout freezing. Users who relied on the deferred behavior for fusion opportunities should opt in explicitly via torch._inductor.config.max_autotune_defer_layout_freezing or TORCHINDUCTOR_MAX_AUTOTUNE_DEFER_LAYOUT_FREEZING=1.
Version 2.11:
# Deferred layout freezing was the default
torch.compile(model, mode="max-autotune")
Version 2.12:
import torch._inductor.config as cfg
cfg.max_autotune_defer_layout_freezing = True
# or set TORCHINDUCTOR_MAX_AUTOTUNE_DEFER_LAYOUT_FREEZING=1
torch.compile(model, mode="max-autotune")
Deprecate CUDA 12.8 builds in favor of CUDA 13.0 (#179072)
CUDA 12.8 binaries have been removed from the PyTorch binary build matrix. CUDA 13.0 is now the stable default and CUDA 12.6 remains available for users on older drivers. Users explicitly pinning the cu128 index URL will need to switch to cu130 (recommended) or cu126.
Version 2.11:
pip install torch --index-url https://download.pytorch.org/whl/cu128
Version 2.12:
# Use CUDA 13.0 (default on PyPI):
pip install torch
# Or explicitly:
pip install torch --index-url https://download.pytorch.org/whl/cu130
# Older driver fallback:
pip install torch --index-url https://download.pytorch.org/whl/cu126
Compatibility with CMake < 3.10 will be removed in a future release (#166259)
Source builds against CMake versions older than 3.10 now emit a deprecation warning. A future release will require CMake 3.10 or newer; please upgrade CMake before then.
Several CUDA linear algebra operators no longer use the MAGMA backend and now dispatch to cuSolver or cuBLAS unconditionally:
torch.linalg.eigh now dispatches to cuSolver (#174619)torch.linalg.lu_solve now dispatches to cuSolver/cuBLAS (#174248)torch.linalg.cholesky_inverse now dispatches to cuSolver (#174681)torch.linalg.cholesky_solve now dispatches to cuSolver (#174769)User code calling these APIs does not need to change. The practical impact is for users who depended on MAGMA-specific numerical behavior, performance characteristics, or debugging. Those calls now use the cuSolver/cuBLAS implementations on CUDA.
Compiling through FSDP2 hooks without graph breaks is no longer supported (#174863, #174906). If you use compiled autograd with FSDP2, update your code to allow graph breaks around FSDP2 hooks or disable compiled autograd for the FSDP2 training step.
Version 2.11:
with torch._dynamo.config.patch(compiled_autograd=True):
compiled_model = torch.compile(fsdp_model, fullgraph=True)
loss = compiled_model(input).sum()
loss.backward()
Version 2.12:
# Either run FSDP2 backward without fullgraph.
compiled_model = torch.compile(fsdp_model, fullgraph=False)
loss = compiled_model(input).sum()
loss.backward()
# Or apply compile before applying FSDP.
compiled_model_pre_fsdp = torch.compile(model, fullgraph=True)
compiled_model = fully_shard(compiled_model_pre_fsdp, ...)
loss = compiled_model(input).sum()
loss.backward()
Profiler's metadata_json field is now deprecated; use event_metadata instead (#179417)
Version 2.11:
metadata = event.metadata_json
Version 2.12:
metadata = event.event_metadata
torch.compile(fullgraph=True) now warns when a call runs no compiled code; will error in 2.13 (#181940)
Previously fullgraph=True was only validated once Dynamo actually compiled and ran the function. If Dynamo was bypassed at call time (e.g. under a user-defined TorchDispatchMode), the annotation silently had no effect. 2.12 emits a warning; 2.13 will raise. For graph-break errors without fullgraph's stronger guarantees, use torch._dynamo.error_on_graph_break.
Version 2.12:
from torch.utils._python_dispatch import TorchDispatchMode
class LoggingMode(TorchDispatchMode):
def __torch_dispatch__(self, func, types, args=(), kwargs=None):
return func(*args, **(kwargs or {}))
@torch.compile(fullgraph=True)
def model(x):
return x.sin() + 1
# A user-defined TorchDispatchMode is active, so Dynamo skips the frame
# and no compiled code runs — emits a warning in 2.12, will raise in 2.13.
with LoggingMode(): # Remove this to fix warning
model(torch.randn(3, 4))
The inline_inbuilt_nn_modules Dynamo config is deprecated (#177489, #178205)
Inlining of in-built nn.Module instances is now the default; setting the flag emits a deprecation warning and it will be removed in a future release.
Version 2.11:
import torch._dynamo.config as cfg
cfg.inline_inbuilt_nn_modules = True # was a tunable knob
Version 2.12:
# No action needed — inlining is on by default.
# Remove any explicit references to torch._dynamo.config.inline_inbuilt_nn_modules.
Added a deprecation framework to the torch.compile config module so individual options can be marked deprecated (#169837)
torch.accelerator.Graph as a unified frontend Graph interface (#171285)_foreach_clone operator, with a fast path for CUDA utilizing _foreach_copy_ (#177421)Store::barrier API and TCPStore client BARRIER support, reducing synchronization round trips compared to the existing ADD+WAIT pattern (#174920)suspend(), resume(), and memory_stats() APIs for managing communicator memory lifecycle (#176300)all_to_all support in the Gloo backend (#165435)reduce_scatter_offset to symmetric memory, supporting variable-sized block reductions with NVLink multicast or LSA fallback (#177791)batch_isend_irecv to work under torch.compile (#161213)torch.distributed.symmetric_memory.is_symm_mem_tensor() API to check if a tensor is a symmetric memory tensor (#178947)NanCheck to a standalone op (torch.ops.c10d.check_for_nan) usable outside of ProcessGroupNCCL (#174990)grad_placements parameter to DTensor.from_local(), allowing explicit control over gradient placements in the backward pass (#175867)fully_shard with DTensors on a full SPMD mesh via DataParallelMeshDims (#176334)--shutdown-timeout to torchrun for controlling the SIGTERM-to-SIGKILL timeout during worker shutdown (#172596)CPUBlas brgemm API for fp8 (e4m3 & e5m2) GEMM, backed by oneDNN (#172548)torch.cond with CUDA graphs, using conditional graph nodes (CUDA 12.4+) so data-dependent control flow can be captured entirely inside a single CUDA graph. Works with the eager and cudagraphs torch.compile backends (no Inductor support yet). (#168912)linalg_qr for MPS (#172536)cholesky_solve support on MPS (#176703)index_reduce on MPS (#174936)torch.distributions.Gamma (forward + backward) on MPS (#179228)mvlgamma on MPS (#178914)nonzero_static implementation on MPS (#179589) (from miscategorized)torch.accelerator.Graph on XPU (#176421)memory_clock_rate and memory_bus_width to XPU device properties (#171967)split_group API when TorchComms is used as a backend for TorchTitan on XPU (#178236)torch._dynamo.aot_compile public, with aot_eager and inductor backend support and docs (#179917, #180008)recompile_limit keyword argument to torch.compile to override the per-function recompile cap without touching global config (#177936)torch._dynamo.mark_unbacked for communicating value ranges to the symbolic shape system (#176313)bdb, a pdb-style debugger for stepping through nested frames during Dynamo tracing (n, u, d, r, bt), plus a user-callable breakpoint() that auto-starts it (#174626, #174746, #175200)torch.compile. Inductor now codegens stream context managers (enter/exit) and record_stream calls in the wrapper, enabling user streams to flow through compiled regions with proper synchronization, scheduler integration, and cross-stream dependency tracking (#165390, #165391, #165504, #165505, #174223, #176700, #177694)ao::offload, ao::reload, and ao::wait ops for asynchronous activation offloading. These ops encapsulate async CPU offloading stream management following the same async 2-op pattern as c10d functional collectives, reducing IR size from 7 nodes (offload) and 5 nodes (reload) down to 2 nodes each (#177621)relu()), parsing the user kernel source via AST and inlining the epilogue into the tl.store expression (#173662).out overloads, Inductor automatically lowers single-output and multi-output functional ops to their .out variants as ExternKernelOut, enabling memory planner buffer reuse (#175116, #176117)max_autotune now extends to combo kernels. The autotuning pipeline generates and benchmarks per-sub-kernel block-size phase configs, with chained sequential autotuning and per-sub-kernel reduction hints (#177715, #178936, #179317)mm and addmm for max-autotune, enabling persistent kernels on hardware without TMA (#177781, #179095)torch.float8_e5m2 dtype, including registration for FP8 GEMM autotuning (#171176)max-autotune-gemm, allowing CUTLASS-style GEMM templates to target Intel GPUs (#161938, #161939)sort, median, and mode operations (#178525)conv1d (#175280)at::vec::convert for the Inductor C++ x86 backend (#172309)disable_welford_reduction config flag to opt out of Welford reduction in codegen (#175778)float8_e8m0fnu and float4_e2m1fn_x2) to the AOTInductor C shim layer, enabling MXFP4 quantization (e.g., for AMD MI350) (#176496)tuple_return option to split_module that wraps submodule outputs in a tuple (#179007)ignore_raw_node option to GraphPickler (#176939)_merge_overlapping_fusions() method to FxNetSplitter which detects and merges overlapping fusion groups (#177099)float8_e8m0fnu dtype (#176270)torch.uint32 and torch.uint64 dtypes (#179434)List[List[float]]) (#178081)uniform and normal sampling on CPU to improve fp16/bf16 results (#175988)requires_grad to Optional[bool] in torch.asarray (#170897)narrow_copy derivative (#175609)grid_sample (#177487)torch.aminmax (#175215)num_splits in varlen attention to allow disabling split_kv (#176905)AutoNamingMode support in Selective Activation Checkpointing (#175348)torch.utils.checkpoint to no longer use autograd.Function for saving inputs (#174327)_int_mm unsigned int8 × signed int8 (u8s8) support on CPU (#168226)bias argument to nn normalization methods (LayerNorm, GroupNorm, RMSNorm, etc.) (#176573)MultiMarginLoss error message for inconsistent target size (#174072)enable_gqa flag to varlen_attn (#179468)eps=0 in batch_norm during eval mode (#175508)trunc_normal_ initialization (#176240)clone operator for semi-structured sparse tensors (#174991)alg_id (#178659)cpp_extension and cpp_builder to C++20 (#176659)at::Tag header-only changes and add a library.def override for tags (#181608)timeout parameter to torch.distributed.barrier() (#174974)reduce_scatter_tensor_coalesced support to ProcessGroupWrapper (#168961)batched_grad_copy option to reduce per-parameter kernel launches to 2 kernels per bucket (#176638)BucketCapacityConfig dataclass (#175217)ChildFailedError exitcode output for better debugging (#175254)dist.broadcast for FP8 tensors on GPUs older than SM90 (#175884)__torch_function__ handlers for distributed functions (#176376)split_group API for TorchComms on XPU (#178236)ncclx and gloo to FlightRecorder trace analyzer backend allowlist (#180268)Implement missing methods in ProcessGroupWrapper (#178779)_StridedSharding for full nn.Linear(DTensor) compatibility (#166483)is_pinned() support (#177235)print() HOP support (#175222)run_dtensor_rng_op compatible with compile_on_one_rank (#177447)_StridedShard through Replicate (#179059)Split(Flatten) sharding propagation (#179632)view_groups (#174629)index_select, index, index_fill, index_reduce, roll, fft, constant_pad_nd, squeeze.dims, interpolate, linalg ops, LayerNorm/RMSNorm FW/BW, foreach/fused ops, and einsum linearity (#176037, #176038, #178456, #175463, #175656, #173563, #176991, #176955, #179173, #177186, #177187, #176150, #174830)clip_grad_norm to match the documented behavior (#173641)ModuleList/ModuleDict subclasses that implement forward() (#175033)fully_shard (#173580)shard_mesh and shard_mesh_from_root handling (#174107)offset_t operators to be __host__ __device__ in SortStable.cu (#175997)avg_pool3d backward shape-check variables in CUDA (#178893)per_process_memory_fraction + throw_on_cudamalloc_oom (#179473) (#179473)enable_annotations kwarg to torch.cuda.graph` (#179867)ReduceLogicKernel (#176132)abs complex overflow/underflow on MPS (#174346)index_fill_ to native Metal (#175822)histogram to float/bfloat types on MPS (#176913)unfold_backward to torch.complex64 on MPS (#177274)scatter, gather, repeat, cumsum, logcumsumexp, cumprod, and nn.functional.linear on MPS (#177794, #178198, #178328, #178411, #178436, #178799)lerp, eye, relu, silu, fill_, xlogy, norm to native Metal kernels (#177093, #178683, #178866, #179071, #176101, #177749, #177328)DeviceCapability for MPS backend (#178180)enable_gqa parameter to SDPA MPS meta registration (#181550)addmv, addmm, and baddbmm on XPU (#174590)addcdiv lowering for XPU (#176163)bmm_outer_product Triton override for XPU (#180816)IntelGPUError in Inductor (#169167)enum.Enum iteration, nn.Module.__getattribute__, _enter_autocast/_exit_autocast and other context managers, next() on itertools.count, itertools.takewhile, bool(OrderedDict), NamedTuple.__eq__(tuple), numpy ndarray.flat, and locals()/vars() (#175176, #175527, #173877, #176521, #178818, #177876, #175394, #176729, #175787, #179595)nb_index/nb_bool/nb_float slots so Dynamo can trace operator.index(tensor), bool(...), and float(...); graph-break on torch.Generator methods (#178921, #178931, #179114, #180198, #178519)cond supports aliases and mutations under no_grad, autogradable leaf modules support pytree outputs, nonstrict_trace accepts nn.Module inputs, and invoke_subgraph supports subgraph reuse (#172836, #172152, #175010, #172372, #176644)torch.cuda.stream, sync barriers via a dependency HOP, triton.set_allocator inside torch.compile, and reuse of tracked objects for Triton prune_configs_by (#177610, #168894, #177470, #177874)OUT_DTYPE, ACC_TYPE, and INDEX_DTYPE codegen flow in Triton templates (#179453)addcdiv lowering for CUDA parity with eager and matching _foreach_addcdiv to _foreach_addcmul (#174912, #175309, #175310, #175839, #176237)lerp decompositions for bitwise parity with eager (#176804)torch.cat and avoided duplicate computation in cat/pad when inputs have multiple consumers (#175729)ExternKernelOut for output buffer reuse, and added symm_mem planning for graph inputs and fallback regions (#174856, #175449)pad_mm AutoHeuristics in deterministic mode (#176186, #179826)NotImplementedError when return_aux=AuxRequest(max_scores=True) is requested with BACKEND='FLASH' instead of failing later with an opaque error (#177434)allow_tf32 to fp32_precision to avoid divergence with the new TF32 API (#176098)prims.scalar_tensor and aten.arange.start_step (#179017, #179028)convert_element_type lowering to emulate PyTorch eager numerics (#176781)kpack Triton compile options on ROCm (#173179)aten.index_add (#179486)tile_k from nvMatmulHeuristics matching (#176845)aten._grouped_mm to AOTInductor fallback ops, enabling cpp-wrapper mode for grouped_mm (#177307)AOTIPythonKernelHolder, allowing a single compiled kernel to serve multiple input shapes (#176018)native_layer_norm, aminmax) (#176019)Optional[List[T]] arguments in cpp wrapper (#174460)_scaled_dot_product_attention_math_for_mps enable_gqa (#181549)get_source_partitioner to parse nn_module_stack metadata for improved source-based graph partitioning (#175788)split_module now uses _make_graph_module to support lazy recompile (#177907)fuser_utils.topo_sort to produce a stable ordering (#175378)DynamicInt __pow__ and __rpow__ methods (#179868)scaled_mm_v2 CPU implementation (#176266)PYTORCH_RELEASES_CODE_CC dict (#182369)torch.isclose broadcast failure with equal_nan=True (#175244)torch.trace backward for non-square matrices (#175068)layer_norm computes 3rd order derivatives (#176234)_wrap_sync_node to replace deps in output node's nested args (#178471)setup_context cache (#179475)addmv backward pass failure (#165777)linalg.det backward for 0-dimensional inputs (#177498)cholesky(upper=True) on macOS for matrices larger than block size (#179154)trunc_normal_ low precision issue when used with half-precision dtypes (#174997)nll_loss meta function to prevent invalid input types (#175151)Conv3d.reset_parameters for channels_last format (#175990)MSELoss failing to compute gradients when inputs have different dtypes (#175743)GroupNorm backward correctness bug on AMD wavefront-64 GPUs (#178872)nn.functional.pad compile crash with deterministic mode and replication padding (#177166)torch.bmm(COO, Dense) memory misalignment on CUDA (#175347)TORCH_BUILD_VERSION not updating when version.txt changes (#176167)_CoalescingManager not passing Opts to allgather_into_tensor_coalesced() (#175379)_CoalescingManager to raise exception when ops in the coalesced list are not the same type (#175573)getenv/setenv race condition causing segfault during NCCL initialization with heartbeat thread (#167523)AsyncCollectiveTensor inputs leaking into compiled regions, causing RuntimeError or silent data corruption in TP + compile workflows (#179849)USE_RCOM typo to USE_ROCM in intra_node_comm.cpp (#175078)NCCLPeerAllocInfo destructor to properly deregister windows and free resources (#177459)Metadata.storage_meta regression from dataclasses.replace() (#178001)FrameSummary._code on Python 3.13+ (#177754)__torch_dispatch__ bypass (#177878)_StridedShard not in safe globals for checkpoint loading (#178560)stack dim normalization (#174640)view_as_complex with P(max)/P(min) placements (#173935)get_mesh_from_args when first arg is not a tensor (#169265)tp_conv rejecting batch-dim-only sharding for valid configs (#176448)compute_local_stride for unevenly-sharded tensors (#177174)scaled_mm sharding strategy (#177234)propagate_shape_and_sharding (#177973)index_put sharding strategy for None indices (#179217)NestedRedistribute backward dtype handling (#179495)topk, sort, min, etc.) (#178668)InputDim.__eq__ type guard to prevent int comparison bugs (#178599)DeviceMesh.__getitem__ by disabling proxy tensor handling (#176007)_unshard() passing a CUDA stream where an event was expected (#170525)sync_module_states broadcast order for buffers with meta-device initialization (#178569)BlockMask as an argument (#179215)split_with_sizes_copy() missing dim argument (#169173)async_op=True profiler trace issues (#182100)stage_backward_weight with multi-output intermediate in pipeline parallelism (#175705)transpose_mxn specialization for AArch64 SVE, providing a deterministic vectorized BF16 transpose implementation independent of fixed vector widths (#174097)test/inductor/test_fp8.py hang on sm89 (#177573)AdaptiveMaxPooling2d.cu (#179261)ComplexTransform const kTransformB in fpA_intB_gemm.h (#179271)LayoutB in fpA_intB_gemm.h (#179269)AvgPool for channels_last + offset inputs (#175235)linalg_solve to return pivots (#175284)lu_solve for broadcasted bias (#175332)addmm/mm to return zero-filled matrix when an input is empty (#175905)index_reduce atomic misalignment for sub-32-bit types (#176009)masked_fill for non-contiguous outputs (#176171)layer_norm with noncontiguous bias (#176238)solve_triangular for noncontiguous inputs (#176335)histogram/histogramdd with noncontiguous weight (#175906)getStridedMPSNDArray (#176648)bmm on MPS (#176771)torch.cdouble tensor on MPS (#176985)_copy_from_and_resize logic (#177606)ops.masked variable name collisions in Metal codegen (#178304)self.add_(other, alpha) RuntimeErrors with type promotion (#178724)BatchNorm with mixed input/weight dtypes (#178775)getMPSScalar construction for uint64 (#179230)mm with stride-0 inputs on macOS < 26.4 (#180236)masked_scatter side-effect and aligned behavior with CPU (#175622)lgamma/digamma/polygamma noncontiguous behavior (#175603)masked_scatter to preserve scalar tensor shape (#174381)channels_last tensor handling (#181107)B > 1 (#181886)_get_amdsmi_device_index to return devices in correct order (#178398)torch.compile graph break inside torch.autocast('xpu') causing dtype mismatch (#180309)conv2d incorrect results and alignment errors for non-64-byte-aligned tensors on XPU (#177956)nn.Embedding module failures on XPU (#178987)_scaled_dot_product_fused_attention_overrideable to preserve query layout (#178986)DeviceOpOverrides registered incorrectly on XPU (#178959)SyclExtension Windows build for oneAPI 2025.3+ breaking change (#170701)__defaults__, guard tensor-method fallthrough against unknown methods, and closure-hash in CodeId so factory functions don't reuse stale graphs (#177103, #177191, #178420, #177737, #173512)@property setters bypassed by torch.compile, AttributeError swallowed by try/except on tensor attributes, torch.Size dict lookups with tensor-backed keys, graph break on enum members with class values, detach_ autograd metadata, allow_in_graph crash inside compiled functions, preserve original exception in GuardOnDataDependentSymNode, and einops 0.6.1 backwards patch (#176624, #175611, #177313, #177439, #177875, #178524, #176016, #177165)contextlib.contextmanager init, and parent-stack corruption in step_graph_break (#176906, #177090, #177195, #177408)torch.compiler.is_exporting() returning True during torch.compile, activation-checkpoint metadata loss through custom autograd.Function, mixed-dtype bmm/matmul, vjp_fn under torch.compile, _extract_distributed_info crash on FX-Node group_name, nested_compile_region cache keyed on fn.__code__, and reverting allow_in_graph deprecation warn-spam (#176499, #177396, #177696, #173883, #178108, #179148, #178340)cuda_stream pointer extraction for generic torch.Stream (#181019)fullgraph=True fallback to eager (#181940)no_grad views of differentiable intermediates (#175673)floordiv Inductor lowering for mixed signedness (Triton workaround) (#175168)Sm100CollectiveEpilogue on SM100 (#175305)aten.resize on overlapping-stride views (#176651)ConstructorMoverPass replacing CPU placeholder in graph output and creating mixed-device pointwise ops (#176164, #177646)VecMask::from for scalar masks in CPU codegen (#178148)triton_main_loop_scaled_mm template to use correct scale recipe (#178005)cpp_wrapper lazy compile stale state across fresh_cache resets (#178162)grid_y overflow for large batch dims and i32 overflow in template kernel signature for large storage offsets (#178617, #179333)remove_no_ops incorrectly eliminating ops on mutated values (#174938)name is in buffer_read_counts before access (#171245)SyntaxError when Triton kernel has docstrings (#176796)fallback_random dropout stride mismatch (#177077)AssertionError in ForeachKernelSchedulerNode loop reordering after fusion (#176849)floordiv (#177926)persistent_mm_template selection (#178178)max_autotune must include pointwise configs with max_autotune_pointwise (#177995)num_warps when max_autotune is enabled on HIP (#178023)nn.Dropout accuracy discrepancies between Triton and torch implementations (#178843)floor_divide with zero divisor (#178016)randn_like inconsistency between eager and compile with fallback_random=True (#177994)MetalScheduling constructor in MPSInductor (#179646)argmax/argmin returning incorrect indices for boolean tensors on CUDA (#174076)sign to match PyTorch NaN semantics (#176579, #176814)UnicodeDecodeError in Triton depthwise conv template (#176484)torch._check divisibility propagation to Triton tt.divisibility (#175755)block_ptr store dtype for inplace-mutated buffers (#177860)constexpr (#172354)'bool' object not callable) (#176090)_split_iteration_ranges silently dropping dimensions (#177673)sym_sum lowering to accept varargs (#178661)bias_addmm for AMD (#178929)isinf() to Float8_e4m3fn to fix nan_asserts crash with fp8 inputs (#160641)Grid2DWithYZOverflow (#178878)torch.cond (#179457)torch.compile performance regression for cumprod backward (#170388)lazy_triton_compile.h in the XPU cpp_wrapper header (#180815)run_single_threaded (#174998)int64_t type declaration for kernel numel variables (#176922)get_source_partitioner (#175935)make_fx handling of value typesNote truncated.
Fixed a ZipSlip directory traversal vulnerability in torch.hub that could allow malicious zip files to extract files outside the target directory. tor…
<table> <tr> <td> Added Support for <strong>Differentiable Collectives</strong> for Distributed Training </td> </tr> <tr> <td> <strong>FlexAttention</strong> now has a <strong>FlashAttention-4</strong> backend on <strong>Hopper</strong> and <strong>Blackwell</strong> GPUs </td> </tr> <tr> <td> <strong>MPS (Apple Silicon)</strong> Comprehensive Operator Expansion </td> </tr> <tr> <td> Added <strong>RNN/LSTM</strong> GPU Export Support </td> </tr> <tr> <td> Added <strong>XPU Graph</strong> Support </td> </tr> </table>
For more details about these highlighted features, you can look at the release blogpost. Below are the full release notes for this release.
Starting with PyTorch 2.11, the CUDA 12.8 and 12.9 pre-built binaries no longer include support for Volta GPUs (compute capability 7.0, e.g. V100). This change was necessary to enable updating to CuDNN 9.15.1, which is incompatible with Volta.
Users with Volta GPUs who need CUDA 12.8+ should use the CUDA 12.6 builds, which continue to include Volta support. Alternatively, build PyTorch from source with Volta included in TORCH_CUDA_ARCH_LIST.
Version 2.10:
# CUDA 12.8 builds supported Volta (SM 7.0)
pip install torch --index-url https://download.pytorch.org/whl/cu128
# Works on V100
Version 2.11:
# CUDA 12.8 builds no longer support Volta
# For V100 users, use CUDA 12.6 builds instead:
pip install torch --index-url https://download.pytorch.org/whl/cu126
Starting with PyTorch 2.11, pip install torch on PyPI installs CUDA 13.0 wheels by default for both Linux x86_64 and Linux aarch64. Previously, PyPI wheels shipped with CUDA 12.x and only Linux x86_64 CUDA wheels were available on PyPI. Users whose systems have only CUDA 12.x drivers installed may encounter errors when running pip install torch without specifying an index URL.
Additionally, CUDA 13.0 only supports Turing (SM 7.5) and newer GPU architectures on Linux x86_64. Maxwell and Pascal GPUs are no longer supported under CUDA 13.0. Users with these older GPUs should use the CUDA 12.6 builds instead.
CUDA 12.6 and 12.8 binaries remain available via download.pytorch.org.
Version 2.10:
# PyPI wheel used CUDA 12.x
pip install torch
Version 2.11:
# PyPI wheel now uses CUDA 13.0
pip install torch
# To get CUDA 12.8 wheels instead:
pip install torch --index-url https://download.pytorch.org/whl/cu128
# To get CUDA 12.6 wheels (includes Maxwell/Pascal/Volta support):
pip install torch --index-url https://download.pytorch.org/whl/cu126
torch.hub.list(), torch.hub.load(), and torch.hub.help() now default the trust_repo parameter to "check" instead of None. The trust_repo=None option has been removed. (#174101)Previously, passing trust_repo=None (or relying on the default) would silently download and run code from untrusted repositories with only a warning. Now, the default "check" behavior will prompt the user for explicit confirmation before running code from repositories not on the trusted list.
Users who were explicitly passing trust_repo=None must update their code. Users who were already passing trust_repo=True, trust_repo=False, or trust_repo="check" are not affected.
Version 2.10:
# Default trust_repo=None — downloads with a warning
torch.hub.load("user/repo", "model")
# Explicit None — same behavior
torch.hub.load("user/repo", "model", trust_repo=None)
Version 2.11:
# Default trust_repo="check" — prompts for confirmation if repo is not trusted
torch.hub.load("user/repo", "model")
# To skip the prompt, explicitly trust the repo
torch.hub.load("user/repo", "model", trust_repo=True)
varlen_attn via window_size, making optional arguments keyword-only (#172238)The signature of torch.nn.attention.varlen_attn has changed: a * (keyword-only separator) has been inserted before the optional arguments. Previously, optional arguments like is_causal, return_aux, and scale could be passed positionally; they must now be passed as keyword arguments. A new window_size keyword argument has also been added.
# Before (2.10)
output = varlen_attn(query, key, value, cu_seq_q, cu_seq_k, max_q, max_k, True, None, 1.0)
# After (2.11) — pass as keyword argument
output = varlen_attn(query, key, value, cu_seq_q, cu_seq_k, max_q, max_k, window_size=(-1, 0), return_aux=None, scale=1.0)
is_causal flag from varlen_attn (#172245)The is_causal parameter has been removed from torch.nn.attention.varlen_attn. Causal attention is now expressed through the window_size parameter: use window_size=(-1, 0) for causal masking, or window_size=(W, 0) for causal attention with a sliding window of size W. The default window_size=(-1, -1) corresponds to full (non-causal) attention.
# Before (2.10)
output = varlen_attn(query, key, value, cu_seq_q, cu_seq_k, max_q, max_k, is_causal=True)
# After (2.11) — use window_size instead
output = varlen_attn(query, key, value, cu_seq_q, cu_seq_k, max_q, max_k, window_size=(-1, 0))
DebugInfoWriter now honors $XDG_CACHE_HOME for its cache directory in C++ code, consistent with the Python side. Previously it always used ~/.cache/torch. (#168232)This avoids issues where $HOME is not set or not writable. Users who relied on ~/.cache/torch being used regardless of $XDG_CACHE_HOME may see debug info written to a different location.
Version 2.10:
# C++ DebugInfoWriter always wrote to ~/.cache/torch
Version 2.11:
# C++ DebugInfoWriter now respects $XDG_CACHE_HOME/torch (same as Python code)
# Falls back to ~/.cache/torch if $XDG_CACHE_HOME is not set
DeviceMesh now stores a process group registry (_pg_registry) directly, enabling torch.compile to trace through get_group(). (#172272)This may break code that skips init_process_group, loads a saved DTensor (constructing a DeviceMesh with no PGs), and later creates PGs separately — during torch.compile runtime the PG lookup will fail. Users should ensure process groups are initialized before constructing the DeviceMesh.
Version 2.10:
# PGs resolved via global _resolve_process_group at runtime
mesh = DeviceMesh(...) # PGs could be created later
Version 2.11:
# PGs now stored on DeviceMesh._pg_registry; must exist at mesh creation
dist.init_process_group(...) # Must be called before creating mesh
mesh = DeviceMesh(...)
DTensor.to_local() backward now converts Partial placements to Replicate by default when grad_placements is not provided. (#173454)Previously, calling to_local() on a Partial DTensor would preserve the Partial placement in the backward gradient, which could produce incorrect gradients when combined with from_local(). Now, the backward pass automatically maps Partial forward placements to Replicate gradient placements, matching the behavior of from_local().
Users who relied on the previous behavior (where to_local() backward preserved Partial gradients) may see different gradient values. To ensure correctness, explicitly pass grad_placements to to_local().
Version 2.10:
# Partial placement preserved in backward — could produce incorrect gradients
local_tensor = partial_dtensor.to_local()
Version 2.11:
# Partial → Replicate in backward by default (correct behavior)
local_tensor = partial_dtensor.to_local()
# Or explicitly specify grad_placements for full control:
local_tensor = partial_dtensor.to_local(grad_placements=[Replicate()])
_PhiloxState.seed and _PhiloxState.offset now return torch.Tensor instead of int (#173876)The DTensor RNG internal _PhiloxState class changed its seed and offset properties to return tensors instead of Python ints, and the setters now expect tensors. This makes the RNG state compatible with PT2 tracing (the previous .item() calls were not fake-tensor friendly).
Code that directly reads _PhiloxState.seed or _PhiloxState.offset and treats them as ints will break. Call .item() to get the int value. When setting, wrap the value in a tensor.
Version 2.10:
from torch.distributed.tensor._random import _PhiloxState
philox = _PhiloxState(state)
seed: int = philox.seed # returned int
philox.offset = 42 # accepted int
Version 2.11:
from torch.distributed.tensor._random import _PhiloxState
philox = _PhiloxState(state)
seed: int = philox.seed.item() # now returns Tensor; call .item() for int
philox.offset = torch.tensor([42], dtype=torch.int64) # must pass Tensor
When caffe2 and PyTorch were separate projects, the ROCm support strategies were different. For caffe2, all files and classes would be renamed following the pattern of CUDA to HIP, Cuda to Hip, cuda to hip, and so on. PyTorch did not rename classes, but would create new files following the same renaming pattern (e.g., aten/src/ATen/cuda/CUDABlas.h to aten/src/ATen/hip/HIPBlas.h). As a consequence, caffe2 had a distinct device backend named "HIP" (renamed from "CUDA") while ROCm PyTorch masquerades as the "cuda" device (torch.empty(1, device="cuda")). Once caffe2 and PyTorch projects were merged, this caused a mismatch between caffe2 expecting to use a "HIP" device while PyTorch expecting a "cuda" device. To alleviate this mismatch, "Masquerading" classes were created under aten/src/ATen/hip/impl.
Hipify v2 (#174087, #174300, #174388, #174499, #175098) makes the following changes:
torch.export.export_for_training has been removed (#171714)export_for_training was previously available as a separate API for exporting models while preserving training semantics. This function has been removed. Users should use torch.export.export instead, which returns the same graph as the previous export_for_training.
fallback option from torch.onnx.export (#173189)The fallback parameter has been removed from torch.onnx.export(). Previously, when fallback=True, the exporter would automatically fall back to the legacy TorchScript-based exporter if the dynamo exporter failed. This fallback was removed because it was overly complicated, required different inputs, produced different models, and hid errors from the new exporter.
Migration: Remove fallback=True (or fallback=False) from your torch.onnx.export() calls. If you need fallback behavior, implement it explicitly in your own code by catching exceptions and calling the legacy exporter separately.
# Before
torch.onnx.export(model, args, "model.onnx", dynamo=True, fallback=True)
# After
torch.onnx.export(model, args, "model.onnx", dynamo=True)
The custom_translation_table parameter in torch.onnx.export() no longer accepts a list of functions for each torch op. Previously, users could pass a list of overloaded ONNX functions (e.g., one for float tensors, another for bool tensors), and the dispatcher would automatically select the correct overload based on input types. This complex type-matching logic has been removed because torchlib no longer uses overloads for the same opset version.
The type of custom_translation_table changed from dict[Callable, Callable | Sequence[Callable]] to dict[Callable, Callable]. Passing a Sequence as a value now raises a TypeError.
Migration: Provide a single function per operator instead of a list of overloads. If you need type-dependent behavior, handle it inside the single function.
# Before
custom_translation_table = {
torch.ops.aten.logical_and.default: [custom_impl_float, custom_impl_bool],
}
# After
custom_translation_table = {
torch.ops.aten.logical_and.default: custom_impl,
}
torch.ao.quantization.pt2e and torch.ao.quantization.quantizer) has been removed from PyTorch and migrated to torchao. (#169151)The following modules and classes have been removed:
torch.ao.quantization.pt2e (including DuplicateDQPass, PortNodeMetaForQDQ, export utils, graph utils, numeric debugger, lowering utilities)torch.ao.quantization.quantizer (including ComposableQuantizer, EmbeddingQuantizer, X86InductorQuantizer, XPUInductorQuantizer, XNNPACKQuantizer, QuantizationSpec, QuantizationAnnotation, QuantizationConfig, etc.)Users relying on the PT2E quantization flow should migrate to the torchao package, which now hosts these APIs.
Version 2.10:
from torch.ao.quantization.pt2e import prepare_pt2e, convert_pt2e
from torch.ao.quantization.quantizer.x86_inductor_quantizer import X86InductorQuantizer
Version 2.11:
# Install torchao: pip install torchao
from torchao.quantization.pt2e import prepare_pt2e, convert_pt2e
from torchao.quantization.pt2e.quantizer.x86_inductor_quantizer import X86InductorQuantizer
The MAGMA backend for linear algebra operations is now deprecated and will be removed in a future release. Setting torch.backends.cuda.preferred_linalg_library("magma") or retrieving a previously-set MAGMA preference will now issue a deprecation warning. cuSOLVER remains the default backend. (#172823)
If you see any errors when using cuSOLVER that did not occur with MAGMA, please file an issue on GitHub. To silence the warning, stop explicitly selecting the MAGMA backend:
Version 2.10:
# No warning
torch.backends.cuda.preferred_linalg_library("magma")
Version 2.11:
# Issues a deprecation warning — remove this call to use the default cuSOLVER backend
torch.backends.cuda.preferred_linalg_library("magma")
torch.linalg.svd no longer dispatches to MAGMA. The MAGMA backend is deprecated and cuSOLVER is now used unconditionally, providing significant speedups (2x–400x depending on matrix size and batch dimensions). (#172824)
Previously, setting torch.backends.cuda.preferred_linalg_library("magma") would route SVD through MAGMA. This setting is now ignored for SVD, and cuSOLVER is always used.
Version 2.10:
torch.backends.cuda.preferred_linalg_library("magma")
U, S, Vh = torch.linalg.svd(x) # Uses MAGMA
Version 2.11:
# MAGMA preference is ignored; cuSOLVER is always used
U, S, Vh = torch.linalg.svd(x) # Uses cuSOLVER
torch.linalg.solve_triangular and torch.triangular_solve no longer dispatch to MAGMA on CUDA. cuBLAS is now used unconditionally, providing speedups of 2x–24x for most matrix sizes (small matrices may see minor regressions of ~0.6x). (#174109)
Version 2.10:
torch.backends.cuda.preferred_linalg_library("magma")
torch.linalg.solve_triangular(A, B, upper=False) # Uses MAGMA
Version 2.11:
# MAGMA preference is ignored; cuBLAS is always used
torch.linalg.solve_triangular(A, B, upper=False) # Uses cuBLAS
torch.linalg.lstsq no longer dispatches to MAGMA. cuSOLVER/cuBLAS are now used unconditionally, providing speedups of 1.7x–620x depending on matrix size and batch dimensions. (#174779)
Version 2.10:
torch.backends.cuda.preferred_linalg_library("magma")
result = torch.linalg.lstsq(A, B) # Uses MAGMA
Version 2.11:
# MAGMA preference is ignored; cuSOLVER/cuBLAS is always used
result = torch.linalg.lstsq(A, B) # Uses cuSOLVER/cuBLAS
torch.distributed.symmetric_memory.enable_symm_mem_for_group is deprecated. The store can be retrieved directly via ProcessGroup.getStore() in C++, making this call unnecessary. (#172163)Version 2.10:
from torch.distributed.symmetric_memory import enable_symm_mem_for_group
enable_symm_mem_for_group(group)
Version 2.11:
# No longer needed — store is accessed directly from the ProcessGroup
Added native_handle property to torch.Stream, providing a unified way to retrieve the backend-specific opaque stream handle (e.g., cudaStream_t for CUDA, sycl::queue* for XPU). This is useful for passing stream handles to third-party libraries such as Triton. (#171040)
stream = torch.accelerator.current_stream()
handle = stream.native_handle # backend-specific stream handle
Function.clear_saved_tensors_on_access class attribute to automatically free saved tensors after they are accessed (#173833)activate_flash_attention_impl (#169866)scale for softmax to varlen attn (#171199)start_method option to torch.distributed.debug.start_debug_server to select the multiprocessing start method (fork, spawn, or forkserver), enabling CUDA-safe server startup (#173196)torch.distributed.debug (#174808)torch.distributed.all_gather) now automatically work with FakeTensorMode — meta implementations are registered at import torch time (#162119)SymmetricMemory as a torch class for use in op definitions (#174019)torchcomms _BackendWrapper shim layer in c10d (#174202)import torch
x = torch.rand(10, 1, 10, device='mps')
y = x[:, [1]]
torch.mps.synchronize() # will raise index out of bounds error
clock_rate, memory_clock_rate, memory_bus_width, memory_per_block, shared_memory_per_block. (#170572)TORCH_USE_HIP_DSA. (#172679)torch.compile now supports tracing through contextlib.ExitStack and contextlib.suppress context managers, allowing code that uses these patterns to be compiled without graph breaks (#146506, #147990)torch._dynamo.config.ignore_logging_functions config to skip arbitrary logging callables during tracing without causing graph breaks. Add functions to this set to have Dynamo treat them as no-ops during compilation (#168913)TORCH_DYNAMO_AUTOMATIC_DYNAMIC_SHAPES=0 environment variable to globally disable automatic dynamic shapes without modifying Python code (#172334)TORCH_COMPILE_OVERRIDE_BACKENDS environment variable for per-graph backend override, enabling binary search to find problematic compiled graphs. Supports filter syntax like ">10:eager" or "0-5:aot_eager;6-10:inductor" (#172411)torch._dynamo.decorators.leaf_function, which allows annotating functions as leaf operations that Dynamo and AOTAutograd will not trace into (#170471)register_hook on non-leaf tensors would fail under torch.compile (#172126)torch.cond dispatch generation (#167617)ldexp lowering with libdevice.ldexp (CUDA) and std::ldexp (CPU) codegen (#171721)pin_memory for torch.empty (#172578)triton_meta to TritonTemplate maybe_append_choice API for custom template development (#174292)max-autotune-gemm, which overlaps autotuning with lowering/scheduling in a subprocess to reduce compilation overhead (#170407)(BlockWise128x128, BlockWise1x128) scaling support in Inductor Triton templates (#170748)torch.export (#174720)ExportableModule wrapper for ONNX export (#170810)InputObserver to infer dynamic shapes for export (#172838)InputObserver for multimodal LLM export (#174964)torch.linalg._powsum and torch._foreach_powsum as fused kernels that compute sum(abs(x)**ord) (equivalent to vector_norm without the root extraction) (#172685)torch.load now produces clearer error messages when encountering miniz errors from PyTorchStreamReader, explicitly indicating that the checkpoint file is likely corrupt (#170244)torch.load(map_location='meta') no longer reads storage data from the filesystem, improving performance when loading checkpoints onto the meta device (#170619)check_out_variant and to_out_variant utilities for custom operator out variant validation. check_out_variant verifies that a custom op's out variant is compatible with Inductor's out_variant pass, and to_out_variant converts an OpOverload to its out variant. (#174473)remove_duplicate parameter to nn.Module.modules() function (#174383)nn.attention.flex_attention (#171744)Float8_e8m0fnu and Float4_e2m1fn_x2 dtypes to stable ABI (#173669)torch::stable::Tensor::layout() (#174735)context_parallel_shard more general (#170200)get_offset for symmetric memory (#172044)ProcessGroupNCCL: workaround for reduce_scatter with world_size=1 (#170922)ProcessGroupWrapper (#171920)pdb only when user calls breakpoint() in torch.distributed (#171818)ProcessGroupNCCL: use lowest rank as split color (#173687)accscalar_t for interpolation accumulators (#170661)index_fill backward pass (#174238)baddbmm and addbmm to integer and complex types (#170895)torch.special.erfcx (scaled complementary error function) (#172910)addmm behavior now takes into account preferred BLAS backend instead of forcing hipblaslt. (#174350)torch.view_as_real and torch.view_as_complex now support sparse tensors (#164964)torch.xpu._dump_snapshot API (#170186)torch.xpu._record_memory_history API (#169559)torch.xpu.memory_snapshot (#169442)local_mem_size to XPU device properties (#172314)torch.accelerator.get_device_capability on XPU (#170747)aot_inductor.emit_multi_arch_kernel on XPU (#171432)decompose_k choice for XPU (#170541)skip_actions flag to filter out specific events (#168183).post_process_timeout_s field to prevent post processing from blocking
further execution (#173957).fullgraph=True now recursively disables dynamo on compiled code to prevent unintentional re-invocation of torch.compile (#173080)Enum.__contains__ and constants (#173223)kwargs=True (#172519)object type in dynamo tracing (#171457)allow_in_graph (#173611)LoweringException occurs, making debugging easier (#171846)120a for .ptx to .fatbin compilation and cpp codegen (#174162, #172263)cvt_e8m0_rceil prim with PTX lowering for SM100+ GPUs (#172497)launch_cooperative_grid flag for cooperative reduction kernels (#167800)torch.float8_e5m2, enabling mixed FP8 (e4m3fn x e5m2) matrix multiplication (#171167)scaled_dot_product_flash_attention.low_p overload (#172622)record_function with _RecordFunctionFast in CompiledFxGraph for reduced profiling overhead (#163976)mutated_inputs, allowing more flexible template usage (#170721)combo_kernels_pointwise_only config option to exclude reduction kernels from combo kernel fusion (#174894)torch.fx.symbolic_trace now supports tracing HigherOrderOperators that do not take callable arguments (#173839)hint_int to size_hint, support size_hint in user code. (#171944)_disable_torch_fn_metadata_mode option to make_fx and aot_export_joint_with_descriptors (#172087)from_node provenance information is now preserved when serializing exported programs (#171726)expm1 for computing quantized ELU, improving numerical stability (#173968)spin lint command now supports pass-through arguments to lintrunner, including --take, --skip, and --tee-json flags, giving developers more control over which linters run (#169373)cpp_kernel_name to public API to match AOTI shim gen; add mm_type_out to AOTI fallback kernel (#174489)torch.load with FakeTensorMode or skip_data context would compute incorrect storage sizes (#170618)torch.ops.aten.index.Tensor to properly raise an IndexError when called with an empty indices list, instead of producing undefined behavior (#174009)torch.autograd.gradcheck when fast_mode=True (#166386)torch.view_as_complex() not working on the memory layout produced by .contiguous() after .transpose() (#169780)torch.bucketize crash during torch.export when test_elements is a scalar (#170751)MaxUnpool crash when input tensors are small (#169359)__getitem__ in Subset subclasses (#163961)max_q and max_k for varlen_attn (#173681)SymInt, MemoryFormat, ScalarType, Layout) correctly (#174734)std::string::find method in c10d (#170057)_set_pg_timeout not working for Gloo backend (#167052)flex_input_fn argument unwrapping issue (#170201)_unshard() passing Stream instead of Event (#170525)ProcessGroupGloo CUDA tensor stream handling with futures (#170812)split_with_sizes_copy() missing dim argument (#169173)wait_tensor (#171614)fully_shard arg typehint inconsistency (#171574)clip_grad_norm to align with documentation (FSDP) (#173641)ProcessGroupWrapper missing method forwarding (#173599)Partial(max/min) reduce op type on torch.max/torch.min output DTensors (#170203)Partial DTensors with different reduce ops (#170209)ctc_loss_gpu_template on SM12+ (#172447)tanh implementation (#172406)orgqr race condition on MPS (#174143)torch.sparse.spdiags crashing with zero-dimension shapes (#174052)GradTrackingTensor.tolist() not working on MPS (macOS) device tensors when used inside torch.func.grad or other function transforms (#171317)torch.xpu.memory_allocated / torch.xpu.memory_reserved reporting incorrect memory sizes (#171453)FakeTensorMode after compile (#171209), fixed CUDA memory usage for CPU-only compile (#163841)OrderedSet, set, and frozenset with activation checkpointing (#169535, #170291)MATCH_MAPPING, MATCH_KEYS, and MATCH_SEQUENCE opcodes for Python pattern matching (match/case) support (#173085, #173086, #173087)share_memory_ compile failure (#171162)defaultdict default factory and union functionality (#168028)MutableMapping subclasses (#173184)is_inference in the cudagraphs torch.compile backend (#174713)persistent_reduction heuristics, FusedMixOrderReductions grouping, and scalar store broadcast shape mismatch (#168939, #169509, #169721, #172658)torch.cond stride mismatch when subgraph outputs are padded (#169963)view_copy decomposition to handle dtype size changes (#171442)aten.isin with scalar inputs (#171272)aten.uniform (#170794)upsample_nearest (#171151)allow_tf32 usage from inductor internals (#173731)num_stages (#170071)select_scatter dtype assertion error (#171311)aten.pow lowering (#170960)silu output match eager mode in inductor (#171723)bucketize crash in compile mode (#171595)OverflowError when truncating infinity numbers (#166636)narrow_copy decomposition (#173043)remove_noop_ops (#172160)next_power_of_2 (#174330)_pdist_forward and _pdist_backward (#170959)libdevice.pow type mismatch in Triton codegen (#173685)exclusive_scan_decoupled_lookback_64 (#171153)RuntimeError in FxGraphCachePickler.dumps() for unpickleable pybind11 objects (#173577)var_ranges (#173607)n_spills None before threshold comparison in Triton heuristics (#169940)identify_mutated_tensors() (#170808)should_use_persistent_reduction (#172534)use_compute_types parameter name mismatch in CPP backend to_dtype() that caused TypeError when enabling emulate_precision_casts=True on CPU (#168125)torch.segment_reduce (#172981)torch.isin compile shape for scalar test_elements (#172531)torch.fx.symbolic_trace to_folder with torch.nn.Sequential modules (#169279)Node.type pickling in torch.fx (#169172)torch.export.save and torch.export.load (#171954)torch.export (#172805)MaxPool3d that could produce negative values (#171790)out_channels in quantized ConvTranspose modules (#171628)_foreach_copy_ producing incorrect results when destination tensors have mixed dtypes (#173531)_foreach_max returning incorrect results when tensors contain negative values, by initializing output with lowest() instead of zeros (#173241)_foreach_norm now properly raises an error when computing infinity norm on empty tensors, instead of returning undefined results (#173238)_foreach_norm to support symbolic tensors with dynamic shapes (#174026)__slots__ to pytree TreeSpec dataclasses, reducing memory usage and improving attribute access speed (#172172)_get_param_to_fqns from O(N^2) to O(N) in FSDP (#174675)grouped_mm a bit (#170802)atan2 to native MPS Metal kernel (#173405)pow_tensor_scalar and reciprocal to Metal shaders (#170077)log_normal and geometric distributions as Metal shaders (#174189)grid_sampler_2d to Metal (#174343)int_mm performance on Intel GPU when mat2 is non-contiguous (#169555)inspect.signature, var_getattr, attr source construction, and higher-order ops; fast paths for bind_args, GET_ITER on tuples, and tree_map on namedtuples; lazy variable tracker optimizations (#170100, #169959, #173582, #174437, #174438, #174141, #174020, #174130, #174901, #174598)dynamo_timed calls, used _has_symbolic_sizes_strides more pervasively, overlapped template fusion with async_compile, and optimized Triton template heuristics (#169370, #169661, #169662, #170444, #170565, #172249, #174408)avg_pool2d as a reduction for improved performance (#167228)_foreach_addcmul and _foreach_addcdiv when tensor1 is a 0D (scalar) tensor (#172731)torch.unique behavior when using the dim parameter (#171608)torch.as_tensor signature to document that dtype and device are keyword-only arguments (#173073)torch.tensordot documentation (#173893)torch.Tensor.permute to clarify it accepts variadic arguments unlike torch.permute (#170689)torch.autograd.set_multithreading_enabled docs (#170204)torch::stable namespace (#170912)torch.sparse.mm and torch.sparse.addmm (#174039)tensor_attributes.rst with additional torch.float4_e2m1fn_x2 dtype documentation (#170448)torch.hub that could allow malicious zip files to extract files outside the target directory. torch.hub now validates all extracted paths and raises a ValueError if an archive attempts to write outside the expected folder. (#171754)USE_NCCL=0 build failure in nccl_dev_cap.hpp (#171694)from_local/to_local, and backward passes (#171576)-march=armv8-a+sve+bf16 on Debian 13) by broadening the GCC version workaround for SVE compilation (#174647)at::numeric_limits (#171111)_local_scalar_dense_mps to DispatchV2 (#172967)spv to zebin (#167972)[compile_id] prefix style (#170217, #170218, #174110)fx_graph_runnable improvements: fixed single quotes in envvars, missing symints, nested triton kernels, and global constexpr support (#173704, #174035, #174038, #174533)GraphModule.print_readable() improvements: new additional_meta argument for displaying additional node metadata (#173734), long annotations are now truncated for readability (#173119), and fix trailing whitespace with inner graphs (#172644)GraphPickler improvements: support for custom ignored metadata field keys (#172587), a debug_dumps method for debugging pickle failures (#173675), respecting __getstate__ for GraphModule serialization (#173810), and automatic fallback to dill if available (#173801)invoke_subgraph nodes now point to the original model code for easier debugging (#170927)fx_graph_runnable (#173932)Removed deprecated imports for torch.utils.data.datapipes.iter.grouping (#163438). from torch.utils.data.datapipes.iter.grouping import SHARDING_PRIOR…
<table> <tr> <td> <strong>Python 3.14</strong> support for <code>torch.compile()</code>. Python 3.14t (freethreaded build) is experimentally supported as well. </td> <tr> <tr> <td> Reduced kernel launch overhead with <strong>combo-kernels</strong> horizontal fusion in torchinductor </td> <tr> <tr> <td> A new <strong>varlen_attn()</strong> op providing support for ragged and packed sequences </td> <tr> <tr> <td> Efficient eigenvalue decompositions with <strong>DnXgeev</strong> </td> <tr> <tr> <td> <code>torch.compile()</code> now respects <strong>use_deterministic_mode</strong> </td> <tr> <tr> <td> <strong>DebugMode</strong> for tracking dispatched calls and debugging numerical divergence - This makes it simpler to track down subtle numerical bugs. </td> <tr> <tr> <td> <strong>Intel GPUs support:</strong> 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. </td> <tr> </table>
For more details about these highlighted features, you can look at the release blogpost. Below are the full release notes for this release.
data_source argument from Sampler (#163134). This is a no-op, unless you have a custom sampler that uses this argument. Please update your custom sampler accordingly.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.nn.attention.flex_attention (#161734)fallback=False is now the default in torch.onnx.export (#162726)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.We decided to deprecate an existing behavior which goes against the PyTorch design principle (explicit over implicit) for device mesh slicing of flattened dim.
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
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 will come with a warning because it implicitly change the state of the original mesh. We will eventually remove this behavior in future release. User should do the bookkeeping of flattened mesh explicitly.
from/to to torch::stable::detail (#164956)torch.jit is not guaranteed to work in Python 3.14. Deprecation warnings have been added to user-facing torch.jit API (#167669).torch.jit should be replaced with torch.compile or torch.export.
dynamic_axes option in torch.onnx.export is deprecated (#165769)Users should supply the dynamic_shapes argument instead. See https://docs.pytorch.org/docs/stable/export.html#expressing-dynamism for more documentation.
export_memory_timeline method (#168036)The export_memory_timeline method in torch.profiler is being deprecated in favor of the newer memory snapshot API (torch.cuda.memory._record_memory_history and torch.cuda.memory._export_memory_snapshot). This change adds the deprecated decorator from typing_extensions and updates the docstring to guide users to the recommended alternative.
torch.utils.checkpoint.checkpoint (#166536)ComplexTensor subclass (#167621)LocalTensor:
LocalTensor is a powerful debugging and simulation tool in PyTorch's distributed tensor ecosystem. It allows you to simulate distributed tensor computations across multiple SPMD (Single Program, Multiple Data) ranks on a single process. This is incredibly valuable for: 1) debugging distributed code without spinning up multiple processes; 2) understanding DTensor behavior by inspecting per-rank tensor states; 3) testing DTensor operations with uneven sharding across ranks; 4) rapid prototyping of distributed algorithms. Note that LocalTensor is designed for debugging purposes only. It has significant overhead and is not suitable for production distributed training.LocalTensor is a torch.Tensor subclass that internally holds a mapping from rank IDs to local tensor shards. When you perform a PyTorch operation on a LocalTensor, the operation is applied independently to each local shard, mimicking distributed computation (LocalTensor simulates collective operations locally without actual network communication.). LocalTensorMode is the context manager that enables LocalTensor dispatch. It intercepts PyTorch operations and routes them appropriately. The @maybe_run_for_local_tensor decorator is essential for handling rank-specific logic when implementing distributed code.LocalTensor, users import from torch.distributed._local_tensor, initialize a fake process group, and wrap their distributed code in a LocalTensorMode context. Within this context, DTensor operations automatically produce LocalTensors.c10d:
shrink_group implementation to expose ncclCommShrink API (#164518)torch.compile now fully works in Python 3.14 (#167384)skip_fwd_side_effects_in_bwd_under_checkpoint) to allow eager and compile activation-checkpointing divergence for side-effects (#165775)torch._higher_order_ops.print for enabling printing without graph breaks or reordering (#167571)Added node metadata annotation API
Disable preservation of node metadata when enable=False (#164772)
Annotation should be mapped across submod (#165202)
Annotate bw nodes before eliminate dead code (#165782)
Add logging for debugging annotation (#165797)
Override metadata on regenerated node in functional mode (#166200)
Skip copying custom meta for gradient accumulation nodes; tag with is_gradient_acc=True (#167572)
Add metadata hook for all nodes created in runtime_assert pass (#169497)
Update gm.print_readable to include Annotation (#165397)
Add annotation to assertion nodes in export (#167171)
Add debug mode to print meta in fx graphs (#165874)
torch.compiler.config.force_disable_caches as a public API. (#166699)nn.functional.scaled_mm (#164142)nn.functional.scaled_grouped_mm (#165154)nn.attention.varlen_attn (#164502, #164504)nn.functional.grouped_mm (#168298)torch.onnx.testing with a testing utility assert_onnx_program (#162495)RecordFunctionFast (#162661)Add _scaled_mm_v2 API (#164141)
Add scaled_grouped_mm_v2 and python API (#165154)
Add embedding_bag_byte_prepack_with_rowwise_min_max and embedding_bag_{2/4}bit_prepack_with_rowwise_min_max (#162924)
Add MXFP4 support for _scaled_grouped_mm_v2 via. FBGEMM kernels (#166530)
scaled_mm and scaled_mm_v2 for Intel GPU (#166056)_weight_int8pack_mm for Intel GPU (#160938)torch.xpu.get_per_process_memory_fraction for Intel GPU (#165511)torch.xpu.set_per_process_memory_fraction for Intel GPU (#165510)torch.xpu.is_tf32_supported for Intel GPU (#163141)torch.xpu.can_device_access_peer for Intel GPU (#162705)torch.accelerator.get_memory_info for Intel GPU (#162564)torch.compile(backend="aot_eager") backend, it should now give bitwise equivalent results in eager. Previously it sometimes would not due to extra compile-only decompositions running (#165910)torch._check over torch._check_is_size (#164889,TORCH_CHECK_{COND} behavior to be non-fatal (#167004)TypeTraits, TypeList, Metaprogramming, DeviceType, MemoryFormat, Layout, version.h, and CppTypeToScalarType to torch::headeronly (#167386, #163999, #168034, #165153, #164381, #167610)libfmt submodule version to 12.0.0 (#163441)torch.cuda.rng_set_state and torch.cuda.rng_get_state work in CUDA graph capture. (#162505)header_code argument (#163165)launch_logcumsumexp_cuda_kernel (#164567)per_process_memory_fraction option to PYTORCH_CUDA_ALLOC_CONF (#161035)c10d
Context Parallel
parallelize_module (#162542)flex_cp_forward custom op for FlexAttention CP (#163185)_templated_ring_attention to the backward compatility stub (#166991)_LoadBalancer classes, and load-balance interface to Context Parallel APIs with process-time based Round-Robin load-balance (#161062, #163617)DeviceMesh
_unflatten on top of CuTe layout bookkeeping (#161224, #165521)_rank for use with non-global PGs (#162439)FullyShardDataParallel (FSDP1 and FSDP2)
DTensor
_foreach_pow, logsumexp and masked_fill_.Scalar to sharding propagation list. (#162895, #163879, #169668)SymmetricMemory
multimem_one_shot_reduce_out (#164517)multi_root_tile_reduce (#162243, #164757)symm_mem_sync Triton kernel to torch.ops.symm_mem (#168917)set_signal_pad_size API for SymmetricMemory (#169156)Pipeline Parallelism
PipelineScheduleRuntime (#164777)OVERLAP_F_B in schedule (#161072)torchelastic
Turn on capture_scalar_outputs and capture_dynamic_output_shape_ops when fullgraph=True (#163121, #163123)
Improved tracing for dict key hashing (#169204)
Tracing support for torch.cuda.stream (#166472)
Improved tracing of torch.autograd.Functions (#166788)
Miscellaneous smaller tracing support additions:
Extend collections.defaultdict support with *args, **kwargs and custom default_factory (#166793)
Support for bitwise xor (#166065)
Support repr on user-defined objects (#167372)
Support new typing union syntax X | Y (#166599)
torch._inductor.config.combo_kernels (#162442) (#166274) (#162759) (#167781) (#168127) (#168946) (#168109) (#164918)qconv_pointwise.tensor and qconv2d_pointwise.binary_tensor quantized operations. (#166608)out_dtype argument for matmul operations. (#163393)fast_tanhf on ROCm. (#162052)fallback_embedding_bag_byte_unpack. (#163803)pad_mm and decompose_mm_pass pass on Intel GPU. (#166618) (#166613)native_layer_norm_backward meta function. (#159830)assume_32bit_indexing inductor config option. (#167784)embedding_bag operator (#163012, #163931, #163281)embedding_bag and index_select ops (#166615, #168930, #166468)share_memory_ (#162272)scaled_dot_product_attention (#166318)BlockMask in nn.functional.flex_attention (#164702)tofile() in ONNX IR tensors for more efficient ONNX model serialization (#165195)Adam, AdamW work with nonzero-dim Tensor betas (#149939)user_metadata display to memory visualizer (#165939)torch.library and custom ops to support view functions (#164520)generator arg to rand*_like APIs (#166160)half and bf16 support for fused_moving_avg_obs_fake_quant (#162620, #164175)bf16 support for fake_quantize_learnable_per_channel_affine (#165098)bf16 support for backward of torch._fake_quantize_learnable_per_tensor_affine (#165362)NVFP4 two-level scaling to scaled_mm (#165774)fp8_input/fp8_weight/bf16_bias and bf16_output for fp8 qconv in CPU (#167611)torch.float4_e2m1fn_x2 dtype support equality comparisons (#169575)copy_ support for torch.float4_e2m1fn_x2 dtype (#169595)--nproc-per-node torchrun option for Intel GPU (#159474)torch.nonzero_static crash on CUDA when the input is a empty tensor (#162578)C10_CUDA_CHECK error messages (#162808)parallel_cat (#165023)const_cast in CUDA memcpy call (#168165)torch.cuda._compile_kernel (#162647)torch.unique_consecutive crash on CUDA (#162950)parallel_cat (#165446)torch.kthvalue deterministic on CUDA (#165762)reduce_kernel (#162995)Tensor.__dlpack__(stream=None) support during CUDA Graph capture (#163242)out_dtype overload for addmm/baddbmm (#167931)c10d
Context Parallel
DistributedDataParallel: (DDP)
DistributedStateDict
DTensor
foreach_max op (#169667)FullyShardDataParallel (FSDP1 and FSDP2)
Pipeline Parallelism:
SymmetricMemory
cProfile usage with torch.compile in Python 3.12+ (#170013)repeat_interleave out-of-bounds indices, divmod error, alpha/beta handling). (#165368) (#163482) (#167317)argmin/argmax returning incorrect indices for non-contiguous tensors. (#165983)static_input_indices subclass remapping under training. (#167127)torch.cond HOP device handling in inductor. (#167354)CppTile2DKernel for FP8 datatype. (#167451).cpu() correctness issue. (#168281)as_strided with .view(dtype) inputs, symbolic shapes in FlexAttention, sym_size_/sym_stride). (#163319) (#168383) (#167565)copy_ for scalar in inductor. (#164167)searchsorted for non-dense tensors. (#165064)FailedMatch format string. (#169611)welford_reduce. (#162709)max_numwarps in coordinate descent tuner. (#159146)group_m config. (#169514)groups != 1. (#163094)get_raw_stream undefined error. (#163707)weight_norm backward. (#167667)aot_compile typing. (#168320)median/nanmedian/mv, dot (#162846, #166561), #165237)fill and cat operation (#164108, #165373, #166556, #164416)torch.compile bugfixes (#169648, #163021, #162776, #163452)score_mod in nn.functional.flex_attention (#163677)nn.Module.load_state_dict for singleton tensor (#166335)torch.onnx.ops)SWALR.state_dict and load_state_dict to serialize properly with weights_only=True (#163122)LBFGS wolfe max iteration (#161488)ProfilerState typo ('Disable' → 'Disabled') and expose PRIVATEUSE1 in ActiveProfilerType (#169166)__builtin_amdgcn_rcpf for gfx90a (#166454)output_padding on Intel GPU (#169176)convolution_overrideable on Intel GPU(#166839)radix_sort_pairs to improve torch.sort performance (#167094)pinned_reserve_segment_size_mb to speed up pinned memory allocation (#164501)torch.EmbeddingBag performance (#167834)empty_permuted decomposition. (#169731)inference_mode hint message to use eval with inference. (#163619)tlparse (#171339).
tlparse is a compilation report tool that processes TORCH_TRACE logs to generate interactive HTML reports showing how your model was compiled.
When reporting bugs to PyTorch developers, we encourage you to attach the trace log or tlparse output to provide critical debugging information to help us bisect the issue.tlparse (#171339) (#162975). tlparse is a compilation report tool that processes TORCH_TRACE logs to generate interactive HTML reports showing how your model was compiled. When reporting bugs to PyTorch developers, we encourage you to attach the trace log or tlparse output to provide critical debugging information to help us bisect the issue.Update CTCLoss docs float32 input required for CuDNN (#162042)
Update LPPool docs to clarify ceil_mode padding semantics when ceil_mode=True (#163186)
FunctionEvent (#167688)Note truncated.
This release is meant to fix the following issues (regressions / silent correctness):
This release is meant to fix the following issues (regressions / silent correctness):
Significant Memory Regression in F.conv3d with bfloat16 Inputs in PyTorch 2.9.0 (#166643) This release provides work around this issue. If you are impacted please install nvidia-cudnn package version 9.15+ from pypi. (#166480) (#167111)
Fix Inductor bug when compiling Gemma (#165601) Fix InternalTorchDynamoError in bytecode_transformation (#166036) Fix silent correctness error_on_graph_break bug where non-empty checkpoint results in unwanted graph break resumption (#166586) Improve performance by avoiding recompilation with mark_static_address with cudagraphs (#162208) Improve performance by caching get_free_symbol_uses in torch inductor (#166338) Fix fix registration design for inductor graph partition for vLLM (#166458) (#165815) (#165514) Fix warning spamming in torch.compile (#166993) Fix exception related to uninitialized tracer_output variable (#163169) Fix crash in torch.bmm and torch.compile with PyTorch release 2.9.0 (#166457)
Fix warning spamming on new APIs to control TF32 behavior (#166956) Fix distributed crash with non-contiguous gather inputs (#166181) Fix indexing on large tensor causes invalid configuration argument (#166974) Fix numeric issue in CUDNN_ATTENTION (#166912) (#166570) Fix symmetric memory issue with fused_scaled_matmul_reduce_scatter (#165086) Improve libtorch stable ABI documentation (#163899) Fix image display on pypi project description section (#166404)
One column per quarter.