pypi / torch
torch
What changed in torch 1 to 2, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.
156 breaking14 security32 deprecations342 new APIs and options100 performance162 behavior and defaults10 tooling403 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli inittorch 21169 changes
Breaking changes 139
Asserts on misaligned graph inputs instead of silently cloning them.
This C++ extension enum value was removed.
Under torch.compile, MUST_RECOMPUTE on an effectful operator now raises at compile time; use a save policy instead.
Ops undefined for complex inputs now raise TypeError rather than RuntimeError; unsupported dtype implementations raise NotImplementedError.
In eager mode, outputs of non-aliasing operators with ordered effects are saved instead of recomputed when the policy prefers recomputation; return MUST_RECOMPUTE to retain replay behavior.
The default PyPI wheel uses CUDA 13.2; CUDA 13.4 wheels are available, while CUDA 12.6 and CUDA 13.0 wheels are no longer published. CUDA 13 wheels require driver 580 or newer and Turing or newer GPUs.
The experimental profiler backend name replaces cupti_monitor; the old name silently falls back to the default Kineto backend.
The experimental backend name replaces cupti_monitor_async_export; the old name silently falls back to the default Kineto backend.
The ignored profiler_metrics and profiler_measure_per_kernel arguments are removed and now raise TypeError.
Uses the same accumulation order as AVX2 and SVE256 for bitwise-identical results across these CPU types; NEON results may differ from earlier releases in the last bits.
The deprecated property and its constructor argument are removed; use FunctionEvent.metadata, a dict populated when expose_kineto_event_metadata is set.
Patch dictionaries are snapshotted when options are created, and the default no longer implicitly sets triton.autotune_at_compile_time=True.
Generated C compiler flag-check variables now use the HAS_C prefix, distinct from HAS_CXX.
Generated C++ compiler flag-check variables now use the HAS_CXX prefix, distinct from HAS_C.
Mutation and aliasing of inputs in higher-order op bodies are disallowed by default unless the op opts in; unsupported cases raise under fullgraph or cause a graph break and eager fallback.
Importing torch can no longer be repeated in one process, including with importlib.reload(torch), after deleting it from sys.modules, or after a failed import.
Linux CUDA torch wheels no longer link or preload cuRAND and no longer require it; extensions using the cuRAND host API must install the library themselves.
Resolves guarded globals against the live scope and rereads them on each call; missing guarded globals raise KeyError.
With reduce_dtype=None, fully_shard accumulates and reduces gradients in the parameter's grad_dtype instead of param_dtype; set reduce_dtype explicitly to retain the old behavior.
The MPS backend now requires macOS 15 or newer; on macOS 14 it reports unavailable and MPS allocation raises an error.
Fixes MPS wrong results and crashes across tensor operations, dtype handling, attention, memory stats, copies, command buffers, and multithreaded execution; several failures now raise errors instead of aborting or returning incorrect outputs.
backend="nccl" now creates the rewritten implementation by default. It eagerly creates communicators and binds each group to one CUDA device.
Unsupported dtypes in linalg and norm operations, and integer inputs to mean, var, std, and related operations, now raise NotImplementedError instead of RuntimeError.
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.
PyTorch binaries now require Python 3.11 or newer; no Python 3.10 wheels are published for torch or Triton.
ROCm wheels move to ROCm 7.14 and 10.0; ROCm 7.2 wheels and gfx900/gfx906 kernels are dropped.
This renamed profiler method replaces take_pending_cupti_export; the old method raises AttributeError.
Contiguous out-of-range floating-point conversions to uint8 on Arm now wrap like x86 and strided inputs instead of saturating.
Distributed checkpoint metadata now includes an optional strides field, making checkpoints saved with PyTorch 2.15 unreadable by PyTorch 2.14 and earlier.
cuBLAS and cuBLASLt workspaces are allocated per operation and freed afterward by default; setting this variable to 1 restores caching, which is unsafe with multiple graphs on one stream.
This setting now takes effect only when cuBLAS workspace caching is enabled.
Setting TORCH_DIST_USE_NCCL2=0 temporarily restores legacy NCCL behavior in this release; the variable will be removed in the next release.
This environment variable enables pipeline_per_edge_p2p.
A stack buffer overflow for overly long Unix socket paths is fixed; the program now raises an error.
Set TORCH_SYMBOLIZE_MODE=addr2line to restore addr2line symbolization.
Calls now use PyTorch's own warning and exception translation instead of pybind11's; user-defined pybind exception translation is lost.
This is the renamed setting for benchmark_epilogue_fusion and covers both prologue and epilogue fusion.
This is the renamed setting for max_epilogue_benchmarked_choices.
Pivoted LU operations use cuSOLVER even when MAGMA is preferred, and the first such call warns; pivot=False still uses MAGMA when preferred.
Saturates out-of-range integer scalar bounds instead of wrapping or raising; adds uint16, uint32, and uint64 support on CPU and CUDA.
Nested compile-region options now accept only fallback_by_default and max_autotune as Inductor config patches; other keys raise ValueError.
Captures a compiled function through a context manager and writes artifact and cache files when the block exits cleanly or cap.save() is called.
load now takes artifact and cache paths.
precompile is now a module rather than a callable; capture with precompile.capture(...) and reload with precompile.load(...).
Float32 cos on Arm NEON and SVE uses SLEEF's 3.5-ULP kernels instead of 1.0-ULP kernels, running faster but potentially differing in the last bits.
Allocator mallocWithAddress tags are now stored in internal_metadata instead of being appended to user_metadata; user_metadata reflects only values set with _set_memory_metadata.
The old configuration attribute is removed without an alias; setting it raises AttributeError.
Replaces pipeline_per_direction_p2p and configures one communicator per directed rank-to-rank edge.
On CUDA, out must have the same dtype as the input; mismatches now raise an error instead of silently casting.
Python 3.14 no longer loses torch.jit.Attribute and nn.Module class annotations; this requires typing-extensions 4.13 or later.
Nested jagged and strided nested tensors are no longer allowlisted by default, so loading checkpoints containing them with weights_only=True now fails unless they are explicitly allowed.
weights_only loading rejects checkpoints that expose uninitialized pybind11-backed objects through NEWOBJ without a matching BUILD.
After importing torch.distributed, builtin exceptions are no longer safe globals, allowlisted list subclasses cannot override append or extend during loading, and pickled exceptions require explicit safe-global registration.
Saturates out-of-range integer scalar bounds instead of wrapping or raising.
Operator calls use PyTorch's warning and exception translation instead of pybind11's; user-defined pybind exception translation is lost, and TORCH_WARN warnings reach Python's warnings module.
Validates lambd and alpha.
A public configuration API is now preferred for the renamed Cuspy experimental profiler backend.
Float32 sin on Arm NEON and SVE uses SLEEF's 3.5-ULP kernels instead of 1.0-ULP kernels, running faster but potentially differing in the last bits.
Nondeterministic MPS ops now raise an error when deterministic algorithms are enabled.
ROCM_VERSION now reports the ROCm SDK version rather than the HIP runtime version; collect_env reports both.
MemPool no longer exposes the allocator passed to its constructor; retain your own allocator reference instead.
mixed_mm is no longer the default value.
The 4x-vectorized Triton RNG path was disabled because it produced correlated CUDA dropout masks; setting this variable to 1 restores it.
For async all_gather, the future value is now the list of per-rank outputs rather than a one-element list holding a stacked tensor.
Replaces the exported is_macos_13_or_newer() helper; no compatibility alias is provided.
The enum members drop the VER and PLUS portions of their names, with no compatibility aliases.
The zero-argument C++ overload was removed; pass includeBool explicitly, using false to preserve its previous behavior.
Dynamo graph-breaks rather than silently dropping tangents; fullgraph=True now errors.
Individual Python function events are excluded by default; pass include_python_functions=True to retain the previous view.
Custom Python process groups implementing new_group() must accept the backend keyword, which PyTorch now forwards when creating subgroups.
The setting is replaced with memory-headroom controls.
Segments allocated after registering a symmetric-memory pool are no longer automatically upgraded to symmetric windows; collectively deregister and register again after allocations to use symmetric-window algorithms.
It is now a deprecation shim: install and develop still forward to pip, while build and other commands print replacement commands instead of running setuptools. Build through pip or python -m build.
Comparisons with non-stream objects now follow Python-consistent behavior: equality is False, stream != None is True, and ordering comparisons raise TypeError.
Triton min/max uses relaxed signed-zero ties by default; set strict_signed_zero=True to preserve eager ties.
Compiled and fake/meta execution enforce the same exact output-dtype requirements as eager execution.
The use_cuda argument was removed; use use_device="cuda" instead.
Complex type promotion for bfloat16 now uses bcomplex32 instead of complex64; cast explicitly to complex64 when its precision or operator coverage is required.
The deprecated API was removed; use torch.linalg.cholesky(). For an upper-triangular factor, take the conjugate transpose with .mH.
Boundary subgradients now follow the selected dispatcher schema's input space: scalar-bound equality gives the input gradient 0, while tensor-bound ties split gradients evenly.
At an ordinary tensor-bound tie, gradients split evenly between the input and bound.
At a scalar-bound equality the input gradient changes from 1 to 0; at an ordinary tensor-bound tie, gradients split evenly between input and bound.
The tvm backend now requires TVM's relax frontend; older TVM installations raise ImportError. Pass a TVM pipeline through options instead of relay-only scheduler and trials options.
Complex MPS inputs now produce clear unsupported-dtype errors.
It is a no-op for fake process groups and warns rather than failing for backends that cannot configure timeouts.
Ranks absent from every requested split now receive GroupMember.NON_GROUP_MEMBER instead of None.
Fractional max pooling raw operations now reject non-positive kernel_size values instead of returning invalid outputs and indices.
Ties now split gradients evenly, and forward-mode AD for the min/max family is aligned with the new rules.
Loading with weights_only=True always validates sparse-tensor invariants, regardless of the global setting; malformed checkpoints may now raise errors.
MPS validates offsets consistently with CPU and CUDA instead of silently returning incorrect results.
Functional and module Lp pooling APIs now raise a descriptive ValueError when norm_type=0.
Eligible fused backends are now selected for dense rank-3 inputs on CPU, CUDA/ROCm, and XPU. Selection may change numerics, dropout RNG consumption, view behavior, and higher-order-gradient support; select the math backend when those semantics are required.
The balanced policy is no longer accepted; use compact instead. Passing balanced now raises ValueError.
Invalid dim types are rejected at construction rather than failing later during forward.
Invalid dim types are rejected at construction rather than failing later during forward.
Setting profiler_measure_per_kernel to a non-default value no longer enables CUPTI range profiling, is ignored, and emits a FutureWarning.
Setting profiler_metrics to a non-default value no longer enables CUPTI range profiling, is ignored, and emits a FutureWarning.
The use_cuda argument was removed. Select CUDA through activities instead.
The deprecated API was removed; use torch.linalg.qr() with mode="reduced" or mode="complete" instead of the Boolean some argument.
TorchScript consistently rejects bare list and tuple value annotations; specify an element type such as list[int].
The relay-only backend entry point no longer exists in torch._dynamo.backends.tvm.
Bazel build support and its build files have been removed; users building PyTorch should migrate to the supported CMake or pip install flow.
Disallows bitwise shifts for bool dtype on MPS.
Fix fake collective operations to copy inputs to outputs, validate all_to_all splits, and reject ranks outside world_size at construction.
Reject NestedTensor inputs with a clear error instead of an unclear backend failure.
Named tensors and their Python and C++ APIs, factory names= arguments, and operator overloads have been fully removed.
Building PyTorch from source now requires NCCL 2.23 or newer; prebuilt wheels already bundle a compatible version.
The operator now returns a fresh tensor instead of aliasing and mutating its qaccum input; callers relying on mutation must use the returned tensor.
Detect communication between non-adjacent stages at initialization and raise a clear RuntimeError.
Bare PyObject arguments or return types are rejected in operator schemas because torch.compile does not support arbitrary PyObject inputs to custom ops.
PyTorch no longer ships free-threaded Python 3.13t wheels; users should move to Python 3.14t.
Returns NaN for empty input on MPS.
The built-in COW query entry point was removed in favor of the pluggable materializer hook.
The built-in COW materialization entry point was removed in favor of the pluggable materializer hook.
Adds a pluggable one-shot materializer hook that runs on the first mutable data-pointer access, replacing StorageImpl's built-in copy-on-write entry points.
The C++ grad_fn signature now uses c10::intrusive_ptr<Node> instead of std::shared_ptr<Node>.
The 2.13 ROCm wheel fails on the CPU compile path when no GPU is available, raising a vectorized ISA detection error; use a ROCm image or a standard CPU/CUDA build as a workaround.
CUDA manual_seed now causes a graph break so compiled random calls stay reproducible.
Renames all_gather_into_tensor to align the public collective API with torchcomms naming.
Renames reduce_scatter_tensor to align the public collective API with torchcomms naming.
When TorchComms is enabled, subgroup creation routes through split_group and raises NotImplementedError for unsupported arguments instead of silently falling back.
Source builds now require a compiler and build configuration that support C++20.
CUDA 12.8 binaries were removed from the binary build matrix; users pinning cu128 should switch to cu130 or cu126.
Building PyTorch from source requires CUDA 12.6 or newer; older CUDA versions are no longer supported.
Inductor internals migrate from legacy allow_tf32 to fp32_precision to align with the new TF32 API.
Compiling through FSDP2 hooks without graph breaks is no longer supported; allow graph breaks or disable compiled autograd for the FSDP2 training step.
An explicit error is now raised when layer_norm computes third-order derivatives.
All MPS tensors are now allocated in unified memory, enabling CPU access without explicit copies; performance may differ for code relying on device-only placement.
Placements are now opaque.
The
size_hintAPI was deleted; developers using it must remove or replace those references.The
size_varsAPI was deleted; developers using it must remove or replace those references.Source builds that enable SVE validate compiler configuration more strictly and may reject previously accepted but incorrect configurations.
Deferred layout freezing for max_autotune is opt-in; set this config to True to retain the deferred behavior.
Creating a torch.cdouble tensor on MPS now raises an error.
Its ops now raise RuntimeError inside torch.compile; migrate to the functional collectives API.
CUDA calls now dispatch to cuSolver rather than MAGMA, which may affect numerical behavior, performance, or debugging.
CUDA calls now dispatch to cuSolver/cuBLAS rather than MAGMA, which may affect numerical behavior, performance, or debugging.
Set this environment variable to 1 to opt in to deferred layout freezing for max_autotune.
Prevents cross-stream in-place operations and memory-planning buffer reuse for user streams.
Security 14
Fixes CUDA index overflow wrong results and illegal accesses, AMP batch norm overflow, lazy-init re-entry deadlocks, assertion reporting, graph annotations and capture lifetimes, allocator synchronization and IPC reservations, JITerator cache recovery, embedding_bag bounds checking, and outer-product bmm fallback.
Validate mean, invstd, and counts shapes before CUDA gathering to prevent out-of-bounds reads.
Add opt-in weights_only=True restricted deserialization mode; the default remains unchanged for compatibility.
Parse rank expressions with ast.literal_eval() rather than executing them with eval().
Validate channel counts in replication_pad1d and replication_pad2d backward operations to prevent out-of-bounds reads and segmentation faults.
Validate signal channels and peer ranks to prevent out-of-bounds device-memory access and adjacent-allocation corruption.
Validate grad_output shapes in 2D and 3D backward operations before kernels can read out of bounds.
PyTorch is vulnerable to memory corruption through its torch.jit.script function
PyTorch is a Python package that provides tensor computation. Prior to version 2.10.0, a vulnerability in PyTorch's
weights_onlyunpickler allows an attacker to craft a malicious checkpoint file (.pth) that, when loaded withtorch.load(..., weights_only=True), can corrupt memory and potentiallyPyTorch is vulnerable to memory corruption through its torch.lstm_cell function
PyTorch is vulnerable to memory corruption through its unpack_sequence function
An issue in the component torch.linalg.lu of pytorch v2.8.0 allows attackers to cause a Denial of Service (DoS) when performing a slice operation.
pytorch v2.8.0 was discovered to contain an integer overflow in the component torch.nan_to_num-.long().
pytorch v2.8.0 was discovered to display unexpected behavior when the components torch.rot90 and torch.randn_like are used together.
Deprecations 28
The no-op option is deprecated.
begin* and end* methods take MPSStream*; stream-less begin* overloads are deprecated.
Importing the old private module now emits DeprecationWarning.
This attribute is deprecated in favor of FunctionEvent.metadata, a typed dict[str, Any] containing the same information.
The legacy NCCL implementation remains available as nccl-legacy for this release only and will be removed in the next release.
Passing a bare set of parameters to an optimizer emits FutureWarning because set iteration order can change; use an ordered collection such as a list.
This API is deprecated and will be removed in PyTorch 2.17.
This ignored setting is deprecated; reading or setting it emits a one-time FutureWarning. Delete it from your code.
This setting is deprecated; with Triton versions lacking block pointers it becomes a no-op with a one-time warning. Use tensor descriptors instead.
This ignored setting is deprecated; reading or setting it emits a one-time FutureWarning. Delete it from your code.
This API emits FutureWarning and is scheduled for removal in PyTorch 2.17; use torch.profiler.profile or Nsight Systems with emit_nvtx().
This function is deprecated and emits FutureWarning; annotations are now cleaned up when their executable graph is destroyed.
The method is now a no-op with a deprecation warning; generator state is registered lazily on first RNG use during capture, so explicit registration calls should be removed.
The method emits a FutureWarning; activate a green context by creating a stream from it and using that stream with torch.cuda.stream().
The private alias remains available with a deprecation warning; use the public torch.distributed.set_timeout API.
The setting is deprecated and is now a no-op; generators are always traced lazily.
The distributed spelling remains a forwarding alias but now emits a FutureWarning; use torch.compiler.config.compile_on_one_rank.
TorchScript APIs now emit visible FutureWarnings directing users toward torch.compile or torch.export.
with_modules is deprecated and emits a FutureWarning; it collected module hierarchy only for TorchScript, while eager users can use with_stack=True to record nn.Module events.
Returning an output that aliases an input under torch.compile now emits a UserWarning; return a clone or refactor the operator to avoid the alias.
Creating tensors with this quantized dtype is deprecated and emits a warning in Python and C++.
The old collective name remains as a wrapper but emits a FutureWarning; use all_gather_single instead.
The old collective name remains as a wrapper but emits a FutureWarning; use reduce_scatter_single instead.
Source builds with CMake versions older than 3.10 emit a deprecation warning; a future release will require CMake 3.10 or newer.
The profiler field is deprecated; use event.event_metadata instead.
Inlining built-in nn.Module instances is now the default; setting this config emits a deprecation warning and it will be removed in a future release.
A deprecation framework was added so individual options in the torch.compile config module can be marked deprecated.
fullgraph=True now warns when a call runs no compiled code; this will become an error in 2.13.
New APIs and options 330
Records Python launch stacks for CUDA graph nodes during capture when record_py_stacks is enabled.
Chooses where the AOTInductor debug printer saves tensors.
Enables batching DDP's copy into .grad.
Enables an opt-in Triton bmm template for a batch-broadcast left operand.
Opts into decomposing CPU bmm when its batch size cannot be proven.
Adds a FsspecWriter argument enabling dcp.async_save support; it is placed before overwrite.
Adds random backoff after failed rendezvous state writes.
Adds a property returning the ncclComm_t on all NCCL backends.
Controls whether AOTI_RUNTIME_CHECK_INPUTS=1 rejects dimensions above the compile-time upper bound.
Custom autograd.Function backward can access engine gradient accumulation buffers to accumulate an input gradient in place and return None; availability depends on backward order and several execution conditions.
Returns the current MPS stream as part of the public MPS stream API.
Returns the default MPS stream as part of the public MPS stream API.
Distributed pipelining adds defer_reduce_grad_wait and unshard_lookahead options to lower peak memory and improve overlap via lazy receive buffers.
A new extension point supports out-of-tree accelerator backends.
Adds an experimental API to abort all process groups of a root mesh, avoiding hangs when a peer exits early.
AOTInductor backends can provide their ATen device type to C++ codegen.
Manually finalizes backward after enabling manual backward finalization.
Enables manual backward finalization so other work can overlap the in-flight gradient all-reduce; call finalize_backward afterward.
Custom backends can define this callable to run when torch.compile resolves the backend, enabling setup and early failure.
Lets custom ErrorHandlers observe success and see the @record entrypoint name.
Writes CUDA graph kernel annotations into the exported Chrome trace.
FakeProcessGroup supports all_to_all_single with any sizes and adds a simulate_uniform_ranks option.
Adds gradient accumulation across several pipeline schedule runs with FSDP stages.
Warns instead of failing on higher-order operators without a FLOP formula; the counter also counts flex_attention FLOPs.
Tensor-subclass parameters can implement this method to free raw all-gather buffers immediately after fsdp_post_all_gather.
Adds manual gradient reduction and resharding; async_op=True returns a GradientReductionHandle so reduction can overlap other compute.
Adds an option to keep unsharded parameter storage allocated across reshard().
Adds control over when gradient reduction and resharding run, rather than using the autograd final callback.
FsspecWriter is now public and supports dcp.async_save through cache_staged_state_dict; pass overwrite and subsequent arguments by keyword.
Sets a peak-memory-increase threshold for rejecting fusions.
Sets a percentage peak-memory threshold for rejecting fusions.
Adds an NCCL symmetric memory API to obtain a multimem CFT handle.
Reports locality-domain information for restricting SM partitions.
Adds an NCCL symmetric memory API to obtain a peer CFT handle.
Reports the number of SMs actually allocated to a green context.
Creates green contexts with disjoint SM allocations; supports locality-domain restrictions with newer CUDA bindings.
Declarative implies support is added to Inductor/Dynamo Config.
Reports whether hardware locality-domain restrictions are supported.
Allocates DDP gradient buckets during backward and frees them afterward to lower peak memory.
Controls how many FSDP stages stay unsharded at once in multi-stage schedules.
Limits pending sends in distributed pipeline schedules.
Accepts min and max for an initial value range.
Use nccl-lazy when independent point-to-point communicators are needed; it creates communicators lazily per send/recv peer pair.
Added no_split support to torch.xpu.MemPool.
Allows per-parameter mixed precision in fully_shard while keeping one all-gather per group.
Adds a context manager around each stage forward that receives the stage and microbatch indices.
Keeps subgroup rank order aligned with the DeviceMesh rank order.
Adds lazy communicator creation for nccl and nccl-lazy groups on first use, avoiding roughly 200 MiB allocation in new_group.
Adds options to shrink the virtual-address reservation of expandable segments.
Added an environment variable to choose the Metal language version.
Enables wildcard fallback for dynamic-shape TunableOp GEMM tuning.
Supported in functional all_reduce and under LocalTensorMode.
Adds the in-place scaled_addmm operation.
Sets the current MPS stream as part of the public MPS stream API.
Added the gfx950 pre-swizzled MX FP4/FP8 block-scale layout for scaled_mm.
The XPU backend supports SYCL free-function kernels, allowing device code to be written as explicit free functions instead of verbose functors.
Adds an environment variable for static_sources, keeping listed sources static under automatic dynamic shapes, PGO, or dynamic=True.
Selects thread-based Inductor compile workers for free-threaded Python with thread or auto, avoiding process-spawn and pickling overhead.
When set to warn or error, makes torch.cuda.set_device warn or raise if another device already holds a CUDA primary context.
More c10/util helpers are available header-only under this include path.
Adds a C++ lifecycle observer attachable with set_observer() for begin/end callbacks around inference, constant swaps, and constant folding.
CUDA builds add a native-AOT export stage for CuTeDSL and Triton kernels; set TORCH_NATIVE_AOT=0 to skip it.
Terminates on a legacy NCCL timeout instead of hanging.
Adds a stable ABI check for whether a Python object is a tensor; stable ABI conversions for torch.dtype and torch.device Python objects are also added.
Lets region_activation_memory_budget apply to a whole compiled graph.
Adds num_runners and use_stream_affinity arguments to keep each non-null CUDA or XPU stream on the same model instance across calls.
Adds use_stream_affinity to keep each non-null CUDA or XPU stream on the same model instance across calls.
Adding FLYDSL enables the experimental FlyDSL GEMM autotuning backend for ROCm gfx950, covering specified matrix multiplication workloads.
Adds strict_pointwise and strict_reduction modes; strict now matches eager numerics more closely.
Use this setting for tensor descriptors instead of the deprecated block-pointer setting.
Skips generated range asserts when compile-time bounds are too strict.
Adds a public API to run a callback when the current backward pass finishes.
Adds the bfx9 mode, which preserves FP32 inputs and outputs while allowing cuBLAS to use BF16x9 on compute capability 10.0 and 10.3 GPUs.
Accepts out-of-tree backend configuration values using the <device>.<key> form.
Lists sources that remain static under automatic dynamic shapes, PGO, or dynamic=True, but not explicit mark_dynamic.
Adds annotation_config for CUDA graph kernel annotations, including source and automatic keying modes.
Reads the Python launch stacks recorded for CUDA graph nodes.
Adds SM partition creation and locality-domain-aware splitting for CUDA green contexts.
The function now also accepts a dict.
Can warn or raise when another device already holds a CUDA primary context if TORCH_CUDA_CHECK_STRAY_CONTEXT is enabled.
Enables dynamic-shape TunableOp GEMM tuning.
A private helper waits on all outputs of a multi-output functional collective at once; torch.compile uses it for coalesced collectives and batch_isend_irecv.
Adds an experimental one-sided transport API with a NIXL backend and CUDA-graph-capturable stream-ordered transfers.
Adds an experimental pure-Python watchdog that detects hung CPU and GPU operations in Python distributed backends and dumps thread stacks on timeout.
Adds analysis of activation lifetimes and reusable storage slots from a pipeline schedule.
Adds support for the float8_e4m3fn dtype on MPS.
Adds a beta public module exposing multi-tensor torch._foreach_* operations under stable documented names and ordinary-op parameter names.
Adds a public MPS stream API, including stream creation and stream-management functions and a context manager.
Adds a context manager for using an MPS stream.
Supports bicubic mode for 5-D input.
Adds an operation computing beta * input + alpha * scaled_mm(mat1, mat2) in a single cuBLASLt GEMM on CUDA, with scaled_mm scaling recipes and torch.compile support.
Adds a public module of functional optimizers, including adam, adamw, sgd, and muon, with callers managing parameters, gradients, and state.
Adds configuration for the experimental Cuspy CUDA collection backend without using _ExperimentalConfig.
Adds configuration of profiler collection per activity group, such as CUDA hardware performance counters.
Events created with interprocess=True can be shared across processes through torch.multiprocessing or IPC handles.
Reconstructs an interprocess XPU event from an IPC handle.
Provides an IPC handle for sharing an interprocess XPU event.
Supports pluggable XPU allocators.
Added no_split and use_on_oom support to XPU MemPool.
This is the renamed environment variable; the old variable remains a fallback.
Applies torch.compile(mode="lite") globally, including to AOTInductor compilation.
Limits CUDA Graph Trees re-recording for dynamic shapes.
Controls initial CUDA Graph Trees memory-pool allocation to address fragmentation.
Limits CUDA Graph Trees re-recording.
An opt-in build option collects build metrics and requires CMake 4.3 or newer.
The build option defaults on for qualifying Linux AArch64 CUDA builds when llvm-bolt 21 or newer and USE_PRIORITIZED_TEXT_FOR_LD are available; set it to 0 to opt out.
Added use_on_oom support to torch.xpu.MemPool.
The XPU build system exposes USE_SYCLTLA while adding pure SYCL compilation and Clang host compiler support.
Added support for Float4_e2m1fn_x2 and Float8_e8m0fnu.
Opt in to pinned asynchronous AOTInductor constant loading by setting AOTI_COPY_USE_PINNED_ASYNC=1.
When set, AOTInductor prints timing and diagnostic messages for each constant-loading stage without requiring a rebuild.
Supports explicit user-defined streams and emits stream-guard code so compiled kernels run on the selected stream rather than always on the default stream.
Creates an AOTInductor model container from caller-owned weight tensors for zero-copy sharing; constants are not loaded from the package and remain caller-owned.
Adds a protocol for distributed checkpointing tensors that expose global and local shape and offset metadata.
Lets custom autograd.Function implementations declare each output's expected gradient dtype independently of its storage dtype.
Adds destroy callbacks and object retention.
Adds replay start and end hooks.
Adds portable JSON loading of distributed execution logs for comparisons across processes or model configurations.
Adds portable JSON serialization of distributed execution logs for comparisons across processes or model configurations.
Expanded sharding strategies for matrix, attention, sorting, scanning, softmax, tensor operations, and Conv1d/2d/3d; added redistribution from final-dimension sharding to Partial("sum").
Adds a shared keyword accepting ShapesSpec or ParamsSpec for explicit dynamic shapes in export, fake make_fx tracing, and torch.compile.
Profiler events expose Kineto metadata as typed values when expose_kineto_event_metadata is enabled, avoiding JSON reparsing.
Adds an experimental backend that creates per-peer NCCL point-to-point communicators on demand.
Adds an explicit legacy NCCL backend name alongside an opt-in for selecting the experimental replacement behind the nccl name.
The experimental backend gains fault-tolerant reconfiguration and one-sided window operations.
The experimental backend adds split_group, complete Work semantics, nonblocking communicators, uneven list collectives, communicator memory suspend/resume, and memory-pool registration and deregistration.
Can consume explicitly pre-split positional inputs, keyword inputs, and targets through arg_mbs, kwarg_mbs, and target_mbs.
Custom Python process groups can use batch_isend_irecv, the coalescing manager, and complete collective coverage, including single-tensor gather/scatter.
Gloo process groups support fault-tolerant reconfiguration.
Allows readable communicator names in NCCL logs and profiler tools.
Controls the number of cuBLASLt heuristic candidates requested by TunableOp.
Adds an option to choose whether selective activation checkpointing honors surrounding saved_tensors_hooks; the current default preserves legacy behavior and warns when hooks are active. Requires use_reentrant=False.
Used to provide optional shell-completion generation for torchrun.
Callers can provide an is_impure_node callback so side-effecting nodes are preserved during dead-code elimination.
Adds a prototype higher-order op selecting among N branches by index; autograd is not yet supported.
Adds XPU support for symmetric-memory operations used by asynchronous tensor parallelism, enabling communication and computation overlap on Intel GPUs.
Adds read-only DLPack export, including copy-on-write-preserving exchange with compatible consumers.
This is the preferred environment variable for compile_on_one_rank; the older distributed-prefixed variable remains supported for compatibility.
The opt-in selects the experimental replacement backend behind the nccl name.
Enables an autotuning_inputs log artifact reporting Triton autotuning input shapes, dtypes, strides, and scalar values.
Adds stable-ABI permute.
Adds stable-ABI Tensor overloads for bitwise operations, index_select, floor_divide, and is_pinned.
Adds stable-ABI conversion from Python torch.Tensor objects to torch::stable::Tensor.
Adds a stable-ABI query for whether a Tensor has storage.
Adds stable-ABI conversion from torch::stable::Tensor to Python torch.Tensor objects.
Adds a dtype overload to stable-ABI view.
Adds a length argument so a scan can run a fixed number of steps when xs=None.
Opt-in setting applies locality-based graph reordering to training graphs.
Opt-in CUDA Graph Trees generation cloning preserves live user-visible outputs across generations.
Adds backend-agnostic accelerator RNG state inspection.
Adds backend-agnostic inspection of RNG states across accelerators.
Adds backend-agnostic accelerator RNG seed inspection.
Adds a thread-local context manager whose callback receives fully populated autograd graph nodes created in its scope, including during higher-order differentiation and checkpoint recomputation.
Opts eligible bfloat16 grouped GEMM workloads into the cuBLASLt backend on Hopper and Blackwell with CUDA 13.3 or newer; eligible float16 workloads select it by default.
Adds support for TVM's Relax frontend and pipeline-based tuning.
Lets code request another CUDA Graph Trees warmup iteration.
Adds a public API for non-strict tracing.
Adds a capture-start hook alongside global CUDA graph capture and replay start/end hooks.
Adds a public CUDA graph annotations module.
The CUDAGraph debug flag is unified, debug_dump moves to Python, and capture hooks are added.
Attaches timestamped metadata events to live CUDA allocations; annotations appear in snapshots when memory history is enabled and only the native CUDA caching allocator supports them.
Memory snapshots can include CPU pinned-memory allocations; pass record_cuda=False to record only pinned host memory.
Adds a control for the number of cuBLASLt heuristic candidates used by TunableOp, which now supports CUDA cuBLASLt.
Adds an experimental accessor for custom backend development.
Adds a public API for setting distributed timeouts; the private alias remains available with a deprecation warning.
Adds construction of distributed linearly spaced tensors.
Adds construction of distributed logarithmically spaced tensors.
Attaches a dynamic-shape specification to a function or nn.Module.forward; compile, export, and make_fx use it automatically, and conflicting call-site specifications error.
Lets Python-authored kernels reserve Philox counter ranges that remain correct across CUDA Graph capture and replay.
Computes the principal square root of symmetric or Hermitian positive-definite matrices, supporting batches, autograd, vmap, and torch.compile.
Computes the polar decomposition A = U @ H for matrices with at least as many rows as columns, using portable SVD and eligible CUDA cuSOLVER QDWH acceleration.
MPS adds flex_attention auxiliary and dynamic-shape support, polar, large-tensor nonzero, complex Cholesky and nan_to_num, upsampling backward, and geqrf support.
Adds MPS forward and backward support.
The CUDA memory-efficient backend adds grouped-query attention, implicit multi-query key/value broadcasting, and backward support under vmap.
Adds a maximize parameter.
Adds the spectral_unclamped scaling option to the adjust_lr_fn parameter.
Can be called without a function to create an eager-mode decorator with checkpoint configuration separated from wrapped-function arguments; direct calls remain the compatible form under torch.compile.
Adds a wrapper for read-only DLPack export and compatible copy-on-write-preserving exchange.
Adds a query for per-process GPU memory usage on XPU.
Device-wide synchronization support is added on XPU.
Adds a log-line prefix template and hostname variable to identify the host that emitted each worker log line.
Adds optional shell-completion generation through the shtab package.
A dedicated error type is added for SYCL compilation failures.
Allocate, run, and delete tensors per kernel during AOTI autotuning to avoid OOM on large models.
Adds a stable AOTI stream shim for retrieving a native stream handle, gated behind TORCH_FEATURE_VERSION >= 2.13.
Add support for controlling scientific notation in C++-side tensor printing.
Allow opting out of horizontal fusion so partitioning follows only direct data dependencies.
Bound AsyncCompile future waits using this setting.
Gates the Inductor decomp_comms FX pass that eliminates all_gather for Gram-matrix optimizer patterns under FSDP.
Allow AOTInductor C++-only builds to override or suppress the default CPU architecture flag.
Add get, set, and reset functions for BLAS workspace sizes.
Adds a lightweight API to get private pool reserved memory bytes.
Add a config for partition reordering based on a CUDA graph memory budget.
Adds CUDA graph topology introspection.
Add default-args support to def_static.
Add a flag to select the depthwise convolution backend.
The PrivateUse1 backend name is exposed as an alias in DeviceType.
Add a health check endpoint to the distributed debug server.
Accept a pre-created torchelastic health check server so it can start before rendezvous.
Profiler output now exposes CUDA occupancy metadata as a nested dictionary.
Introduce a dedicated device mismatch error with actionable guidance for placing inputs, parameters, and buffers on the same device.
Expose num_splits in FlashAttention-2.
Assigns reduce-scatter its own NCCL communicator, enabling opt-in overlap of all-gather and reduce-scatter.
Enables GPU Address Sanitizer builds on ROCm.
Add == overloads for HeaderOnlyArrayRef.
An optional Torch-Profiler-based benchmarker, gated by an environment variable and off by default, provides more accurate timing of short-duration kernels.
Retain cubin bytes in cached kernels so caches restored on another machine avoid recompilation.
Adds MPS support through a new Metal kernel.
Lets operators, including out-of-tree operators, declare which arguments require symmetric-memory allocation.
Exposes the NCCL 2.30 maxP2pPeers configuration binding.
Adds a fused linear-projection and cross-entropy loss module that avoids materializing the full logits tensor and reduces peak memory for large-vocabulary training.
Support non-blocking pinned device-to-host copies on XPU.
Add ObjectSpec to dynamic shape specification.
Add op_overloads to enumerate an operator's overloads.
An optimizer reparameterization helper is added for non-strict tracing.
Add a pipeline schedule flag, defaulting to True; setting it to False defers each RECV until immediately before its consuming compute op.
Adds a configurable kernel option for CPU FlexAttention flash decoding, selected when query length is 1.
Add an Inductor config threshold for peak memory in combo kernels.
Adds a context manager gating a pinned memory pool for activation-offloading ao::offload ops, avoiding per-tensor cudaHostAlloc overhead.
Adds an Inductor config flag to disable the optimization.
Python process group backends can now access the PREMUL_SUM factor.
Add an Inductor ROCm config flag to disable the pointer_range_32 optimization.
Adds Triton integration for symmetric memory on ROCm.
Add SeqSpec for list and tuple dynamic shape specifications, with improved walk-spec errors.
Keeps multiple reduce-scatter input buffers in flight so backward compute does not stall waiting to recycle a single buffer.
Adds a stable C shim for error-code checks, available for target version 2.13 and newer.
Add an optional fake_mode argument, with dynamic_shapes="from_example_inputs", to reuse the caller's FakeTensorMode and ShapeEnv.
Pipeline schedule step() accepts extra keyword arguments for the loss function, supporting loss functions that need arguments beyond output and target.
Adds an API to clear a registered materializer hook.
Reports whether deferred materialization is pending and replaces is_cow() for that check.
Exposes overlapsWithUsedNodes and getVmap.
Adds a stable C shim so extensions built against the stable ABI can retrieve the original error message across the C API boundary.
Adds a stable C shim for retrieving the original error message without a backtrace across the C API boundary.
Adds stable ABI access to an accelerator stream's native handle, gated behind TORCH_FEATURE_VERSION >= 2.13.
Add torch::stable::Generator.
Adds a way to swap submodules in scripted modules while updating parent types and remapping referenced types across graphs.
Support torch.accelerator.device_index in the device context manager.
Add an API to control the memory layout policy for accumulated gradients.
Gradient inputs can now be passed as a dict.
Adds the region_activation_memory_budget autograd API.
isolate_recompiles=True gives each compile call its own isolated cache bucket, preventing cross-compile interference in cache lookups and recompile-limit checks.
Sets the default torch.compile backend globally, so backend authors need not pass backend= at every call site; explicit backend arguments take precedence.
Expose the current cuSOLVER handle for sharing.
Returns a dtype's short string abbreviation, such as f32 for torch.float32.
Support pin_memory for torch.full.
Exposes einops-style tensor reshaping through the torch.func namespace.
Add a c10::layout typecaster for torch.layout.
Support pin_memory for torch.ones.
Adds an operator tag declaring that an operator mutates a tensor in place; tagged custom operators gain improved torch.compile behavior and generated fake/meta kernels.
Adds an operator tag declaring that it writes into a caller-provided output tensor; tagged custom operators get fake/meta kernels generated for free.
Adds a Python binding for read-only data pointer access on tensors.
Add last_level_cache_size and is_integrated_gpu to XPU device properties.
Support torch.xpu.device in the device context manager.
Support pin_memory for torch.zeros.
Adds Triton input- and weight-gradient convolution kernels as an autotuning backend instead of the ATen-only fallback.
Add a host-to-device copy operation.
Add torch.xpu APIs for device temperature, frequency, power draw, engine utilization, memory bandwidth usage, and used device memory.
Adds a config flag that improves tracing speed when enabled.
Semi-structured sparse tensors can now be instantiated with alg_id.
The Gloo backend now supports all_to_all.
amdgcnspirv is now a supported offload target, but is not enabled by default.
Added an op for asynchronous activation offloading to CPU.
Added an op for asynchronous activation reload.
Added an op for asynchronous activation offloading stream management.
Added a compile backend registry and custom device support so out-of-tree device backends can plug into the eager compile/load flow.
AOTI Eager can use one compiled kernel for multiple input shapes through AOTIPythonKernelHolder.
Selective Activation Checkpointing now supports user AutoNamingMode.
Adds a pdb-style debugger for stepping through nested frames during Dynamo tracing, with n, u, d, r, and bt commands.
Adds a user-callable breakpoint() that automatically starts the Dynamo tracing debugger.
MPS now supports cholesky_solve.
Exposes a brgemm API for fp8 (e4m3 and e5m2) GEMM, backed by oneDNN.
Added an option that reduces per-parameter kernel launches to two kernels per bucket.
Added a config flag to opt out of Welford reduction in code generation.
Added print() higher-order operator support for DTensor.
Adds grad_placements to control gradient placements explicitly in the backward pass.
Added is_pinned() support.
Adds the DynamicInt __pow__ method.
Adds the DynamicInt __rpow__ method.
Adds the enable_gqa parameter to SDPA MPS meta registration.
ROCm now supports expandable segments.
A new operator clones foreach tensors, with a CUDA fast path using _foreach_copy_.
hipSPARSELt now supports FP8 semi-structured sparsity.
FSDP2 supports per-parameter meshes, allowing different parameter groups to shard over different meshes.
Supports DTensors on a full SPMD mesh via DataParallelMeshDims.
Added a method that detects and merges overlapping fusion groups.
Added the ignore_raw_node option.
Adds half precision FFT support on the XPU backend.
Added CPU support for unsigned int8 multiplied by signed int8.
Added an API for input-independent graph optimization.
MPS now implements linalg_qr.
XPU CUTLASS GEMM kernel codegen and codecache enable CUTLASS-style GEMM templates to target Intel GPUs.
Added MTIA Triton codegen support for median.
AOTInductor's C shim layer supports float8_e8m0fnu and float4_e2m1fn_x2 for MXFP4 quantization.
Adds suspend(), resume(), and memory_stats() APIs for managing communicator memory lifecycle.
Added nested tensor deserialization support.
Added a bias argument to normalization methods including LayerNorm, GroupNorm, and RMSNorm.
Exposed num_splits in varlen attention so split_kv can be disabled.
Added the compute_estimator option.
Added scalar prefetch and indirect access support.
Memory visualize adds a tab showing the private pool memory view.
Profiler activity selection now supports fine-grained activity type selection.
Adds symmetric-memory support for variable-sized block reductions with NVLink multicast or LSA fallback.
Adds a CPU implementation of scaled_mm_v2.
Added MTIA Triton codegen support for sort.
Added an option that wraps submodule outputs in a tuple.
Adds
donate_graph_moduleto avoid extra graph module copies during standalone compilation.Adds a barrier API and TCPStore client BARRIER support, reducing synchronization round trips compared with the ADD+WAIT pattern.
Added a thread-safe RNG utility function for dataloading.
Adds min/max bounds for communicating value ranges to the symbolic shape system.
A unified frontend Graph interface provides graph capture and replay across CUDA, XPU, and out-of-tree backends.
The unified Graph API is now supported on XPU.
Adds a keyword argument to override the per-function recompile cap without changing global config.
Inductor supports user-defined streams in compiled regions, including stream context managers and record_stream calls with synchronization and cross-stream dependency tracking.
Adds the enable_annotations keyword argument to torch.cuda.graph.
Added a timeout parameter.
Adds an API to check whether a tensor is a symmetric memory tensor.
The CUTLASS backend now supports this dtype, including registration for FP8 GEMM autotuning.
NanCheck is available as a standalone op usable outside of ProcessGroupNCCL.
Adds a configurable timeout for the SIGTERM-to-SIGKILL interval during worker shutdown.
Adds unsigned integer types to Metal cast operations.
Inductor can fuse user Triton kernels with downstream pointwise epilogues by parsing kernel source and inlining the epilogue into tl.store.
Added the enable_gqa flag.
Adds memory_clock_rate and memory_bus_width to XPU device properties.
Register pack and unpack hooks on an individual saved tensor to control how it is stored and restored for the backward pass.
Use this context manager to apply a pair of pack and unpack hooks to all saved tensors created within the context.
Adds a function to enable or disable FlashAttention for scaled dot product attention.
Adds a function to enable or disable the PyTorch C++ implementation of scaled dot product attention.
Adds a function to enable or disable Memory-Efficient Attention for scaled dot product attention.
Adds a context manager to enable or disable scaled dot product attention implementations, allowing developers to control which kernels can run.
Adds scaled dot product attention with optional boolean or float attention masks, dropout, and causal masking. The beta API may select optimized CUDA kernels automatically.
Performance 97
all_gather_object is faster.
The min-cut partitioner reduces cold compile time by about 5%.
Single-column BF16 GEMMs use the native GEMV path on specified Arm Neoverse builds, accelerating single-thread GPT-2 decode.
XPU col2im replaces its hard-coded work-group size and runs faster.
Collective bucketing is faster, including up to 9x faster uneven reduce-scatter padding.
Enabled Composable Kernel SDPA flash attention on RDNA4 (gfx1200/gfx1201).
Kernel call overhead is reduced by 40–50%.
BF16 performance improves by 6–29%.
CUDA 2D transpose copies are faster.
Adds a built-in CUDA batched LU kernel matching MAGMA and improves backend selection without pivoting.
CUDA dtype-conversion copies are faster.
Assigning scalars through indexing avoids CPU-GPU synchronization.
CUDA pooling backward is faster.
Uses the NVLS multicast barrier when a multicast mapping is available.
Reduces reduce-scatter gradient memory for size-1 shard groups and low-precision gradients.
View cache hits are faster.
CUDA scratch memory use is reduced for _foreach_norm and max.
A 10–30x slowdown affecting gather, index_select, x[idx], and scatter_add on rows of 16 or 32 bytes is fixed.
Larger reduction tiles roughly double HBM bandwidth use.
Added XPU support; geqrf now runs natively instead of falling back to CPU.
New backward configurations provide 1.8–2.3x faster performance.
Adds a channels-last CUDA kernel.
XPU forward is fused into a single kernel, and contiguous cat uses vectorized stores.
Caching, background source hashing, and parallel combo-kernel benchmark compilation reduce Inductor compile time.
Added XPU support; the operation now runs natively instead of falling back to CPU.
More MPS operations, including softmax, nll_loss, padding, and where, use native Metal kernels, reducing launch overhead and driver memory growth with variable shapes.
MPS reductions, linear algebra, GEMV, convolutions, histc, masked fill, dropout, and sort are faster.
Softmax over a non-innermost dimension and scalar-argument unary operations are faster on row-strided views.
Calling nn.Module is about 15% faster.
AArch64 dispatches non-contiguous FP16 matmuls to oneDNN ACL GEMM kernels instead of the reference implementation.
Decode performance improves on Blackwell, with a wider set of autotuning candidates.
XPU overhead is reduced by trimming scratchpad initialization, host synchronizations, and re-allocation.
CUDA constant loading parallelizes pinned host staging copies.
AArch64 small-batch performance improves by 2–4x.
RMSNorm backward is faster by up to 2x on sm12x.
Mix-order reduction fusion supports more shapes, speeding up RMSNorm backward.
Compile time in ShapeEnv is reduced.
Chains are simplified to reduce recomputation and peak memory.
Added gfx1250 Tensor Data Mover support to Inductor for mm/addmm, pointwise and reduction codegen, and FlexAttention.
Wheels ship top_level.txt again, fixing slow importlib metadata calls that delayed importing libraries.
Copies are fused into foreach kernels for dynamic shapes.
Reduces compiled-code and helper per-call overhead, and compile time by deferring gen-2 GC, skipping empty graphs, and speeding up large functions.
Receives split/cat optimizations.
torch.jit.load and graph pre-optimization are faster.
Added a native MPS implementation for mixture-of-experts models.
CUDA 13 Linux wheels use ahead-of-time compiled radix-select kernels on Hopper and Blackwell.
CUDA performance improves 5–25x for small outputs.
Vectorized type-casting loads avoid register spilling in mixed fp32/bf16/fp16 elementwise kernels.
Training is faster by aligning the oneDNN graph pattern with oneDNN v3.13 and integrating GQA and dropout support.
CUDA zero_ is faster.
Conversions are lowered directly on CPU and CUDA instead of relying on fallback conversion code.
Adds native float32 and complex64 MPS implementations, retaining CPU fallbacks for small matrices and matrices exceeding threadgroup memory.
Reduce memory use for torch.nonzero on MPS.
Importing this module no longer eagerly compiles TorchScript merely because the module is imported.
Support CPU activation offloading in the rematerialization pass, marking recomputed nodes for backward and freeing offloaded tensors after host-to-device copy.
XPU inference gains oneDNN-backed sequence-level support, replacing the per-timestep fused-cell path.
Improves Inductor GEMM search-space performance using the Origami project on ROCm.
Adds a fast path for guardless cache hits.
Skips a Dynamo graph break for scalar-only binary operations when tensorify is enabled.
Reduces GIL contention during tensor deserialization.
Improve heuristics for switching between cuSOLVER and cuBLAS backends.
Added non-TMA persistent Triton templates for addmm under max-autotune, enabling persistent kernels on hardware without TMA.
Batches cubin-to-object conversion using
.incbinassembly, substantially reducing compile time for models with many Triton kernels.Adds a vectorized AArch64 SVE transpose implementation independent of fixed vector widths.
Added an Inductor Triton template for depthwise conv1d.
Reimplements
crossas a single-stage Metal kernel on MPS.Inductor discovers registered .out overloads and lowers functional custom ops to them, enabling memory planner buffer reuse.
Improves performance for
torch.catand pytree operations.PTX-to-fatbin compilation is parallelized when this option is enabled, reducing AOTI export time for large models.
Switches the MPS exponential distribution implementation to native Metal.
Migrates eye to native Metal kernels on MPS.
Multi-consumer
F.padis rewritten astorch.catto enable zero-copy.Migrates fill_ to native Metal kernels on MPS.
Uses SymmMem for reduce-scatter.
Overlaps reduce-scatter with compute for per-parameter meshes.
Migrates index_fill_ to native Metal.
Adds an ARM NEON implementation for bilinear and bicubic interpolation with antialias on ChannelsLast RGB images.
Migrates lerp to native Metal kernels on MPS.
Added non-TMA persistent Triton templates for mm under max-autotune, enabling persistent kernels on hardware without TMA.
Added MTIA Triton codegen support for mode.
Frees q, k, and v earlier to reduce peak memory usage.
Fixes quadratic name generation, improving performance for graphs with many nodes.
Replaces MPSGraph
nonzerowith a native Metal prefix-sum and scatter implementation.Migrates norm to native Metal kernels on MPS.
Adds a multi-tensor fast path.
Migrates relu to native Metal kernels on MPS.
Improves performance on MPS.
The pack hook uses non-blocking copies to speed up activation offloading.
Migrates silu to native Metal kernels on MPS.
Improves performance for COO-by-dense batch matrix multiplication.
Inductor enables padding fusion with torch.cat and avoids duplicate cat/pad computation for inputs with multiple consumers.
DTensor performance is improved for
torch.cat.Batched CUDA inputs use an improved cuSolver path for better performance.
Avoids duplicate tensor serialization when saving multiple exported programs.
On XPU, skips boundary validation checks needed only on CPU to avoid unnecessary device-to-host synchronization.
Parallelizes across batch and channel dimensions, improving VLM position embedding resizing performance.
Migrates xlogy to native Metal kernels on MPS.
Behavior and default changes 160
Added mixed-precision support to the fused Adam implementation on XPU.
Added mixed-precision support to the fused AdamW implementation on XPU.
c10::List iterators satisfy std::random_access_iterator, and List<T>::emplace now constructs a T.
Added MPS support for complex64 in linalg.lu_factor, linalg.lu_solve, triangular solves, and tanh backward.
Reports kernel grid and block dimensions, dynamic shared memory size, and programmatic dependency edges.
Enabled FP8 2:4 sparsity on ROCm MI300.
FsspecReader is now public in torch.distributed.checkpoint.
No longer requires the deprecated enable_symm_mem_for_group call.
Added XPU support for the out variant; linalg.qr now runs natively instead of falling back to CPU.
When enabled, backed SymInt inputs now emit runtime asserts.
Windows CUDA builds and wheels now enable the FlashAttention backend for Ampere and newer GPUs, where SDPA previously fell back to the math backend.
Allows FlashAttention-4 when query/key and value head dimensions differ.
Added XPU support for float8 in scatter fill.
The cuDNN backend is preferred for SDPA on sm86 and sm89 for higher performance.
Child groups now share the parent Store connection.
Enabled symmetric memory on XPU by registering a SymmetricMemory allocator for torch.xpu.MemPool.
The variable now defaults to on; C++ stack traces use dladdr by default, showing library path and offset and a symbol name only when exported.
Adds sort to the stable C++ ABI.
Non-strict export logs now include compile and frame IDs.
Loads an extracted package directory directly.
Added a native MPS implementation, enabling the operation in AOTInductor on MPS.
Added MPS support for torch.frexp.
Regenerated split, split_with_sizes, and unbind outputs are rebuilt as a single slice or select of their base, changing grad_fn names and in-place error text without changing gradients.
Meta implementations for helper ops enable fake-tensor tracing.
Instances are now hashable.
Supports Optional[list[Tensor]] annotations.
Accepts float8_e4m3fn inputs on MPS.
Adds backward and forward-mode automatic differentiation for Bessel functions.
Added MPS support for torch.special.laguerre_polynomial_l.
Adds CPU and CUDA support in clamp, maximum, and minimum.
Nested reduction fusion is enabled by default; set this environment variable to 0 to disable it.
The build option is turned off automatically when no target CUDA architecture is sm80 or newer.
The cuDNN backend supports causal grouped-query attention with a paged KV cache, including head dimension 256 on Blackwell GPUs.
Added XPU support for unsigned integer dtypes in where.
Supports lazy autotuning and compilation of torch.cond and torch.while_loop.
Adds native MPS support.
A single CUDA graph can now use multiple memory pools.
Supports head dimension 256 on SM90 and SM10.x with cuDNN newer than 9.22 and cuDNN Frontend 1.24 or newer; backward currently requires d_qk and d_v both 256.
Multiword compiler commands such as "zig c++" are accepted when building Inductor-generated C++ code on POSIX systems.
Returns input nodes, output nodes, and parameters in deterministic graph order.
Adds initial technology-preview AMD support; CK SDPA/GEMM, FP8 grouped GEMM, and int4 matrix multiplication remain unsupported.
Enabled on Linux with ROCm 7.14 or newer.
Pair communicators are included in error reporting, suspend/resume operations, and memory statistics, with broader shared backend coverage.
Partitioned-scatter selection is memory- and contention-aware and enabled by default on ROCm; set this setting to False to opt out.
Adds native MPS sampling, eliminating its CPU fallback.
Module functions and constants are accepted as messages.
Explicitly registered logging.Logger methods with supported positional arguments run after the compiled region instead of causing graph breaks.
Adds XPU FP8 blockwise scaling support for MXFP8, MXFP4, and NVFP4 recipes.
CUDA now supports torch.float16 and torch.bfloat16 inputs.
Selecting the CK GEMM backend now works on ROCm gfx90a devices, independently of CK attention support.
Compilation support expands for Python constructs and tracing covers additional accelerator, tensor, and distributed operations.
Reuse now supports source-backed objects, symbolic shapes, dataclasses, and namedtuples.
Supports dynamic shapes for dimensions marked with mark_unbacked, allowing one artifact to serve multiple runtime sizes without guarding on that dimension.
CUDA graph memory pools are included in the reported reserved memory.
Can be used inside a compiled region; allocations in the context, including fallback and extern kernels, are routed to the pool.
Device-qualified Gloo backends are accepted when TorchComms is enabled.
Adds bfloat16 support on CUDA and float16/bfloat16 support on XPU; unsupported CUDA and XPU cases promote to float32, while CPU FFT continues to reject these dtypes.
The eager CPU torch.polar kernel now supports Half inputs.
MPS dispatch key is preserved through transforms, enabling MPS autocast and autograd under vmap and grad.
Enabled on ROCm 7.14 or newer through hipSOLVER's generic Xgeev API.
Adds MPS support, including complex inputs, on macOS 15 or newer.
Backward support is available on CPU, CUDA, and MPS, and Dynamo can trace the operation.
MPS gains support for the operation.
Adds native float32 and complex64 MPS implementations, retaining CPU fallbacks for small matrices and matrices exceeding threadgroup memory.
Added to the core ATen decomposition table used by ExportedProgram.run_decompositions(), including correct dim=() handling, and gained sparse COO dispatch.
Out-of-tree backends can define additional out_dtype combinations under fake/meta tracing; CUDA and XPU restrictions remain unchanged.
The chunked path handles probability targets with mean or sum reduction when target dtype matches input and targets do not require gradients.
Can process float32 and float64 inputs larger than 2**24 elements on devices supporting float64 by computing ranks in float64.
CUDA float16 and bfloat16 support is added, including supported sparse-CSR backward paths.
Adds bfloat16 support on CUDA and float16/bfloat16 support on XPU; unsupported CUDA and XPU cases promote to float32, while CPU continues to reject these dtypes.
Compiled scans now honor deterministic-algorithm settings.
Adds scalar searchsorted support, broader copy-view batching, scalar fill and comparison support, and a native in-place masked_fill_ rule. Batched repeat_interleave requires a common output_size.
Adds CUDA graph support.
Bare backend names are auto-qualified, process-group options pass through custom backend creation, and unknown device-qualified names can register as custom backends.
NVGEMM profiles ten configurations by default; set this variable to 5 to restore five.
Origami is enabled for ROCm max-autotuning by default; set TORCHINDUCTOR_ORIGAMI=0 to opt out.
Adds native recording mode on non-PVC devices when built with oneAPI 2026.1 or newer.
Profiler overhead is recorded as OVERHEAD activities on a dedicated track in exported traces.
Adds IPC memory handle sharing support on XPU.
Inductor autotuning subprocesses now honor this XPU environment variable.
Frame pointers are enabled by default so profilers can produce accurate stacks.
Positional arguments can now be passed as keyword arguments to autograd custom Functions.
Enable combo_kernel_autotune_grouping by default.
Delegate calls to custom process group subclasses.
Dynamo supports __setitem__ and __delitem__ on more container types via sequence and mapping slots.
Enables external events in CUDA graphs on ROCm.
Supports TheRock wheel distribution.
Adds FlexAttention support for MPS, bringing the feature to Apple Silicon.
Add XPU dispatch for _fused_adagrad_.
Enable rewriting of FX traces containing complex tensors during compilation.
Graphsafe RNG in aot_autograd is generalized to support non-CUDA device backends.
Make LocalTensorMode transparent to torch.compile so compilation proceeds as if the debugging mode were inactive.
Adds a differentiable decomposition.
Alert when non-deterministic algorithms are used on MPS.
No longer explicitly depends on ProcessGroupNCCL, allowing symmetric memory to work with out-of-tree backends such as torchcomms.
Support mixed-type operations between Nested and Dense tensors on XPU.
Profiler/Kineto now emits channel metadata on CUDA backends.
Add FP8 blockwise scaling support for scaled_mm on XPU.
Storage.is_pinned is now device-agnostic.
Storage.pin_memory is now device-agnostic.
Add a stable ABI for set_python_module on torch::Library.
Generated C shims for the AOTI stable ABI are versioned and gated by this target version, exposing newer shims only when supported.
Triton CPU AOTI models now work end-to-end through the public compile-and-package API, including packaging multiple shared libraries per kernel.
Enable Armv9-A target support for torch.compile on AArch64.
Triton kernels compiled with torch.compile can accept tl.constexpr values as kernel arguments.
The is_compiling flag is now set for the whole torch.compile session.
Adds MPS support for Dirichlet by implementing _sample_dirichlet and _dirichlet_grad in Metal.
Make the functorch JVP operator torch.export-able.
Support serialization of opaque type constants during torch.export save and load.
Support forward-mode automatic differentiation on models wrapped with fully_shard or replicate, including mixed precision.
torch.load can now load safetensors.
AOTI Eager now supports multi-return ops such as native_layer_norm and aminmax.
PyTorch execution traces now capture whether collectives are asynchronous.
cond supports aliases and mutations under no_grad.
ROCm CPP extensions now compile only for the user's detected architecture.
Backs out making cuBLASLt the default BLAS backend when available.
MPS cumprod now supports complex inputs.
MPS cumsum now supports complex inputs.
DeviceMesh is now traceable by torch.compile and made opaque.
DTensor redistribution now supports twice-differentiable operations.
Expanded sharding strategy coverage across listed indexing, transform, linear algebra, normalization, foreach, fused, and einsum operations.
Dynamo tracing now supports enum.Enum iteration.
FSDP2 supports non-floating-point parameters by excluding them from reduce-scatter while still sharding and all-gathering them as needed.
Warns instead of raising an error when fullgraph=True falls back to eager.
Added higher-order derivatives.
hipSPARSELt is enabled for ROCm >= 7.12, including FP8 semi-structured sparsity support.
MPS histogram now supports float and bfloat types.
invoke_subgraph now supports subgraph reuse.
Dynamo tracing now supports itertools.takewhile.
MPS logcumsumexp now supports complex inputs.
Autotuning now extends to combo kernels, with per-sub-kernel block-size configurations, sequential autotuning, and reduction hints.
MPS now supports mvlgamma.
MPS nn.functional.linear now supports complex inputs.
Dynamo tracing now supports nn.Module.__getattribute__.
nonstrict_trace now accepts nn.Module inputs.
Dynamo can trace operator.index(tensor), bool(...), and float(...) using CPython numeric slots; torch.Generator methods graph-break.
Adds PadMM AutoHeuristics for A100 and H200 and supports pad_mm AutoHeuristics in deterministic mode.
Combining per_process_memory_fraction with throw_on_cudamalloc_oom enables preemptive OOM rejection.
Profiler events() now has parity with the information returned by export_chrome_trace().
Symmetric memory CUDA ops now record parameter communications for ProcessGroup metadata in profiler traces.
MPS repeat now supports complex inputs.
MPS scatter now supports complex inputs.
Enables the split_group API when TorchComms is used as a TorchTitan backend on XPU.
Enabled the API for TorchComms on XPU.
TorchElastic stdout/stderr redirects now support Windows.
Defines unbacked slice-size symbols when bounds become provable after tracing.
Made public with aot_eager and inductor backend support.
Added backward and forward automatic differentiation support.
The requires_grad type is now Optional[bool].
Adds support for using triton.set_allocator inside torch.compile.
CUDA graphs can capture data-dependent torch.cond control flow in a single graph using conditional graph nodes on CUDA 12.4+; works with eager and cudagraphs compile backends, not Inductor.
Dynamo/Inductor now handles current-stream behavior through torch.cuda.stream.
Serialization now supports float8_e8m0fnu, torch.uint32, torch.uint64, and nested float lists.
CUDA calls now dispatch to cuSolver rather than MAGMA, which may affect numerical behavior, performance, or debugging.
CUDA calls now dispatch to cuSolver rather than MAGMA, which may affect numerical behavior, performance, or debugging.
Single-node training without --master-port or --standalone now uses an OS-assigned free port instead of port 29500.
triton.set_allocator is now supported inside torch.compile.
Added meta device support for initialization.
Added FP64 support on ROCm via hipBLASLt.
XPU device capability reporting adds Uint16, Uint32, Uint64, and FP8 support.
Tooling 10
Runs pytest or test/run_test.py in a manner similar to CI.
Adds kernel-level XPU Graph replay visibility, cross-rank XCCL collective correlation, and per-kernel hardware counters across Intel GPUs.
Adds the documented memory_format overload so static type checkers accept calls such as module.to(memory_format=torch.channels_last).
Static typing for indexing now resolves integer keys to Module and slices to Sequential.
Adds mappings for cublasMath_t, its enum values, and CUBLAS_COMPUTE_16F so HIP-ported extensions using these cuBLAS features hipify without project aliases.
Add a debugging tool to verify external inputs to a CUDA graph are alive before replay.
ROCm uses CMake's native HIP language support.
Adds Python 3.15 wheel builds across Linux CPU/CUDA, Triton, ROCm, and XPU.
Adds a new Inductor benchmarker based on Torch Profiler.
NCCL collective sequence numbers are now included in Kineto profiler traces, helping developers inspect collective ordering.
Fixes and other changes 391
Fixes compilation and incorrect results involving Tensor subclasses, mutated inputs, cache keys, unbacked symbols, opaque constants, device nodes, effect tokens, version counters, resize views, and dynamic-shape training graphs.
Fixes C++ wrapper compilation failures, lost buffer mutations, subgraph tensor constants, runtime constant dispatch, resource leaks, MPS artifacts, return-type outputs, and dropped lite-mode assertions.
Is now honored for dynamic size arguments.
The overrideable fused SDPA fake kernel now validates attention bias and key/value shapes.
The CPU kernel dispatch cache is populated, avoiding repeated CPU capability selection on every dispatch.
Supports Optional[list[Tensor]] annotations.
Fixes eager-matching out dtype checks, symbolic out bitwise shifts, and data-dependent linalg.cross behavior.
Support empty batch dimensions on CPU, CUDA, and MPS.
Triton scans such as cumsum now accumulate float16 and bfloat16 values in float32.
Accepts a CPU device_id.
Added XPU support for linalg.polar.
The chunked path supports soft-label targets with reduction="none".
Passing only one of min or max no longer crashes.
Fixed honoring EXHAUSTIVE with decompose-K and benchmarking all candidates under the same CUDA graph policy.
The C++ frontend function no longer crashes when num_heads is zero.
XPU uses the SDPA backend for multi-query attention even when enable_gqa=True is not passed.
Fixed precision for float64 and after expand().
ROCm falls back to the native RNN implementation when MIOpen RNN fails at runtime.
Fixes guard errors for jagged inputs with changing batch sizes and keepdim reductions.
Fused GRU cell meta kernels enable compiling CUDA nn.GRUCell.
Added XPU support for the stateless Philox RNG operation.
Python 3.15 Linux wheels now depend on triton so torch.compile works on GPU after installing torch.
Fixes empty-input attention, dropout seed and offset, SDPA results, large-input launches, FP8 GEMMs, graph-capture hangs, BF16 atomics, topk ordering, sharded batch norm, hipify integer narrowing, extension headers, warnings, and large-reduction indices.
The cuDNN backend fixes NaN query gradients on Hopper and silent generation corruption on B200 for the described sequence lengths and head counts; affected Hopper shapes fall back with older cuDNN.
Added XPU support for sparse linalg.vector_norm.
Added XPU support for sparse.spsolve.
Fixed exporting tensors on a non-current non-CUDA device.
Can now be read on non-leaf tensors.
Added MPS support for Tensor.put_ and torch.take.
Adds stream recording support for tensors on MPS.
Cloning a Sequential module no longer renames its submodules.
Fixed a segmentation fault on MPS.
Fixed incorrect results for overlapping out= tensors.
Buffer-protocol objects now supply the dtype through their buffer format.
AOTInductor now handles operators falling back to ATen through the proxy executor or C shim in lite mode.
Forwards name to custom backends as kwargs["name"].
torch.compile now works on Python 3.15; the unsupported-version check now applies to Python 3.16 and newer.
Added support for sinh, hypot, ldexp, and other math ops in torch.compile on MPS.
Fixes Windows parallel_for wrong results, including CPU scaled_dot_product_attention, and MPS argmax/argmin indices, convolution backward strides, warnings, and 64-bit constant truncation.
Fixes compiling 4-bit dynamically quantized matmul on Arm CPUs without the dot-product extension.
Fixes branch metadata mismatches caused by math.trunc on a SymInt.
Fixes expandable-segment unmapping on another device without synchronization and excessive device-memory reservations for IPC imports.
Graphs created by make_graphed_callables are no longer garbage-collected during an unrelated capture.
Keeps the device index unresolved under compile_on_one_rank so compiled artifacts are not rank-specific.
Fixes data-dependent guard errors, stale generated device arguments, symbolic-size fake tensor constant deserialization, fake tensor proxy errors, and masked assignment with data-dependent sizes.
Fixed torch.finfo(torch.float8_e5m2fnuz).eps being off by a factor of two.
Supports scalar scatter on CUDA.
Fixed gradients when one input is NaN.
Fixed compiled edge cases involving signed zeros, subnormals, float16, and bfloat16.
Added MPS support for torch.heaviside.
Fixed errors for fp8 dtypes without infinity and NaN being reported as finite for float8_e8m0fnu.
Fixed errors for fp8 dtypes without infinity.
On MPS, half and bfloat16 lerp computations now use float precision.
Fixes MPS crashes and wrong results in SVD, least squares, solve, pseudoinverse, and related complex operations and reductions.
Fixed precision loss from rounding the step to the output dtype on CPU for float16 and bfloat16, and on CUDA.
Fixed storage sharing being lost with map_location="meta" or FakeTensorMode.
Added MPS support for torch.logspace.
Fixed precision loss on CUDA caused by rounding the step to the output dtype.
Supports deterministic bicubic backward.
Compiled output now has the correct dtype when mean and standard deviation use mixed floating-point dtypes.
Dynamo export no longer hardcodes LSTM or GRU output lengths under dynamic shapes.
Fixed compiled edge cases.
Added MPS support for torch.take and Tensor.put_.
Several loss operations and addr no longer fall back to the slow loop under python -O.
First use no longer enqueues two commands, avoiding missing profiling data and intermittent Inductor autotuning failures.
Free memory is no longer under-reported on Xe2 and later GPUs.
Fixed the setting being ignored when set to 0.
Added MPS support for unsigned integer comparisons.
Supports large channels-last tensors on XPU by using 64-bit indexing.
USE_MIMALLOC=OFF is honored on Windows and AArch64.
When a source-distribution or release-tarball CUDA build lacks NCCL, the error message now names USE_SYSTEM_NCCL=1 and USE_NCCL=0 as fixes.
Fixes wrong values and NaN gradients when compiling weight_norm on one-dimensional parameters.
Large BF16 products compute only one triangle on SM100.
Updates the binaries to CUDA 13.2.2, resolving CUDA issues that could produce incorrect results in NVFP4 matrix multiplications and kernels with nested thread divergence.
Fixes incorrect solutions on MPS for complex batched underdetermined systems.
Fixes non-orthogonal U and inaccurate small singular values on MPS for rank-deficient and ill-conditioned inputs.
Fixes failures on MPS with a Metal pipeline-state error for inputs above 8192 elements.
Fixes an internal assert on MPS for complex inputs when using out.
Handle empty tensor inputs correctly in XPU addmv.
Functional backward supports the linear avg reduction instead of rejecting it after a successful forward pass.
The NCCL symmetric-memory backend now implements barrier instead of raising a not-implemented error.
Fix the Triton override to support XPU tensors.
Replacing FileBaton with filelock prevents stale-lock deadlocks.
Its pool is trimmed and allocation is retried once before an out-of-memory error is raised.
Create handles per device so sparse operations remain valid when a thread switches between CUDA devices.
Registered custom communication backends are selected instead of incorrectly falling back to NCCL or Gloo when the backend is unspecified.
CUDA IPC-backed dataset storage is released when workers exit, preventing retained producer-side references and allocations.
Post-dispatch make_fx tracing decomposes detach by default to fix silently incorrect second-order gradients; an explicit decomposition table retains previous behavior.
Compiled functions can return DTensor permutation views such as transpose, permute, or movedim.
Quantized byte and 4-bit rowwise lookups no longer fault on ROCm.
Generating guard messages for deeply nested symbolic-shape expressions no longer raises RecursionError.
summon_full_params with offload_to_cpu no longer accesses freed storage when the flattened parameter is already on CPU.
HIP C++ extensions on Windows now register hipify-produced .hip sources with MSVC so they are dispatched to hipcc.
Fix channels-last stride mismatch on XPU.
Complex inputs are rejected with NotImplementedError instead of an internal MPSGraph error.
Pinned memory correctly appears as a CPU tensor while retaining its shared Metal buffer.
Unsupported dtypes now produce a clear error.
The correct Metal cooperative-tensor ABI is selected on macOS 26 to prevent corrupted output.
Dtype-converting copies no longer overwrite their source and non-dense views copy correctly with matching strides.
Fix compiled multi_margin_loss with weights on XPU.
Non-contiguous tensors are handled safely, fixing vmap failures and possible out-of-bounds memory accesses.
Non-contiguous tensors are handled safely, and CUDA backward precision errors are fixed by applying missing upcasts.
Ranks are normalized through Python's integer protocol, allowing tensor integer ranks and clearly rejecting non-integral values.
CUDA backward uses 64-bit sample offsets.
Raise RuntimeError rather than crashing when XPU cannot allocate a pinned host-memory buffer.
Python subclasses can be constructed through the (store, rank, size) constructor, and their virtual overrides are dispatched correctly.
PyTorch publishes Python 3.15 wheels for Linux x86-64 and aarch64, Windows x86-64, and macOS Apple silicon across applicable builds; torch.compile remains unsupported.
PyTorch publishes free-threaded Python 3.15t wheels across the listed Linux, Windows, and macOS platforms; torch.compile remains unsupported.
Dynamo now matches Python behavior for a range of built-ins, conversions, descriptors, errors, operators, subclass types, and attribute probing.
The FBGEMM ARM path now checks overflow, fixing incorrect quantized values on some hardware.
Modules using only this hook no longer emit a warning intended for register_full_backward_hook when forward inputs do not require gradients.
The ROCm meta-kernel now uses the compact log-sum-exp dimension returned by ROCm backends, fixing nested tensor backward and torch.compile.
Fix oneDNN SDPA with GQA and a broadcasted mask on XPU.
On ROCm Windows, grouped-matrix, batch-normalization, and sparse-matrix operations raise clear unsupported-operation errors instead of crashing when optional libraries are unavailable.
A warning is issued when collectives are launched concurrently on multiple streams, which can otherwise deadlock.
MPS computes integer absolute values exactly instead of rounding through float32.
MPS handles empty dimensions.
MPS supports strided output tensors on macOS 14 and 15.
Fractional arguments with an integer output dtype no longer produce the wrong length due to premature truncation.
Validation error messages preserve dynamic type names and argument indices.
MPS handles empty dimensions and does not propagate NaN or infinity from input when beta=0.
Supports second-order gradients, so grad-grad computations no longer fail for lack of a backward derivative.
MPS ternary-kernel dispatch is fixed for large tensors and mixed-dtype out tensors.
CUDA clamp preserves signed zero.
Inductor handling of torch.combinations and several other operation and graph-output cases is corrected.
Compilation better matches Python built-ins, operators, iterators, container initialization, object behavior, exceptions, and subgenerator closure behavior.
Selected Dynamo, Inductor, and FX tracing state is thread-local to prevent race conditions when compilation is invoked concurrently from multiple threads.
No-op dropout decompositions preserve eager identity semantics, avoiding replacement of a Parameter with a cloned fake tensor when dropout is disabled.
Graph reuse, eager autograd, graph capture, and transposed captured buffers are fixed.
Compilation fixes cover tensor subclasses, torch.func, autocast, metadata guards, fake-mode re-entry, in-place mutation, and several graph-break cases.
Symbolic proxy tracing and repeated lowering edge cases involving contiguous-stride expressions are fixed.
ROCm graph capture no longer fails or hangs for callables using hipBLASLt; warmup and capture use the same stream.
A nonzero root argument is respected instead of always broadcasting from the first tensor.
Complex MPS inputs now produce clear unsupported-dtype errors.
Compiled output and gradients are corrected for overlapping-input operations.
Streams are flushed before fsync so buffered writes are persisted correctly on remote filesystems such as GCS.
Locally synchronized calls consistently return GroupMember.NON_GROUP_MEMBER on nonmember ranks.
Subgroups whose local and global source ranks differ no longer produce a zero source gradient.
Gloo and NCCL no longer crash when the world process group was not the first backend instance created.
MPS floor division now matches CPU and CUDA nonfinite-value semantics.
Dynamic-shape specifications for functions with **kwargs now accept call-like keys and specs nested under the variadic parameter, and ambiguous name collisions report UserError.
Strict export treats parameters from modules in unregistered Python containers as constants rather than trying to restore them from eager module state.
Non-strict export now handles tensor indexing under vmap when the index is a batched scalar tensor.
Restores parameters, buffers, and constants for non-contiguously numbered repeated module calls.
Compiled MPS operations no longer fail with KeyError for unsigned 16-, 32-, or 64-bit index expressions.
MPS FFT operations work when a transformed dimension is outside the tensor's final four dimensions.
Fix a crash when out_dims=-1 and the mapped function returns an output independent of its vmapped input.
MPS results are corrected for extreme values.
MPS handles empty indices.
Length clamping and padding remain symbolic under dynamic shapes, avoiding recompilation and data-dependent guard failures when requested length crosses signal length.
Fix scripting a wrapper containing an already-scripted child with a __jit_ignored_attributes__ submodule.
Signed right-shift export rounds negative values toward negative infinity, matching PyTorch.
Gradients for negative integer exponents now return 2.0 ** exponent instead of zero.
Invalid complex norm orders raise a clear ValueError; dynamic compilation also handles p='fro' and p='nuc' with symbolic tensor sizes.
Boolean MPS inputs now produce clear unsupported-dtype errors.
CUDA Graph capture is fixed for this operation.
The CPU gelsy driver no longer returns an incorrect rank because of stale pivot values between batched LAPACK calls.
MPS preserves exact integer values for large ranges.
Backward accuracy improves using a correctly rounded double-precision log(10) constant.
Backward accuracy improves by using named mathematical constants.
CPU and MPS now agree with other backends when eps > 0.5.
Inconsistent LU_pivots and LU_data shapes now raise a clear error instead of segfaulting.
Compiled output strides and channels-last memory format now match eager CPU execution.
MPS supports strided output tensors on macOS 14 and 15.
MPS exponential samples remain strictly positive so one-sample multinomial cannot select a zero-probability entry.
Meta output shapes are corrected when dim=() should reduce all dimensions.
MPS bfloat16 tensors no longer return their input unchanged.
Backward no longer crashes for channels-last MPS tensors.
MPS output is corrected when a kernel spatial dimension is at least 256.
MPS forward and backward now work with non-contiguous weights.
MPS handles input sizes that are not divisible by the output size.
Compiled execution rejects alpha=0 with the same error as eager execution.
CUDA backward no longer overflows int32 for mode="max".
ROCm nearest upsampling handles large channels-last outputs without exceeding HIP's launch limit.
ROCm nearest interpolation no longer fails on large channels-last inputs whose output approaches 2^32 elements.
MPS linear backward handles inputs with more than four dimensions, and complex high-rank linear operations no longer abort on macOS 27.
MPS linear no longer drops bias for vector-shaped inputs on macOS 26.
Biased MPS linear operations no longer corrupt rows when a batch dimension exceeds 2^16.
MPS linear forward and backward handle zero in_features without aborting.
Large matrix multiplications on M1 and M2 GPUs no longer produce incorrect results.
Compiled values and gradients are corrected when targets use -1 padding.
The attention-mask dtype is declared to cuDNN rather than inherited from graph I/O dtype.
Memory-efficient attention remap extents, causal key bounds, and 32-bit dropout offsets are corrected.
cuDNN variable-length SDPA is fixed.
CPU flash SDPA now returns correct results when the innermost input dimension is not contiguous.
MPS attention kernels now propagate NaNs correctly.
ROCm results are corrected for very large row counts when normalized size is not a multiple of 4.
MPS layer normalization supports float32 affine parameters with float16 or bfloat16 inputs in forward and backward.
MPS layer normalization improves small-variance row correctness and supports 64-bit indexing.
MPS backward applies inter-layer dropout correctly and avoids NaNs when dropout=1.
MPS fused affine multiplication uses float32 to match CPU and CUDA precision.
Decompositions avoid data-dependent guard failures when sequence lengths are symbolic.
Quantized gather export unpacks quantized tensor inputs before lowering.
The constant_pad_nd reference decomposition is fully functional, so dynamo ONNX export no longer fails functionalization for models using pad.
Becomes a no-op for an empty parameter group.
Fused CPU optimizer updates and float16/bfloat16 casts are corrected.
Backward handles Boolean scalar bases and symbolic Python integer exponents without an assertion failure or NYI SymInt equality crash.
Ordinary profiling no longer imports the experimental CUPTI monitor, preventing repeated warnings and tracebacks on systems with incompatible cupti-python versions.
The qint32 per-channel float_qparams path no longer divide-by-zero crashes, and whole-byte quantized types pack correctly.
Validate tensor shapes and sequence bounds before native kernels index direction-number tables.
CUDA relu preserves signed zero.
Fix compiled torch.signbit for float64 inputs on XPU.
Assigning Python integers greater than INT64_MAX no longer raises an overflow-unpacking error.
Fix incorrect large-int64 results while optimizing flat torch.unique.
Nonempty inputs with a zero-sized shape dimension raise a clear ValueError; empty indices remain supported.
Unsupported third-order derivatives are rejected instead of silently returning an invalid result; second-order derivatives and evaluation mode are unchanged.
Zero-sized spatial outputs now short-circuit to empty output and zero backward gradients, matching cuDNN and CPU behavior.
Triton CPU AOTI models now work end-to-end through the public load API, including loading packages with multiple shared libraries per kernel.
Messages show the forward op name instead of the backward node name.
Gradient clipping now produces correct results with multiple data-parallel shard axes.
Adds validation for invalid kernel sizes.
CUDA graphs use a storage-copy fallback for self-overlapping inputs and unbacked shapes, and are disabled for input storage mutation.
Does not route to cuDNN SDPA when batch size or head dimension exceeds 65536.
Fix a file descriptor leak from atexit cleanup.
Reusing a DefaultStager no longer causes a crash.
Dynamo exceptions are now pickleable.
Fixes filling byte-dtype views with misaligned storage offsets on MPS.
The MKL finder respects environment values from setvars.sh so custom oneAPI installs are detected correctly.
Fixes behavior under compile.
Fixes a segmentation fault on x86 CPU without AMX caused by the qlinear primitive cache.
Fixes signed-zero handling in its decomposition.
Optimizer state-dict save/load now uses the FSDP process group for models initialized with a non-default process group.
Fixes its decomposition when keep-probability is zero.
FX passes now preserve user runtime asserts.
Adds backward support on MPS.
Adds backward support on MPS.
Compares in opmath in its decomposition.
Fixes fake tensor length padding.
Support linear_bias on the reference and chunked paths.
Tracing tensor-parallel models no longer crashes from dead global-shape shadow nodes recorded in the graph.
BMM correctness is fixed when dynamic OpenMP threads are used.
Fixes dtype promotion in the CUDA kernel.
Adds validation for invalid output sizes.
Fixes a SIGSEGV on MPS.
Preserves internal precision in eager execution.
Zeros total_weight before accumulating.
Validate the delta type in the constructor.
Fixes incorrect output shapes when dim is negative under torch.compile.
Fixes mixed-dtype padding decomposition.
Fix pipeline construction for models with non-float intermediates that previously raised a gradient dtype RuntimeError.
Fixes data-dependent errors involving unbacked SymInts.
Profiler no longer emits the cycle-clearing warning when the schedule uses no cycles.
The backward dtype is no longer ignored.
Now works with @leaf_function, allowing a backward hook to fire once per backward pass after gradients are computed for all requires_grad inputs.
Inductor debug and repro tooling now serializes fake tensors and symbolic metadata, including for dynamic shapes.
Fix wrong learning rate initialization when milestones contain 0.
Uses torch.sigmoid() in its decomposition.
Fixes out-of-bounds indices for bool, int-max, and NaN inputs on MPS.
On multi-backend process groups, split only the relevant backend, avoiding extra rendezvous overhead and inconsistent group shapes.
DTensor squeeze no longer redistributes when strict_view is set, keeping the spec shape and local tensor in sync.
Fixes Windows builds with oneAPI 2025.3 and later.
Add a vmap batching rule for dtype views.
to_local no longer drops the _is_param marker set by nn.Parameter on custom tensors.
Fix decorator state leakage.
Compiled execution now raises IndexError in cases where eager execution does, and handles skipped frames with fullgraph and a non-default stance.
Fixes address compiled operator correctness and failures, including cumsum, cumprod backward, index operations, and convolution dtype mismatches.
Fixes crashes with batched matmul in inference_mode.
Fixes a crash from aten.lift functionalization on an already-functionalized tensor.
Fixes ExternalStream(0) to wrap the NULL stream.
Rounds the per-process memory fraction cap to avoid spurious OOM.
Fixes use under torch.compile.
Fixes shape validation for out tensors under torch.compile.
Fixes NaN float scalar handling in export guards and input constraint checks.
Fixes save/load serialization of predispatch wrapper functions, including JVP and vmap.
Simplifies Min/Max of scaled symbolic terms so export no longer rejects valid branch guards.
Fixes dynamic shapes for sparse COO inputs.
Handles scalar tensor slice bounds during non-strict export.
The CPU kernel now validates the pivot range.
Clear the MPSGraph cache when torch.mps.empty_cache() is called.
Validate opt_dtype for consistent error handling.
Route integer output dtype through nan_to_num and sum to produce correct results.
Implement autograd derivatives for torch.nextafter.
Fixes train/eval errors and dropout not being applied correctly on MPS.
Lowercase the environment variable value so it matches the true values.
Fixes decomposition for an empty dimension with nonzero split_size.
Add Half and BFloat16 dispatch support for torch.trace on CPU.
Add a vmap batching rule for torch.unbind_copy.
Bound the final process join or wait when workers are stuck in an uninterruptible process and log the unkillable PID.
Resolves relative cache directory paths.
Backward no longer crashes when the input is sharded.
DTensor view failures after an uneven Shard-to-Replicate redistribute are fixed by making the local tensor contiguous.
Return an exception that can be inspected from Python.
Fix shared-weight gradient double-counting.
Fixes illegal memory access in the Triton convolution2d_bwd_weight kernel on B100/B200 (sm100) GPUs.
Fixes fill_ on byte-dtype views with misaligned storage offset.
Fixes nondeterministic outputs with FLASH_ATTN on NVIDIA B200 GPUs.
Fixes complex overflow and underflow on MPS.
Fixes a crash when BlockMask is passed as an argument.
Inductor adds FMA-based addcdiv lowering for CUDA parity with eager.
Adds proper float64 handling for addmm on XPU.
Returns a zero-filled matrix on MPS when an input is empty.
Adds proper float64 handling for addmv on XPU.
Fixes addmv backward pass failure.
Reverts deprecation warning spam for allow_in_graph.
Fixes incorrect indices for boolean tensors on CUDA.
Fixes AsyncCollectiveTensor inputs leaking into compiled regions, which could cause errors or silent data corruption in tensor-parallel compile workflows.
Fixes channels_last inputs with offsets on MPS.
Adds proper float64 handling for baddbmm on XPU.
batch_isend_irecv now works under torch.compile.
Allows eps=0 in eval mode.
Adds error checking for bmm on MPS.
Fixes NaN handling in Triton code generation to match PyTorch NaN semantics.
Fixes cholesky(upper=True) on macOS for matrices larger than the block size.
Implemented clone for semi-structured sparse tensors.
Fixes incorrect results and alignment errors for non-64-byte-aligned tensors on XPU.
Fixes numerical inconsistency for channels_last format.
Avoids routing to cuDNN SDPA when dropout probability is not a multiple of 1/16.
Fixes SDPA with zero-stride broadcast Q/K/V inputs.
Cpp wrapper now allows custom ops with Optional[List[T]] arguments.
Isolates subprocesses to address CUTLASS illegal memory access.
Fixes an error when running two forward passes of DDP-wrapped BatchNorm.
Disables proxy tensor handling to fix DeviceMesh indexing.
Supports FP8 tensors on GPUs older than SM90.
Fixes backward behavior for value-selecting reductions such as topk, sort, and min.
Fixes the sharding strategy for None indices.
Fixes precision loss in backward dtype handling.
Fixes stack dimension normalization for DTensor.
Allows valid configurations with batch-dimension-only sharding instead of rejecting them.
Fixes view_as_complex with P(max)/P(min) placements.
Supports flatten and unflatten with _StridedSharding for full nn.Linear(DTensor) compatibility.
Fixes subclass __torch_dispatch__ bypass and symbolic-shape handling.
Requesting AuxRequest(max_scores=True) with the FLASH backend now raises a clear NotImplementedError instead of a later opaque error.
Removed mixed-dtype rejection to match the documented behavior.
Fixes HSDP buffer broadcast order when modules use meta-device initialization.
Reverts a regression and brings back all-gather prefetching.
Supports dataclass args and kwargs output without memory leakage.
Allows ModuleList and ModuleDict subclasses that implement forward().
Corrected argument type hints for better type-checking consistency.
Automatically handles non-contiguous inputs instead of asserting.
MPS gather now supports complex inputs.
grad,vjp, andjvpno longer return zeros underinference_mode.Graph serialization now handles weakref objects.
Fixes a backward correctness bug on AMD wavefront-64 GPUs.
Fixes MPS behavior with noncontiguous weights.
MPS now supports index_reduce.
Fixes atomic misalignment for sub-32-bit types on MPS.
Inductor now catches Intel Triton compilation and runtime errors as IntelGPUError.
Fixes decomposition when using symbolic shapes.
Preserves scalar
item()semantics for size-1 tensors.Fixes MPS behavior with noncontiguous bias.
Inductor adds lerp decompositions for bitwise parity with eager.
Fixes noncontiguous behavior for lgamma, digamma, and polygamma on MPS.
Returns pivots on MPS.
Fixes backward for zero-dimensional inputs.
Fixes MPS handling of broadcasted bias.
Opaque-object value types are inlined into the graph consistently with Dynamo behavior.
Fixes MPS behavior for non-contiguous outputs.
Fixes side effects, aligns behavior with CPU, and preserves scalar tensor shape on MPS.
Fixes a regression involving dataclasses.replace() so storage metadata behaves correctly.
Avoids crashing for head dimensions above 192 by falling back to a CK tile.
Fixes gradient computation when inputs have different dtypes.
Added an autograd derivative for narrow_copy.
Adds a dtype check to the meta function to prevent invalid input types.
Fixes nn.Embedding module failures on XPU.
Fixes a compile crash with deterministic mode and replication padding.
MPS now has an implementation of nonzero_static.
Fixes a runtime error in
one_hot.Fixes eager and compile inconsistency when fallback_random=True.
FX graphs containing
repeat_interleaveare now runnable.No longer fails for custom ops with
List[List[Tensor]]arguments.Fixes ROCm validation that incorrectly rejected unsupported swizzle.
Fixes output shape when the value head dimension differs on MPS.
Fixes incorrect output for permuted q/k/v when B is greater than 1 on MPS.
Fixes MPS handling of noncontiguous inputs.
Passes the missing dim argument in FSDP2.
Fixes handling of multi-output intermediates in pipeline parallelism.
Fixes tied weights with uneven sharding across separate FSDP groups.
Added handlers for distributed functions.
Propagates divisibility checks to Triton tt.divisibility.
Fixes memory misalignment for torch.bmm(COO, Dense) on CUDA.
Fixes a graph break inside torch.autocast('xpu') that caused a dtype mismatch.
Fixes a performance regression for cumprod backward.
Fixes cudagraphs compatibility with the current stream.
Fixes hardcoded OpenMP thread counts.
Fixes the function returning True during torch.compile.
Preserves torch.cond ordering.
Does not fail when pynvml is installed on ROCm.
MPS now implements forward and backward operations for torch.distributions.Gamma.
Avoids a
KeyErrorwhen module FQNs contain@Nsuffixes.Export serialization now handles unused
List[Tensor]outputs.Scatter error messages for in-place operations are fixed.
Fixes broadcast failure with equal_nan=True.
Fixes
DataDependentOutputExceptionfailures during export.Fixes CUDA topk indices for inputs longer than 32-bit length.
Fixes backward for non-square matrices.
Fixes a low-precision issue with half-precision dtypes.
MPS unfold_backward now supports torch.complex64.
CPU sampling was updated to improve fp16 and bf16 results.
Fixes an ROCm SDPA build error when flash attention is disabled and memory-efficient attention is enabled.
Fixes batch rules for the
group_normbackward operator.For differentiation of a function with a real-valued loss and complex variables, PyTorch provides the conjugate Wirtinger derivative, which gives the correct optimization step.
torch 150 changes
Breaking changes 17
Indexing a 0-dimensional tensor now throws an error instead of warning; use tensor.item() instead.
Deprecated factories taking a type first and size second are removed; use new-style factories with size first and TensorOptions last.
The out parameter is now checked to be a CPU Tensor.
Removed this mode for accuracy.
Implicit conversion no longer moves a tensor to CPU; CUDA tensors may need an explicit tensor.to('cpu') call before conversion.
The reduction name elementwise_mean is renamed to mean.
Extra positional arguments are no longer accepted and ignored.
Sparse tensor indices and values shape invariants change for consistency with zero-element tensors.
Some operations between torch.Tensors and NumPy arrays now favor torch dispatch, which may change the return type.
The redesigned distributed library operates asynchronously for Gloo, NCCL, and MPI backends.
The TCP backend has been removed; use Gloo or MPI for CPU collectives and NCCL for GPU collectives.
The result type of a torch.float16 zero-dimensional tensor combined with an integer is now torch.float16.
The legacy API has been removed.
torch.masked_copy_ has been removed; use torch.masked_scatter_ instead.
Returns tensors of shape (N,) instead of (N, C), matching MultiMarginLoss; the result is also more numerically stable.
Deleted torch.utils.trainer.
Operations producing zero-element tensors now return their documented shapes instead of collapsing every result to shape (0,).
Deprecations 4
Deprecated for use in C++ extensions; no replacement is listed.
Deprecated for C++ extensions; at::Tensor now has a requires_grad method.
Deprecated for C++ extensions; at::Tensor now has a set_requires_grad method.
Deprecated in C++ extensions in favor of torch/extension.h; including it produces a warning.
New APIs and options 12
A pure C++ interface to the PyTorch backend provides equivalents to Python frontend components for high-performance C++ applications; the API is marked unstable.
A file used to publish pretrained models and their definitions to a GitHub repository for Torch Hub.
Adds CUDA array interface compatibility for numba and other CUDA projects.
Converts a dense tensor to a sparse tensor.
Adds torch.diag_embed.
All distributed collective operations gain async support.
Loads pretrained models published to a GitHub repository using a hubconf.py file.
Transforms annotated Python models into Torch Script, which can be optimized and serialized for use without Python.
Provides a way to make existing code compatible with the JIT, enabling Torch Script conversion and optimization.
Adds an operator matching numpy.roll.
Adds a sparse-gradient version of the existing function.
Added an option to preserve bitwise accuracy between gradient-checkpointed and non-checkpointed dropout.
Performance 3
Performance improved on both CPU and GPU.
Printing large Tensors is now faster.
Distributed Data Parallel receives performance improvements, especially on hosts with slower networks such as ethernet-based hosts.
Behavior and default changes 2
The Gloo backend adds CPU support for send.
Tensors with zero elements can have arbitrary dimensionality and support indexing and other torch operations.
Fixes and other changes 12
Fixed an issue with the legacy reduce parameter.
Constructors now correctly check their device argument.
Output sizes are computed using integer math.
Fixed reverse subtraction when the CUDA device is not 0.
Empty indices are now allowed.
Fixed a segmentation fault.
Fixed behavior for infinity, zero, and minus infinity norms.
Improved error handling when replacement is False and no more categories can be selected; also fixed CUDA selection of zero-probability events when replacement is True.
Improved stability of the BCE formula with pos_weight.
Fixed calculated output sizes for modules using stride and dilation.
Correctly handles 1-dimensional versus 0-dimensional tensors saved from 0.3 versions.
Fixed sum on fp16.