Skip to content

Update dependency torch to v2.14.0 - #35

Open
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/torch-2.x
Open

Update dependency torch to v2.14.0#35
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/torch-2.x

Conversation

@renovate

@renovate renovate Bot commented Jan 21, 2026

Copy link
Copy Markdown
Contributor

ℹ️ Note

This PR body was truncated due to platform limits.

This PR contains the following updates:

Package Change Age Confidence
torch ==2.9.1==2.14.0 age confidence

Release Notes

pytorch/pytorch (torch)

v2.14.0: PyTorch 2.14.0 Release

Compare Source

PyTorch 2.14.0 Release Notes

Highlights

NVGEMM brings CuTeDSL-generated CUTLASS kernels to Inductor, with epilogue fusion, scaled and NVFP4 GEMM, and grouped-reduction epilogues autotuned alongside Triton and ATen
torch.switch generalizes torch.cond to multi-way branching, and torch.while_loop can now be captured in a CUDA graph
Declarative dynamic shapes via @​dynamic_spec, shared across torch.compile, torch.export and make_fx
Experimental torch.compile support for complex-valued tensors: Opt-in support decomposes supported complex operations into real and imaginary computations, enabling compiler backends to optimize more complex-number workloads.
A new nccl2 backend for PyTorch Distributed, ported from torchcomms, implementing the full collective contract with nonblocking communicators and eager communicator splitting
Fault tolerance becomes a first-class c10d concept, with in-place process-group reconfiguration, one-sided RMA windows, and a Flight Recorder that works for any backend rather than only NCCL
Apple Silicon gains native linear algebra, including Jacobi-kernel SVD, eigh, QR and Cholesky, alongside a five-part reduction rewrite and a further MPSGraph to Metal kernel migration
Broader platform support: ROCm 7.14 wheels are produced from the TheRock pip SDK, Intel XPU adds native graph capture, and Inductor targets Rubin (sm_107)

For more details about these highlighted features, you can look at the release blogpost. Below are the full release notes for this release.

Backwards Incompatible Changes

torch.nn

  • torch.nn.LinearCrossEntropyOptions no longer accepts acc_policy="balanced"; use "compact" instead (#​188283)

    The "balanced" policy was removed because "compact" provides the same weight-gradient accumulation precision with lower memory use on CUDA, already uses the equivalent scratch layout for mixed-precision inputs on other devices, and was never selected by "auto". Constructing the options with acc_policy="balanced" now raises ValueError: invalid acc_policy: 'balanced'; expected one of 'auto', 'accurate', 'compact'.

    Before:

    options = torch.nn.LinearCrossEntropyOptions(acc_policy="balanced")
    loss = torch.nn.functional.linear_cross_entropy(
        input, linear_weight, target, options=options
    )

    After:

    options = torch.nn.LinearCrossEntropyOptions(acc_policy="compact")
    loss = torch.nn.functional.linear_cross_entropy(
        input, linear_weight, target, options=options
    )

Autograd

  • Clamp and min/max boundary subgradients now follow the selected dispatcher schema's input space (#​191142)

    This affects gradients exactly at nondifferentiable bounds or ties. A scalar clamp bound is a fixed parameter, so the input gradient at equality changes from 1 to the minimum-norm subgradient 0. A Tensor bound is part of the differentiable input space, so clamp, clamp_min, and clamp_max now split the gradient evenly between the input and bound at an ordinary tie instead of assigning it entirely to the input. fmin and fmax use the same even tie split, and forward-mode AD for the min/max family is aligned with these rules. Code that intentionally depends on the old tie-breaking behavior can express it explicitly with torch.where, such as torch.where(value >= bound, value, bound).

    Version 2.13:

    import torch
    
    x = torch.tensor(0.0, requires_grad=True)
    torch.clamp_min(x, 0.0).backward()
    print(x.grad)  # tensor(1.)
    
    value = torch.tensor(0.0, requires_grad=True)
    bound = torch.tensor(0.0, requires_grad=True)
    torch.clamp_min(value, bound).backward()
    print(value.grad, bound.grad)  # tensor(1.) tensor(0.)

    Version 2.14:

    import torch
    
    x = torch.tensor(0.0, requires_grad=True)
    torch.clamp_min(x, 0.0).backward()
    print(x.grad)  # tensor(0.)
    
    value = torch.tensor(0.0, requires_grad=True)
    bound = torch.tensor(0.0, requires_grad=True)
    torch.clamp_min(value, bound).backward()
    print(value.grad, bound.grad)  # tensor(0.5000) tensor(0.5000)

Distributed

  • Custom Python process groups that implement new_group() must now accept a backend keyword argument (#​188489)

    This applies when the default process group supplies its own new_group() method and torch.distributed.new_group() delegates subgroup creation to it. PyTorch now forwards the resolved backend so custom implementations can construct the requested subgroup correctly. Existing implementations without this parameter will raise TypeError: ... got an unexpected keyword argument 'backend'. Accept and use the argument, or accept and ignore it when the implementation has only one backend.

    Before:

    class MyProcessGroup(...):
        def new_group(
            self, ranks, *, timeout=None, pg_options=None,
            group_name=None, group_desc=None
        ):
            ...

    After:

    class MyProcessGroup(...):
        def new_group(
            self, ranks, *, timeout=None, backend=None, pg_options=None,
            group_name=None, group_desc=None
        ):
            ...
  • NCCL symmetric-memory pools no longer automatically upgrade segments allocated after register_mem_pool(..., symm=True) to symmetric windows (#​192112)

    Registering those late segments from the CUDA allocator callback could invoke a collective NCCL operation on only some ranks while holding the allocator lock, causing an unrecoverable hang. Late segments now remain ordinary registered NCCL buffers. Applications that need newly allocated segments to use symmetric-window algorithms must collectively deregister and register the pool again after those allocations are created.

    Before:

    backend.register_mem_pool(pool, symm=True)
    with torch.cuda.use_mem_pool(pool):
        tensor = torch.empty(size, device="cuda")
    # Newly allocated segments were automatically upgraded, but this could hang.

    After:

    backend.register_mem_pool(pool, symm=True)
    with torch.cuda.use_mem_pool(pool):
        tensor = torch.empty(size, device="cuda")
    
    # Collectively refresh registration after the pool grows.
    backend.deregister_mem_pool(pool)
    backend.register_mem_pool(pool, symm=True)
  • Nonmember ranks now receive GroupMember.NON_GROUP_MEMBER instead of None from experimental torch.distributed.split_group() (#​190725)

    When the calling rank is absent from every requested split, split_group() now returns the same nonmember sentinel as new_group(). Code that identifies nonmembers with is None must compare against torch.distributed.GroupMember.NON_GROUP_MEMBER instead.

    Before:

    group = torch.distributed.split_group(
        split_ranks=[[0, 1], [2, 3]]
    )
    if group is None:
        return

    After:

    group = torch.distributed.split_group(
        split_ranks=[[0, 1], [2, 3]]
    )
    if group == torch.distributed.GroupMember.NON_GROUP_MEMBER:
        return

Linear Algebra Frontend

  • Remove the deprecated torch.cholesky() and Tensor.cholesky() APIs (#​186817)

    Calls now raise a RuntimeError directing users to torch.linalg.cholesky(). The replacement returns a lower-triangular factor; callers that previously requested upper=True should take the conjugate transpose with .mH.

    Version 2.13:

    lower = torch.cholesky(a)
    upper = torch.cholesky(a, upper=True)

    Version 2.14:

    lower = torch.linalg.cholesky(a)
    upper = torch.linalg.cholesky(a).mH
  • Remove the deprecated torch.qr() and Tensor.qr() APIs (#​186815)

    Calls now raise a RuntimeError directing users to torch.linalg.qr(). Replace the Boolean some argument with mode="reduced" or mode="complete".

    Version 2.13:

    q, r = torch.qr(a)
    q_full, r_full = torch.qr(a, some=False)

    Version 2.14:

    q, r = torch.linalg.qr(a, mode="reduced")
    q_full, r_full = torch.linalg.qr(a, mode="complete")

Profiler

  • The deprecated use_cuda argument has been removed from torch.profiler.profile and torch.autograd.profiler.profile (#​192543)

    Passing use_cuda to either profiler now raises TypeError: profile.__init__() got an unexpected keyword argument 'use_cuda'. Select CUDA explicitly through activities when using torch.profiler.profile, or use use_device="cuda" with torch.autograd.profiler.profile.

    Version 2.13:

    with torch.profiler.profile(use_cuda=True) as prof:
        run_workload()
    
    with torch.autograd.profiler.profile(use_cuda=True) as prof:
        run_workload()

    Version 2.14:

    with torch.profiler.profile(
        activities=[
            torch.profiler.ProfilerActivity.CPU,
            torch.profiler.ProfilerActivity.CUDA,
        ]
    ) as prof:
        run_workload()
    
    with torch.autograd.profiler.profile(use_device="cuda") as prof:
        run_workload()

Dynamo

  • The tvm backend now uses TVM's relax frontend exclusively; the relay path has been removed (#​190766, #​189639)

    Relay was removed in TVM 0.20, so the backend now requires a TVM providing tvm.relax.frontend.torch. Two things are gone with it: the relay-only scheduler / trials options, replaced by a TVM pipeline passed as options={"pipeline": ...}; and the tvm_meta_schedule / tvm_auto_scheduler backend entry points, which no longer exist in torch._dynamo.backends.tvm. With an older TVM installed, torch.compile(..., backend="tvm") now raises ImportError: Please install apache-tvm to use the tvm backend.

    Version 2.13:

    opt = torch.compile(model, backend="tvm", options={"scheduler": "meta_schedule", "trials": 20000})
    
    # or through the relay-only entry points
    from torch._dynamo.backends.tvm import tvm_meta_schedule, tvm_auto_scheduler

    Version 2.14:

    import tvm
    
    pipeline = tvm.relax.get_pipeline("static_shape_tuning", target="llvm", total_trials=2000)
    opt = torch.compile(model, backend="tvm", options={"pipeline": pipeline})
    
    # tvm_meta_schedule / tvm_auto_scheduler no longer exist:
    # ImportError: cannot import name 'tvm_meta_schedule'

C++ Frontend

  • Remove the deprecated zero-argument C++ overloads c10::Scalar::isIntegral() and c10::isIntegralType(ScalarType) (#​187115)

    Code that calls either overload without specifying whether Boolean values count as integral will no longer compile. Pass includeBool explicitly; use false to preserve the removed overloads' behavior.

    Version 2.13:

    bool scalar_is_integer = scalar.isIntegral();
    bool dtype_is_integer = c10::isIntegralType(dtype);

    Version 2.14:

    bool scalar_is_integer = scalar.isIntegral(/*includeBool=*/false);
    bool dtype_is_integer =
        c10::isIntegralType(dtype, /*includeBool=*/false);

Release Engineering

  • setup.py is now a deprecation shim; build PyTorch through pip or python -m build (#​180248)

    setup.py is now a thin shim. install and develop still forward to pip, but
    build, bdist_wheel, clean, sdist and the rest print the replacement
    command instead of falling through to setuptools. Builds that already go through
    a PEP 517 frontend are unaffected, since pip and python -m build never ran
    setup.py. The shim prints the schedule: install/develop keep forwarding
    through 2.15, every command stops working in 2.16, and setup.py is removed
    in 2.18.

    Version 2.13:

    python setup.py bdist_wheel

    Version 2.14:

    python -m build --wheel --no-isolation

MPS

  • The C++ MPS macOS-version helper and its enum members have been renamed (#​188645)

    Downstream C++ code that includes <ATen/mps/MPSDevice.h> must replace the exported at::mps::is_macos_13_or_newer() function with at::mps::is_macos_at_least(). The associated MacOSVersion members also drop the VER and PLUS portions of their names. No compatibility aliases are provided, so code using the old names will no longer compile.

    Version 2.13:

    const bool supported = at::mps::is_macos_13_or_newer(
        at::mps::MacOSVersion::MACOS_VER_15_0_PLUS);

    Version 2.14:

    const bool supported = at::mps::is_macos_at_least(
        at::mps::MacOSVersion::MACOS_15_0);

Complex Frontend

  • Complex type promotion for bfloat16 now uses the new torch.bcomplex32 shell dtype instead of torch.complex64 (#​186928)

    torch.bcomplex32 stores real and imaginary components as bfloat16. Operations that combine a bfloat16 tensor with a complex scalar or otherwise request its corresponding complex type can therefore produce bcomplex32 instead of complex64. Because bcomplex32 is a shell dtype with limited operator support, an operation that previously ran in complex64 may now raise a not-implemented error. Explicitly cast to complex64 when the previous precision or operator coverage is required.

    Version 2.13:

    x = torch.ones(4, dtype=torch.bfloat16)
    assert torch.result_type(x, 1j) == torch.complex64

    Version 2.14:

    x = torch.ones(4, dtype=torch.bfloat16)
    assert torch.result_type(x, 1j) == torch.bcomplex32
    
    # Preserve the previous complex64 behavior explicitly.
    y = x.to(torch.complex64) + 1j

Deprecations

Autograd

  • Selective activation checkpointing will change to honor surrounding saved_tensors_hooks by default; use the new respect_saved_tensors_hooks argument to choose the behavior explicitly (#​190581)

    The current default, None, preserves the legacy behavior in which tensors retained by selective activation checkpointing bypass user hooks, but now emits a FutureWarning when hooks are active. Pass True to opt into the future behavior or False to preserve the legacy behavior without a warning. This option requires use_reentrant=False.

    Before:

    with torch.autograd.graph.saved_tensors_hooks(pack, unpack):
        output = torch.utils.checkpoint.checkpoint(
            function,
            input,
            use_reentrant=False,
            context_fn=sac_context_fn,
        )

    After:

    with torch.autograd.graph.saved_tensors_hooks(pack, unpack):
        output = torch.utils.checkpoint.checkpoint(
            function,
            input,
            use_reentrant=False,
            context_fn=sac_context_fn,
            respect_saved_tensors_hooks=True,
        )

Distributed

  • Use torch.compiler.config.compile_on_one_rank instead of torch.distributed.config.compile_on_one_rank (#​187869)

    The distributed spelling remains as a forwarding alias but now emits a FutureWarning. The preferred environment variable is also TORCH_COMPILE_ON_ONE_RANK; the older TORCH_DISTRIBUTED_COMPILE_ON_ONE_RANK remains supported for compatibility.

    Before:

    import torch.distributed.config
    torch.distributed.config.compile_on_one_rank = True

    After:

    import torch.compiler.config
    torch.compiler.config.compile_on_one_rank = True

Profiler

  • The experimental profiler_metrics and profiler_measure_per_kernel options no longer enable CUPTI range profiling and now emit a FutureWarning when set to a non-default value (#​187204)

    Kineto no longer supports this range-profiler path on PyTorch's supported CUDA versions. The arguments remain accepted temporarily for compatibility, but they are ignored and have no direct replacement.

    Before:

    config = torch.profiler._ExperimentalConfig(
        profiler_metrics=["sm__cycles_elapsed.avg"],
        profiler_measure_per_kernel=True,
    )

    After:

    config = torch.profiler._ExperimentalConfig()
  • The with_modules profiler option is deprecated and now emits a FutureWarning (#​192808)

    with_modules=True only collected module hierarchy for TorchScript models and did nothing in eager mode. For eager models, use with_stack=True to record nn.Module events.

    Before:

    with torch.profiler.profile(with_modules=True) as prof:
        run_workload()

    After:

    with torch.profiler.profile(with_stack=True) as prof:
        run_workload()

Dynamo

  • torch._dynamo.config.enable_faithful_generator_behavior is deprecated and is now a no-op (#​189894)

    Faithful (lazy) generator tracing has been the default and is the only supported behavior, so the dead eager-exhaustion path was removed. The config is kept as a deprecated setting that always behaves as True, so setting it does not error but no longer changes anything.

    Version 2.13:

    # generators were eagerly exhausted on first execution
    with torch._dynamo.config.patch(enable_faithful_generator_behavior=False):
        torch.compile(fn)(x)

    Version 2.14:

    # the flag is ignored; generators are always traced lazily
    torch.compile(fn)(x)

CUDA

  • Deprecate CUDAGraph.register_generator_state(); CUDA graphs now register generator state lazily on first RNG use during capture (#​176753)

    The method is now a no-op and emits a deprecation warning. Remove explicit registration calls; the graph automatically retains the required state when the generator is used during capture.

    Before:

    graph = torch.cuda.CUDAGraph()
    state = generator.graphsafe_get_state()
    graph.register_generator_state(state)
    
    with torch.cuda.graph(graph):
        generator.graphsafe_set_state(state)
        output = torch.rand(16, device="cuda", generator=generator)

    After:

    graph = torch.cuda.CUDAGraph()
    state = generator.graphsafe_get_state()
    
    with torch.cuda.graph(graph):
        generator.graphsafe_set_state(state)
        output = torch.rand(16, device="cuda", generator=generator)
  • Deprecate GreenContext.set_context() and GreenContext.pop_context(); use custom streams to activate a green context instead (#​188419)

    These methods now emit a FutureWarning. Create a stream from the green context and use it with torch.cuda.stream() instead. Synchronization with streams outside the green context remains the caller's responsibility and should use CUDA events when needed.

    Before:

    ctx = torch.cuda.green_contexts.GreenContext(num_sms=1)
    ctx.set_context()
    try:
        output = model(input)
    finally:
        ctx.pop_context()

    After:

    ctx = torch.cuda.green_contexts.GreenContext(num_sms=1)
    stream = ctx.Stream()
    with torch.cuda.stream(stream):
        output = model(input)

JIT

  • TorchScript APIs now emit visible FutureWarnings instead of normally hidden DeprecationWarnings (#​189914)

    Calls such as torch.jit.script, torch.jit.trace, torch.jit.save, and torch.jit.load now visibly direct users toward torch.compile or torch.export. Imports of torch.utils.mkldnn, torch.fx.experimental.optimization, and torch.distributed.optim also avoid eagerly compiling TorchScript when those modules are merely imported.

    Before:

    scripted = torch.jit.script(model)
    torch.jit.save(scripted, "model.pt")

    After:

    exported = torch.export.export(model, example_inputs)
    torch.export.save(exported, "model.pt2")

New Features

Python Frontend

  • Add torch.accelerator.initial_seed(), torch.accelerator.get_rng_state(), and torch.accelerator.get_rng_state_all() for backend-agnostic accelerator RNG inspection (#​186597)
  • Add read-only DLPack export through Tensor.__dlpack__(read_only=True) and torch.utils.dlpack.ReadOnlyTensorWrapper, including copy-on-write-preserving exchange with compatible consumers (#​188554)
  • Add torch.Generator.philox_state() so Python-authored kernels can reserve Philox counter ranges that remain correct across CUDA Graph capture and replay (#​191019)

Autograd

  • torch.utils.checkpoint.checkpoint() can now be called without a function to create an eager-mode decorator with checkpoint configuration separated from the wrapped function's arguments (#​189411)

    checkpointed_function = torch.utils.checkpoint.checkpoint(
        use_reentrant=False
    )(function)
    output = checkpointed_function(*args, **kwargs)

    The curried form is initially supported in eager mode; existing direct calls remain the compatible form under torch.compile.

  • Add torch.autograd.graph.node_creation_hook, a thread-local context manager whose callback receives every fully populated autograd graph node created within its scope. The callback can inspect nodes, store metadata, or register backward pre-hooks and post-hooks, including for nodes created during higher-order differentiation and checkpoint recomputation (#​189284)

  • Add ctx.set_output_grad_dtype(*dtypes) for custom torch.autograd.Function implementations. Called once from forward or setup_context, it declares the gradient dtype expected for each output independently of the output's storage dtype; a concrete dtype converts incoming gradients, while None leaves their dtype unchanged (#​189634)

  • Add second-order gradient support for torch.cdist and torch.nn.functional.pdist, so grad-grad computations no longer fail because _cdist_backward or _pdist_backward lacks a derivative (#​188901)

Distributed

  • Add portable JSON serialization through DebugMode.save_logs() and DebugMode.load_logs() so distributed execution logs can be compared across separate processes or model configurations (#​185010)
  • Add the public torch.distributed.set_timeout() API; the private _set_pg_timeout() alias remains available with a deprecation warning (#​187387)
  • Add torch.distributed.tensor.logspace for constructing distributed logarithmically spaced tensors (#​186398)
  • Add experimental torch.distributed.get_backend_impl() and ProcessGroup.get_backend() accessors for custom backend development (#​187494)
  • Add torch.distributed.tensor.linspace for constructing distributed linearly spaced tensors (#​187933)
  • Add fault-tolerant reconfiguration and one-sided window operations to the experimental nccl2 backend (#​189359, #​189360)
  • Add the experimental nccl-lazy backend, which creates per-peer NCCL point-to-point communicators on demand (#​189362)
  • Add the CheckpointableTensor protocol so distributed checkpointing can save and load torch.Tensor objects exposing global_shape, global_offsets, local_offsets, and local_sizes metadata (#​189492)
  • Add an explicit nccl-legacy backend and the TORCH_DIST_USE_NCCL2=1 opt-in for selecting the experimental replacement behind the nccl name (#​191272)
  • Allow ProcessGroupNCCL.Options.config.comm_name to assign readable communicator names for NCCL logs and profiler tools (#​191001)
  • Add torchrun --log-line-prefix-template and a ${hostname} template variable for identifying the host that emitted each worker log line (#​191265)
  • Allow pipeline schedules to consume explicitly pre-split positional inputs, keyword inputs, and targets through arg_mbs, kwarg_mbs, and target_mbs (#​188500)
  • Add optional shell-completion generation to torchrun through --print-completion and the shtab package (#​191289)

Symmetric Memory

  • Add XPU support for symmetric-memory operations used by asynchronous tensor parallelism, enabling communication/computation overlap on Intel GPUs (#​185102)

Linear Algebra Frontend

  • Add torch.linalg.polar() for computing A = U @ H for matrices with at least as many rows as columns, using a portable SVD implementation and cuSOLVER QDWH acceleration for eligible CUDA inputs (#​185837)
  • Add torch.linalg.matrix_sqrth for computing the principal square root of symmetric or Hermitian positive-definite matrices, with support for batched inputs, autograd, vmap, and torch.compile (#​187987)
  • Add CUDA cuBLASLt support to TunableOp, including controls for the number of heuristic candidates through torch.cuda.tunable.set_cublaslt_requested_algo_count() and PYTORCH_TUNABLEOP_CUBLASLT_REQUESTED_ALGO_COUNT (#​186270)

Profiler

  • Memory snapshots can now include CPU pinned-memory allocations by passing record_pinned_host_memory=True to torch.cuda.memory._record_memory_history() (#​182407)

    Pinned-memory allocator state and history are available in the snapshot's host_segments and host_traces fields. Pass record_cuda=False to record only pinned host memory; the web memory visualizer does not yet display host-memory data.

  • Profiler events now expose Kineto metadata as typed values through FunctionEvent.metadata when expose_kineto_event_metadata=True is enabled (#​191756)

    The new dictionary avoids reparsing JSON strings and automatically includes metadata fields supported by the active profiler backend.

Dynamo

  • Add torch.compiler.nonstrict_trace as a public API (#​187737)
  • Add the prototype switch higher-order op, which selects between N branches by index and mirrors jax.lax.switch. It is available as from torch._higher_order_ops.switch import switch and lowers to torch.ops.higher_order.switch; autograd is not yet supported (#​182902, #​188374, #​189028)
  • Declare dynamic shapes explicitly with ShapesSpec / ParamsSpec, now accepted by strict and non-strict torch.export.export, make_fx(tracing_mode="fake"), and torch.compile through a shared dynamic_shapes= keyword (#​185982, #​186751, #​187602, #​187010)
  • Support Dynamo and AOTAutograd tracing of permitted input mutations in the prototype scan, map, and switch higher-order ops when gradients are disabled; Inductor lowering for these mutations is not yet supported (#​186474, #​187568, #​188903)
  • Support torch.cuda.use_mem_pool inside a compiled region, so allocations in the context - including fallback and extern kernels - are routed to the pool (#​185057)
  • Support calls to logging.Logger methods that are explicitly registered in torch._dynamo.config.reorderable_logging_functions, so supported positional-argument logging calls run after the compiled region instead of causing graph breaks (#​190840)

Inductor

  • Add NVGEMM epilogue fusion so supported pointwise operations and output casts can be fused into autotuned matrix multiplications (#​186183)
  • Add NVGEMM autotuning support for torch.addmm, including fused bias and supported pointwise epilogues (#​189774)
  • Support FlexAttention FLASH-backend backward graphs that differentiate through the returned log-sum-exp output (#​189784)
  • Add an opt-in torch._inductor.config.reorder_for_locality_in_training setting for applying locality-based graph reordering to training graphs (#​186643)
  • Add opt-in CUDA Graph Trees generation cloning through torch._inductor.config.triton.cudagraph_trees_generation_cloning = "user_visible", preserving live user-visible outputs across generations (#​188078)
  • Add bfloat16 support to torch.fft operations and torch.stft on CUDA and add float16/bfloat16 support on XPU. Native CUDA bfloat16 cuFFT execution requires SM80 or newer and power-of-two transform sizes; unsupported CUDA and XPU cases promote to float32. CPU FFT continues to reject these low-precision dtypes (#​180766)
  • Add the opt-in autotuning_inputs log artifact, enabled with TORCH_LOGS=autotuning_inputs, to report Triton autotuning input shapes, dtypes, strides, and scalar values (#​184399)
  • Add Inductor support for the prototype switch control-flow operator on CPU and GPU, including dynamic shapes, multiple outputs, and AOTInductor; CUDA graphs remain unsupported for graphs containing switch (#​188976)
  • Add dynamic-shape support to torch.compiler.precompile for dimensions marked with torch._dynamo.decorators.mark_unbacked, allowing one artifact to serve multiple runtime sizes without guarding on the marked dimension (#​189165)
  • Add torch.compiler.cudagraph_mark_warmup_incomplete() so code can request another CUDA Graph Trees warmup iteration (#​191386)

Ahead-Of-Time Inductor (AOTI)

  • Add AOTInductorModelContainerCreateWithExternalConstants, allowing callers to construct an AOTInductor model container from caller-owned weight tensors for zero-copy sharing such as CUDA IPC (#​188643)

    The new C API skips loading constants from the package and leaves ownership with the caller. Existing model-container creation and constant-loading paths are unchanged unless external constants are explicitly provided.

  • Support explicit user-defined streams in the AOTInductor C++ wrapper. A compiled region that selects a stream with torch.cuda.stream(...) now emits stream-guard code so its kernels run on the requested stream, instead of always running on the default stream (#​182971)

Export

  • Add the torch.fx.experimental.dynamic_spec.dynamic_spec decorator for attaching a dynamic-shape specification to a function or nn.Module.forward. torch.compile, torch.export.export, and make_fx automatically use the attached specification; passing a conflicting call-site specification raises an error (#​187639)

Composability

  • Add a length argument to the prototype torch._higher_order_ops.scan, allowing a scan to run for a fixed number of steps when xs=None, matching the corresponding jax.lax.scan usage pattern (#​188349)
  • Add grouped-query attention to the CUDA memory-efficient backend for torch.nn.functional.scaled_dot_product_attention, including native grouped key/value heads, implicit multi-query attention broadcasting, and backward support under vmap (#​191085)

C++ Frontend

  • Add torch::stable::tensor_from_pyobject and torch::stable::tensor_to_pyobject for converting between Python torch.Tensor objects and torch::stable::Tensor (#​183323)
  • Move the c10/util/complex_utils.h helpers and the ATen/NumericUtils.h _isinf and _isnan implementations into the header-only ABI (#​192552, #​192557)
  • Add stable-ABI torch::stable::permute and the dtype overload of torch::stable::view (#​192083)
  • Add stable-ABI torch::stable::Tensor overloads for bitwise_and, bitwise_or, bitwise_left_shift, bitwise_right_shift, index_select, floor_divide, and is_pinned (#​191973, #​192097)
  • Add torch::stable::Tensor::has_storage() (#​189877)

Release Engineering

  • Expand Python 3.15 and free-threaded (no-GIL) Python 3.15t binary coverage to Windows and macOS, completing support across the PyTorch release matrix (#​189722, #​190360, #​190361, #​186033)

    PyTorch 2.14 publishes Python 3.15 and 3.15t wheels for Linux on x86-64 and aarch64, Windows x86-64, and macOS on Apple silicon, covering the applicable CPU, CUDA, ROCm, and XPU builds. torchvision 0.29.0 publishes matching Python 3.15 and 3.15t wheels for the same supported platform and accelerator combinations. This is binary and eager-runtime support; torch.compile remains unsupported on Python 3.15 in this release.

CUDA

  • Add a cuBLASLt backend for grouped GEMM on Hopper and Blackwell GPUs with CUDA 13.3 or newer (#​177037, #​190372)

    The backend supports float16 and bfloat16, works with torch.compile and CUDA Graphs, and is selected by default for eligible float16 workloads. Set torch.backends.cuda.matmul.prefer_cublaslt_grouped_gemm = True to opt into it for bfloat16. Matrices and leading dimensions must be 16-byte aligned, so some shapes may require padding and slicing.

  • Add torch.cuda.memory._annotate_tensor() for attaching metadata to a live CUDA tensor allocation after it is created (#​190575)

    Each annotation is recorded as a timestamped memory-history event, multiple annotations accumulate without replacing allocation-time metadata, and memory snapshot tools display the annotations alongside the affected allocation. Memory history must be enabled with torch.cuda.memory._record_memory_history() for annotations to be observable. Only the native CUDA caching allocator supports annotations.

  • Add the public torch.cuda.graph_annotations module (#​189417)

  • Annotate backward kernels in mark_kernels via node_creation_hook (#​191563)

  • Allow multiple memory pools in a single CUDAGraph (#​187929)

  • Add CUDA graph support for torch.while_loop (#​186055)

  • Add destroy callbacks and object retention to torch.cuda.CUDAGraph (#​190582)

  • Add replay start/end hooks to torch.cuda.CUDAGraph (#​190602)

  • Add global CUDA graph capture-start/end and replay-start/end hooks, plus torch.cuda.CUDAGraph.register_capture_start_hook() (#​192162)

cuDNN

  • Add cuDNN SDPA support for head dimension 256 on SM90 and SM10.x GPUs with cuDNN newer than 9.22 and cuDNN Frontend 1.24 or newer; backward currently supports only (d_qk, d_v) = (256, 256) (#​185553)

MPS

  • Add native MPS support for binomial sampling (#​187078)
  • Add MPS forward and backward support for torch.nn.functional.ctc_loss (#​187716, #​188187)
  • Add MPS support for torch.linalg.matrix_exp, including complex inputs, on macOS 15 or newer (#​188954)
  • Add native MPS Poisson sampling, eliminating its CPU fallback (#​173319)
  • Add native float32 and complex64 MPS implementations of torch.linalg.svd, svdvals, eigh, eigvalsh, and lstsq, while retaining CPU fallbacks for small matrices and matrices that exceed threadgroup memory (#​185954)

ROCm

  • Add initial, technology-preview support for AMD gfx1250; CK SDPA/GEMM, FP8 grouped GEMM, and int4 matrix multiplication remain unsupported (#​187548, #​188597, #​188612)
  • Enable hipFile on Linux with ROCm 7.14 or newer (#​191069, #​192803)

XPU

  • Add FP8 blockwise scaling support for MXFP8/MXFP4/NVFP4 recipes to torch._scaled_mm and torch._scaled_mm_v2 on XPU (#​181726, #​181727, #​187315)
  • Add XPU Graph native recording mode on non-PVC devices when PyTorch is built with oneAPI 2026.1 or newer (#​188874)
  • Add torch.xpu.list_gpu_processes to query per-process GPU memory usage on XPU (#​185192)

Improvements

Python Frontend

  • Allow torch.quantile and torch.nanquantile to process float32 and float64 inputs larger than 2**24 elements on devices with float64 support by computing ranks in float64 (#​187574)

torch.nn

  • Allow the chunked path of torch.nn.functional.linear_cross_entropy to handle probability targets for reduction="mean" and reduction="sum" when the target dtype matches the input and the target does not require gradients (#​187053)
  • Improve static typing for torch.nn.Sequential indexing so integer keys resolve to Module and slices resolve to Sequential (#​187758)
  • Add the documented memory_format overload to torch.nn.Module.to() so static type checkers accept calls such as module.to(memory_format=torch.channels_last) (#​185117)

Optimizer

  • Add the "spectral_unclamped" scaling option to the adjust_lr_fn parameter of torch.optim.Muon (#​187402)
  • Add a maximize parameter to torch.optim.LBFGS (#​187309)
  • Make torch.optim.LBFGS.step() a no-op for an empty parameter group (#​191666)

Distributed

  • Expand DTensor sharding strategies for matrix, attention, sorting, scanning, softmax, and related operations (#​186667, #​179068)
  • Allow custom Python ProcessGroup implementations to use batch_isend_irecv and the coalescing manager (#​186964)
  • Improve the Flight Recorder diagnostic emitted when a TCPStore check fails (#​187191)
  • Allow pipeline parallel stages to use separate forward and backward point-to-point communicators, reducing cross-batch ordering hazards (#​186173)
  • Add fault-tolerant reconfiguration support to Gloo process groups (#​187381)
  • Make compile-on-one-rank graphs portable across ranks by replacing baked accelerator device indices with a runtime current-device operation (#​186892)
  • Expand active DTensor single-dimension strategies for tensor operations (#​186754)
  • Auto-qualify bare backend names and pass process-group options through custom TorchComms backend creation (#​187856)
  • Add complete collective coverage to custom Python process groups, including single-tensor gather/scatter and the remaining point-to-point and collective operations (#​188548, #​188570)
  • Make TorchElastic NUMA binding and ShardedTensor device transfers work with accelerator backends beyond CUDA (#​185266, #​187939)
  • Use generic collective coalescing when aborting process groups so third-party backends can avoid multi-communicator teardown deadlocks (#​189770)
  • Mark CUDA symmetric-memory allocations as GPUDirect RDMA capable on supported systems (#​189941)
  • Add communicator memory suspend/resume support to the experimental nccl2 backend (#​189361)
  • Allow unknown device-qualified TorchComms backend names to register as custom backends without requiring manual changes to internal backend maps (#​191034)
  • Add eager split_group support, complete Work semantics, nonblocking communicators, and uneven list collectives to the experimental nccl2 backend (#​190943, #​191517, #​191528, #​191542)
  • Include nccl-lazy pair communicators in error reporting, suspend/resume operations, and memory statistics, and expand its shared backend coverage (#​191553, #​191556)
  • Add memory-pool registration and deregistration support to the experimental nccl2 backend (#​192108)
  • Add per-process-group collective sequence numbers and accurate split-group membership metadata to nccl2 profiler traces (#​192114, #​192115)
  • Support non-overlapping final-spatial-dimension DTensor sharding for Conv1d, Conv2d, and Conv3d forward and backward (#​192147)
  • Pass process-group descriptions and names to NCCL's commName field while preserving user-specified communicator names (#​192487)
  • Support DTensor redistribution from final-dimension sharding to Partial("sum") (#​191828)

Distributed (c10d)

  • Upgrade NCCL to 2.30.7 for CUDA 13.0 and CUDA 13.2 builds (#​187528)
  • Enable Inductor's simple_overlap scheduler pass by default for compiled distributed workloads, moving collective starts earlier and waits later without reordering collectives or increasing peak memory (#​184235, #​184240)

Linear Algebra Frontend

  • Add backward support for torch.linalg.polar on CPU, CUDA, and MPS (#​189732)
  • Enable torch.linalg.eig on ROCm 7.14 or newer through hipSOLVER's generic Xgeev API, and update generated linear-algebra tests to recognize hipSOLVER implementations that do not require MAGMA (#​188720)
  • Allow torch.backends.cuda.preferred_blas_library("ck") to select the CK GEMM backend on ROCm gfx90a devices by separating GEMM support from CK attention support (#​187267)
  • Expand ROCm backend coverage for torch.linalg.eig, torch.linalg.ldl_solve, torch.linalg.solve, and torch.linalg.solve_triangular through hipSOLVER and hipBLAS paths (#​185557)

Profiler

  • Record XPU profiler overhead as OVERHEAD activities, making collection costs visible on a dedicated track in exported traces (#​187835)

FX

  • Allow split_const_subgraphs() callers to supply an is_impure_node callback so destination-passing operations and other side-effecting nodes are preserved during dead-code elimination (#​190716)
  • Make get_source_partitions() return input nodes, output nodes, and parameters in deterministic graph order (#​188965)

Dynamo

Note

PR body was truncated to here.


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate
renovate Bot force-pushed the renovate/torch-2.x branch from 79bb96d to 8a80e22 Compare March 23, 2026 22:08
@renovate renovate Bot changed the title Update dependency torch to v2.10.0 Update dependency torch to v2.11.0 Mar 23, 2026
@renovate
renovate Bot force-pushed the renovate/torch-2.x branch from 8a80e22 to 6f9c396 Compare May 13, 2026 14:54
@renovate renovate Bot changed the title Update dependency torch to v2.11.0 Update dependency torch to v2.12.0 May 13, 2026
@renovate
renovate Bot force-pushed the renovate/torch-2.x branch from 6f9c396 to 6c384de Compare June 18, 2026 00:49
@renovate renovate Bot changed the title Update dependency torch to v2.12.0 Update dependency torch to v2.12.1 Jun 18, 2026
@renovate
renovate Bot force-pushed the renovate/torch-2.x branch from 6c384de to 3b53041 Compare July 8, 2026 20:46
@renovate renovate Bot changed the title Update dependency torch to v2.12.1 Update dependency torch to v2.13.0 Jul 8, 2026
@renovate
renovate Bot force-pushed the renovate/torch-2.x branch from 3b53041 to e5bd77a Compare September 3, 2026 01:15
@renovate renovate Bot changed the title Update dependency torch to v2.13.0 Update dependency torch to v2.14.0 Sep 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants