# pytorch/pytorch v2.14.0: PyTorch 2.14.0 Release — retained record

> Retained github record from github:pytorch/pytorch.

Canonical: https://highsignal.app/data/records/d479f417b6e3ff26

[← sources](https://highsignal.app/data)


source: [github](https://highsignal.app/data/github) (github:pytorch/pytorch)  published 2026-09-02 17:40 ingested 2026-09-03 02:34

[original source ↗](https://github.com/pytorch/pytorch/releases/tag/v2.14.0)

## extract

# PyTorch 2.14.0 Release Notes

- [Highlights](https://highsignal.app/data/records/d479f417b6e3ff26#highlights)
- [Backwards Incompatible Changes](https://highsignal.app/data/records/d479f417b6e3ff26#backwards-incompatible-changes)
- [Deprecations](https://highsignal.app/data/records/d479f417b6e3ff26#deprecations)
- [New Features](https://highsignal.app/data/records/d479f417b6e3ff26#new-features)
- [Improvements](https://highsignal.app/data/records/d479f417b6e3ff26#improvements)
- [Bug fixes](https://highsignal.app/data/records/d479f417b6e3ff26#bug-fixes)
- [Performance](https://highsignal.app/data/records/d479f417b6e3ff26#performance)
- [Documentation](https://highsignal.app/data/records/d479f417b6e3ff26#documentation)
- [Security](https://highsignal.app/data/records/d479f417b6e3ff26#security)
- [Developers](https://highsignal.app/data/records/d479f417b6e3ff26#developers)

# Highlights

<table>
  <tr><td><strong>NVGEMM</strong> brings CuTeDSL-generated CUTLASS kernels to Inductor, with epilogue fusion, scaled and NVFP4 GEMM, and grouped-reduction epilogues autotuned alongside Triton and ATen</td></tr>
  <tr><td><strong><code>torch.switch</code></strong> generalizes <code>torch.cond</code> to multi-way branching, and <code>torch.while_loop</code> can now be captured in a CUDA graph</td></tr>
  <tr><td><strong>Declarative dynamic shapes via <code>@dynamic_spec</code></strong>, shared across <code>torch.compile</code>, <code>torch.export</code> and <code>make_fx</code></td></tr>
  <tr><td><strong>Experimental <code>torch.compile</code> support for complex-valued tensors</strong>: Opt-in support decomposes supported complex operations into real and imaginary computations, enabling compiler backends to optimize more complex-number workloads.</td></tr>
  <tr><td><strong>A new <code>nccl2</code> backend for PyTorch Distributed</strong>, ported from torchcomms, implementing the full collective contract with nonblocking communicators and eager communicator splitting</td></tr>
  <tr><td><strong>Fault tolerance becomes a first-class <code>c10d</code> concept</strong>, with in-place process-group reconfiguration, one-sided RMA windows, and a Flight Recorder that works for any backend rather than only NCCL</td></tr>
  <tr><td><strong>Apple Silicon gains native linear algebra</strong>, including Jacobi-kernel SVD, <code>eigh</code>, QR and Cholesky, alongside a five-part reduction rewrite and a further MPSGraph to Metal kernel migration</td></tr>
  <tr><td><strong>Broader platform support</strong>: ROCm 7.14 wheels are produced from the TheRock pip SDK, Intel XPU adds native graph capture, and Inductor targets Rubin (<code>sm_107</code>)</td></tr>
</table>

For more details about these highlighted features, you can look at the release blogpost. Below are the full release notes for this release.

# 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:

  ```python
  options = torch.nn.LinearCrossEntropyOptions(acc_policy="balanced")
  loss = torch.nn.functional.linear_cross_entropy(
      input, linear_weight, target, options=options
  )
  ```

  After:

  ```python
  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:
  ```python
  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:
  ```python
  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:

  ```python
  class MyProcessGroup(...):
      def new_group(
          self, ranks, *, timeout=None, pg_options=None,
          group_name=None, group_desc=None
      ):
          ...
  ```

  After:

  ```python
  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:

  ```python
  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:

  ```python
  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:

  ```python
  group = torch.distributed.split_group(
      split_ranks=[[0, 1], [2, 3]]
  )
  if group is None:
      return
  ```

  After:

  ```python
  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:

  ```python
  lower = torch.cholesky(a)
  upper = torch.cholesky(a, upper=True)
  ```

  Version 2.14:

  ```python
  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:

  ```python
  q, r = torch.qr(a)
  q_full, r_full = torch.qr(a, some=False)
  ```

  Version 2.14:

  ```python
  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:

  ```python
  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:

  ```python
  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:
  ```python
  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:
  ```python
  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:

  ```cpp
  bool scalar_is_integer = scalar.isIntegral();
  bool dtype_is_integer = c10::isIntegralType(dtype);
  ```

  Version 2.14:

  ```cpp
  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:
  ```bash
  python setup.py bdist_wheel
  ```

  Version 2.14:
  ```bash
  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:

  ```cpp
  const bool supported = at::mps::is_macos_13_or_newer(
      at::mps::MacOSVersion::MACOS_VER_15_0_PLUS);
  ```

  Version 2.14:

  ```cpp
  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:

  ```python
  x = torch.ones(4, dtype=torch.bfloat16)
  assert torch.result_type(x, 1j) == torch.complex64
  ```

  Version 2.14:

  ```python
  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:

  ```python
  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:

  ```python
  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:

  ```python
  import torch.distributed.config
  torch.distributed.config.compile_on_one_rank = True
  ```

  After:

  ```python
  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:

  ```python
  config = torch.profiler._ExperimentalConfig(
      profiler_metrics=["sm__cycles_elapsed.avg"],
      profiler_measure_per_kernel=True,
  )
  ```

  After:

  ```python
  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:

  ```python
  with torch.profiler.profile(with_modules=True) as prof:
      run_workload()
  ```

  After:

  ```python
  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:
  ```python
  # generators were eagerly exhausted on first execution
  with torch._dynamo.config.patch(enable_faithful_generator_behavior=False):
      torch.compile(fn)(x)
  ```

  Version 2.14:
  ```python
  # 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:

  ```python
  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:

  ```python
  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:

  ```python
  ctx = torch.cuda.green_contexts.GreenContext(num_sms=1)
  ctx.set_context()
  try:
      output = model(input)
  finally:
      ctx.pop_context()
  ```

  After:

  ```python
  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 `FutureWarning`s instead of normally hidden `DeprecationWarning`s (#189914)

  Calls such as `torch.jit.s

## retained text (truncated)



```
# PyTorch 2.14.0 Release Notes

- [Highlights](#highlights)
- [Backwards Incompatible Changes](#backwards-incompatible-changes)
- [Deprecations](#deprecations)
- [New Features](#new-features)
- [Improvements](#improvements)
- [Bug fixes](#bug-fixes)
- [Performance](#performance)
- [Documentation](#documentation)
- [Security](#security)
- [Developers](#developers)

# Highlights

<table>
  <tr><td><strong>NVGEMM</strong> brings CuTeDSL-generated CUTLASS kernels to Inductor, with epilogue fusion, scaled and NVFP4 GEMM, and grouped-reduction epilogues autotuned alongside Triton and ATen</td></tr>
  <tr><td><strong><code>torch.switch</code></strong> generalizes <code>torch.cond</code> to multi-way branching, and <code>torch.while_loop</code> can now be captured in a CUDA graph</td></tr>
  <tr><td><strong>Declarative dynamic shapes via <code>@dynamic_spec</code></strong>, shared across <code>torch.compile</code>, <code>torch.export</code> and <code>make_fx</code></td></tr>
  <tr><td><strong>Experimental <code>torch.compile</code> support for complex-valued tensors</strong>: Opt-in support decomposes supported complex operations into real and imaginary computations, enabling compiler backends to optimize more complex-number workloads.</td></tr>
  <tr><td><strong>A new <code>nccl2</code> backend for PyTorch Distributed</strong>, ported from torchcomms, implementing the full collective contract with nonblocking communicators and eager communicator splitting</td></tr>
  <tr><td><strong>Fault tolerance becomes a first-class <code>c10d</code> concept</strong>, with in-place process-group reconfiguration, one-sided RMA windows, and a Flight Recorder that works for any backend rather than only NCCL</td></tr>
  <tr><td><strong>Apple Silicon gains native linear algebra</strong>, including Jacobi-kernel SVD, <code>eigh</code>, QR and Cholesky, alongside a five-part reduction rewrite and a further MPSGraph to Metal kernel migration</td></tr>
  <tr><td><strong>Broader platform support</strong>: ROCm 7.14 wheels are produced from the TheRock pip SDK, Intel XPU adds native graph capture, and Inductor targets Rubin (<code>sm_107</code>)</td></tr>
</table>

For more details about these highlighted features, you can look at the release blogpost. Below are the full release notes for this release.

# 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:

  ```python
  options = torch.nn.LinearCrossEntropyOptions(acc_policy="balanced")
  loss = torch.nn.functional.linear_cross_entropy(
      input, linear_weight, target, options=options
  )
  ```

  After:

  ```python
  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:
  ```python
  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:
  ```python
  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:

  ```python
  class MyProcessGroup(...):
      def new_group(
          self, ranks, *, timeout=None, pg_options=None,
          group_name=None, group_desc=None
      ):
          ...
  ```

  After:

  ```python
  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:

  ```python
  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:

  ```python
  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:

  ```python
  group = torch.distributed.split_group(
      split_ranks=[[0, 1], [2, 3]]
  )
  if group is None:
      return
  ```

  After:

  ```python
  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:

  ```python
  lower = torch.cholesky(a)
  upper = torch.cholesky(a, upper=True)
  ```

  Version 2.14:

  ```python
  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:

  ```python
  q, r = torch.qr(a)
  q_full, r_full = torch.qr(a, some=False)
  ```

  Version 2.14:

  ```python
  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:

  ```python
  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:

  ```python
  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:
  ```python
  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:
  ```python
  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:

  ```cpp
  bool scalar_is_integer = scalar.isIntegral();
  bool dtype_is_integer = c10::isIntegralType(dtype);
  ```

  Version 2.14:

  ```cpp
  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 throug
```



document fetched 2026-09-09 13:26
