pytorch - 💡(How to fix) Fix [AOTAutograd/PT2] compiled backward can re-enter contextvars.Context after graph break

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

import copy import traceback

import torch

def make_tree(x): tree = torch.empty(16, dtype=torch.float32, device="cpu") tree[8:] = x tree[7] = tree[14] + tree[15] tree[6] = tree[12] + tree[13] tree[5] = tree[10] + tree[11] tree[4] = tree[8] + tree[9] tree[3] = tree[6] + tree[7] tree[2] = tree[4] + tree[5] tree[1] = tree[2] + tree[3] return tree

def graph_break_branch(x, r): y = x.float() idx = torch.searchsorted(y, r.item()) return y, idx.clamp(0, 7)

def device_copy_branch(x): y = x.cpu() return y.view_as(y)

def box_branch(shape, boxes): h = shape[0] w = shape[1] return boxes[:, 0], w, h

def stack_branch(boxes, h, w, x): y1 = torch.clamp(boxes[:, 1], 0, h) x2 = torch.clamp(boxes[:, 2], 0, w) y2 = torch.clamp(boxes[:, 3], 0, h) return torch.stack([x, y1, x2, y2], dim=1)

def target(leaf, shape, boxes1, t, x, boxes2, h, w, stack0, r): tree = make_tree(leaf) a = box_branch(shape, boxes1) b = device_copy_branch(t) c = stack_branch(boxes2, h, w, stack0) d = graph_break_branch(x, r) return tree, a, b, c, d

def get_inputs(): return ( torch.randn(8, dtype=torch.float32) * 0.1, torch.zeros(2, dtype=torch.int64), torch.randn(8, 4, dtype=torch.float32) * 0.1, torch.randn(16, dtype=torch.float32) * 0.1, torch.randn(8, dtype=torch.float32) * 0.1, torch.randn(8, 4, dtype=torch.float32) * 0.1, torch.zeros((), dtype=torch.int64), torch.zeros((), dtype=torch.int64), torch.randn(8, dtype=torch.float32) * 0.1, torch.randn((), dtype=torch.float64) * 0.1, )

def tree_map(obj, fn): if isinstance(obj, torch.Tensor): return fn(obj) if isinstance(obj, tuple): return tuple(tree_map(x, fn) for x in obj) if isinstance(obj, list): return [tree_map(x, fn) for x in obj] return obj

def prepare_inputs(inputs): def prepare_tensor(x): x = x.to("cuda") if x.is_floating_point() or x.is_complex(): x = x.detach().clone() x.requires_grad_(True) return x

return tree_map(copy.deepcopy(inputs), prepare_tensor)

def flatten_tensors(obj): if isinstance(obj, torch.Tensor): return [obj] if isinstance(obj, (tuple, list)): out = [] for x in obj: out.extend(flatten_tensors(x)) return out return []

def run(fn): torch.manual_seed(400449050) inputs = prepare_inputs(get_inputs())

with torch.enable_grad():
    out = fn(*inputs)
    terms = [x.float().sum() for x in flatten_tensors(out) if x.is_floating_point()]
    loss = terms[0]
    for term in terms[1:]:
        loss = loss + term.to(loss.device)
    loss.backward()

def main(): if not torch.cuda.is_available(): raise RuntimeError("CUDA is required for this repro.")

print(f"torch version: {torch.__version__}")

run(target)
print("eager: ok")

torch._dynamo.reset()
compiled = torch.compile(target)

try:
    run(compiled)
except Exception as exc:
    print("compiled: failed")
    print(f"{type(exc).__name__}: {exc}")
    print("".join(traceback.format_exception(type(exc), exc, exc.__traceback__)))
    raise

print("compiled: ok")

if name == "main": main()

Code Example

import copy
import traceback

import torch


def make_tree(x):
    tree = torch.empty(16, dtype=torch.float32, device="cpu")
    tree[8:] = x
    tree[7] = tree[14] + tree[15]
    tree[6] = tree[12] + tree[13]
    tree[5] = tree[10] + tree[11]
    tree[4] = tree[8] + tree[9]
    tree[3] = tree[6] + tree[7]
    tree[2] = tree[4] + tree[5]
    tree[1] = tree[2] + tree[3]
    return tree


def graph_break_branch(x, r):
    y = x.float()
    idx = torch.searchsorted(y, r.item())
    return y, idx.clamp(0, 7)


def device_copy_branch(x):
    y = x.cpu()
    return y.view_as(y)


def box_branch(shape, boxes):
    h = shape[0]
    w = shape[1]
    return boxes[:, 0], w, h


def stack_branch(boxes, h, w, x):
    y1 = torch.clamp(boxes[:, 1], 0, h)
    x2 = torch.clamp(boxes[:, 2], 0, w)
    y2 = torch.clamp(boxes[:, 3], 0, h)
    return torch.stack([x, y1, x2, y2], dim=1)


def target(leaf, shape, boxes1, t, x, boxes2, h, w, stack0, r):
    tree = make_tree(leaf)
    a = box_branch(shape, boxes1)
    b = device_copy_branch(t)
    c = stack_branch(boxes2, h, w, stack0)
    d = graph_break_branch(x, r)
    return tree, a, b, c, d


def get_inputs():
    return (
        torch.randn(8, dtype=torch.float32) * 0.1,
        torch.zeros(2, dtype=torch.int64),
        torch.randn(8, 4, dtype=torch.float32) * 0.1,
        torch.randn(16, dtype=torch.float32) * 0.1,
        torch.randn(8, dtype=torch.float32) * 0.1,
        torch.randn(8, 4, dtype=torch.float32) * 0.1,
        torch.zeros((), dtype=torch.int64),
        torch.zeros((), dtype=torch.int64),
        torch.randn(8, dtype=torch.float32) * 0.1,
        torch.randn((), dtype=torch.float64) * 0.1,
    )


def tree_map(obj, fn):
    if isinstance(obj, torch.Tensor):
        return fn(obj)
    if isinstance(obj, tuple):
        return tuple(tree_map(x, fn) for x in obj)
    if isinstance(obj, list):
        return [tree_map(x, fn) for x in obj]
    return obj


def prepare_inputs(inputs):
    def prepare_tensor(x):
        x = x.to("cuda")
        if x.is_floating_point() or x.is_complex():
            x = x.detach().clone()
            x.requires_grad_(True)
        return x

    return tree_map(copy.deepcopy(inputs), prepare_tensor)


def flatten_tensors(obj):
    if isinstance(obj, torch.Tensor):
        return [obj]
    if isinstance(obj, (tuple, list)):
        out = []
        for x in obj:
            out.extend(flatten_tensors(x))
        return out
    return []


def run(fn):
    torch.manual_seed(400449050)
    inputs = prepare_inputs(get_inputs())

    with torch.enable_grad():
        out = fn(*inputs)
        terms = [x.float().sum() for x in flatten_tensors(out) if x.is_floating_point()]
        loss = terms[0]
        for term in terms[1:]:
            loss = loss + term.to(loss.device)
        loss.backward()


def main():
    if not torch.cuda.is_available():
        raise RuntimeError("CUDA is required for this repro.")

    print(f"torch version: {torch.__version__}")

    run(target)
    print("eager: ok")

    torch._dynamo.reset()
    compiled = torch.compile(target)

    try:
        run(compiled)
    except Exception as exc:
        print("compiled: failed")
        print(f"{type(exc).__name__}: {exc}")
        print("".join(traceback.format_exception(type(exc), exc, exc.__traceback__)))
        raise

    print("compiled: ok")


if __name__ == "__main__":
    main()

---

for i in {1..20}; do
  echo "===== run $i ====="
  python test.py || break
done

---

(torch-nightly) xyt19@Oasis:/tmp$ python bug.py
torch version: 2.13.0.dev20260521+cu130
eager: ok
W0527 22:28:02.567000 17283 site-packages/torch/_dynamo/variables/tensor.py:1662] [5/0] Graph break from `Tensor.item()`, consider setting:
W0527 22:28:02.567000 17283 site-packages/torch/_dynamo/variables/tensor.py:1662] [5/0]     torch._dynamo.config.capture_scalar_outputs = True
W0527 22:28:02.567000 17283 site-packages/torch/_dynamo/variables/tensor.py:1662] [5/0] or:
W0527 22:28:02.567000 17283 site-packages/torch/_dynamo/variables/tensor.py:1662] [5/0]     env TORCHDYNAMO_CAPTURE_SCALAR_OUTPUTS=1
W0527 22:28:02.567000 17283 site-packages/torch/_dynamo/variables/tensor.py:1662] [5/0] to include these operations in the captured graph.
W0527 22:28:02.567000 17283 site-packages/torch/_dynamo/variables/tensor.py:1662] [5/0]
W0527 22:28:02.567000 17283 site-packages/torch/_dynamo/variables/tensor.py:1662] [5/0] Graph break: from user code at:
W0527 22:28:02.567000 17283 site-packages/torch/_dynamo/variables/tensor.py:1662] [5/0]   File "/tmp/bug.py", line 49, in torch_dynamo_resume_in_target_at_48
W0527 22:28:02.567000 17283 site-packages/torch/_dynamo/variables/tensor.py:1662] [5/0]     d = graph_break_branch(x, r)
W0527 22:28:02.567000 17283 site-packages/torch/_dynamo/variables/tensor.py:1662] [5/0]   File "/tmp/bug.py", line 22, in graph_break_branch
W0527 22:28:02.567000 17283 site-packages/torch/_dynamo/variables/tensor.py:1662] [5/0]     idx = torch.searchsorted(y, r.item())
W0527 22:28:02.567000 17283 site-packages/torch/_dynamo/variables/tensor.py:1662] [5/0]
W0527 22:28:02.567000 17283 site-packages/torch/_dynamo/variables/tensor.py:1662] [5/0]
compiled: failed
RuntimeError: cannot enter context: <_contextvars.Context object at 0x7ff13bb87800> is already entered
Traceback (most recent call last):
  File "/tmp/bug.py", line 126, in main
    run(compiled)
  File "/tmp/bug.py", line 110, in run
    loss.backward()
  File "/home/xyt19/miniconda3/envs/torch-nightly/lib/python3.10/site-packages/torch/_tensor.py", line 633, in backward
    torch.autograd.backward(
  File "/home/xyt19/miniconda3/envs/torch-nightly/lib/python3.10/site-packages/torch/autograd/__init__.py", line 395, in backward
    _engine_run_backward(
  File "/home/xyt19/miniconda3/envs/torch-nightly/lib/python3.10/site-packages/torch/autograd/graph.py", line 913, in _engine_run_backward
    return Variable._execution_engine.run_backward(  # Calls into the C++ engine to run the backward pass
  File "/home/xyt19/miniconda3/envs/torch-nightly/lib/python3.10/site-packages/torch/autograd/function.py", line 333, in apply_boxed
    return self._get_user_fn()(self, *args)
  File "/home/xyt19/miniconda3/envs/torch-nightly/lib/python3.10/site-packages/torch/_functorch/_aot_autograd/runtime_wrappers.py", line 3454, in backward
    return CompiledFunction._bwd_fn(
  File "/home/xyt19/miniconda3/envs/torch-nightly/lib/python3.10/site-packages/torch/_functorch/_aot_autograd/subclass_codegen.py:codegen(compiled_function_backward)", line 23, in _compiled_backward
RuntimeError: cannot enter context: <_contextvars.Context object at 0x7ff13bb87800> is already entered

Traceback (most recent call last):
  File "/tmp/bug.py", line 137, in <module>
    main()
  File "/tmp/bug.py", line 126, in main
    run(compiled)
  File "/tmp/bug.py", line 110, in run
    loss.backward()
  File "/home/xyt19/miniconda3/envs/torch-nightly/lib/python3.10/site-packages/torch/_tensor.py", line 633, in backward
    torch.autograd.backward(
  File "/home/xyt19/miniconda3/envs/torch-nightly/lib/python3.10/site-packages/torch/autograd/__init__.py", line 395, in backward
    _engine_run_backward(
  File "/home/xyt19/miniconda3/envs/torch-nightly/lib/python3.10/site-packages/torch/autograd/graph.py", line 913, in _engine_run_backward
    return Variable._execution_engine.run_backward(  # Calls into the C++ engine to run the backward pass
  File "/home/xyt19/miniconda3/envs/torch-nightly/lib/python3.10/site-packages/torch/autograd/function.py", line 333, in apply_boxed
    return self._get_user_fn()(self, *args)
  File "/home/xyt19/miniconda3/envs/torch-nightly/lib/python3.10/site-packages/torch/_functorch/_aot_autograd/runtime_wrappers.py", line 3454, in backward
    return CompiledFunction._bwd_fn(
  File "/home/xyt19/miniconda3/envs/torch-nightly/lib/python3.10/site-packages/torch/_functorch/_aot_autograd/subclass_codegen.py:codegen(compiled_function_backward)", line 23, in _compiled_backward
RuntimeError: cannot enter context: <_contextvars.Context object at 0x7ff13bb87800> is already entered
RAW_BUFFERClick to expand / collapse

🐛 Describe the bug

When using torch.compile, calling .backward() on a loss aggregated from multiple compiled outputs fails intermittently with RuntimeError: cannot enter context: <_contextvars.Context object at ...> is already entered.

To Reproduce

Save the following code as test.py:

import copy
import traceback

import torch


def make_tree(x):
    tree = torch.empty(16, dtype=torch.float32, device="cpu")
    tree[8:] = x
    tree[7] = tree[14] + tree[15]
    tree[6] = tree[12] + tree[13]
    tree[5] = tree[10] + tree[11]
    tree[4] = tree[8] + tree[9]
    tree[3] = tree[6] + tree[7]
    tree[2] = tree[4] + tree[5]
    tree[1] = tree[2] + tree[3]
    return tree


def graph_break_branch(x, r):
    y = x.float()
    idx = torch.searchsorted(y, r.item())
    return y, idx.clamp(0, 7)


def device_copy_branch(x):
    y = x.cpu()
    return y.view_as(y)


def box_branch(shape, boxes):
    h = shape[0]
    w = shape[1]
    return boxes[:, 0], w, h


def stack_branch(boxes, h, w, x):
    y1 = torch.clamp(boxes[:, 1], 0, h)
    x2 = torch.clamp(boxes[:, 2], 0, w)
    y2 = torch.clamp(boxes[:, 3], 0, h)
    return torch.stack([x, y1, x2, y2], dim=1)


def target(leaf, shape, boxes1, t, x, boxes2, h, w, stack0, r):
    tree = make_tree(leaf)
    a = box_branch(shape, boxes1)
    b = device_copy_branch(t)
    c = stack_branch(boxes2, h, w, stack0)
    d = graph_break_branch(x, r)
    return tree, a, b, c, d


def get_inputs():
    return (
        torch.randn(8, dtype=torch.float32) * 0.1,
        torch.zeros(2, dtype=torch.int64),
        torch.randn(8, 4, dtype=torch.float32) * 0.1,
        torch.randn(16, dtype=torch.float32) * 0.1,
        torch.randn(8, dtype=torch.float32) * 0.1,
        torch.randn(8, 4, dtype=torch.float32) * 0.1,
        torch.zeros((), dtype=torch.int64),
        torch.zeros((), dtype=torch.int64),
        torch.randn(8, dtype=torch.float32) * 0.1,
        torch.randn((), dtype=torch.float64) * 0.1,
    )


def tree_map(obj, fn):
    if isinstance(obj, torch.Tensor):
        return fn(obj)
    if isinstance(obj, tuple):
        return tuple(tree_map(x, fn) for x in obj)
    if isinstance(obj, list):
        return [tree_map(x, fn) for x in obj]
    return obj


def prepare_inputs(inputs):
    def prepare_tensor(x):
        x = x.to("cuda")
        if x.is_floating_point() or x.is_complex():
            x = x.detach().clone()
            x.requires_grad_(True)
        return x

    return tree_map(copy.deepcopy(inputs), prepare_tensor)


def flatten_tensors(obj):
    if isinstance(obj, torch.Tensor):
        return [obj]
    if isinstance(obj, (tuple, list)):
        out = []
        for x in obj:
            out.extend(flatten_tensors(x))
        return out
    return []


def run(fn):
    torch.manual_seed(400449050)
    inputs = prepare_inputs(get_inputs())

    with torch.enable_grad():
        out = fn(*inputs)
        terms = [x.float().sum() for x in flatten_tensors(out) if x.is_floating_point()]
        loss = terms[0]
        for term in terms[1:]:
            loss = loss + term.to(loss.device)
        loss.backward()


def main():
    if not torch.cuda.is_available():
        raise RuntimeError("CUDA is required for this repro.")

    print(f"torch version: {torch.__version__}")

    run(target)
    print("eager: ok")

    torch._dynamo.reset()
    compiled = torch.compile(target)

    try:
        run(compiled)
    except Exception as exc:
        print("compiled: failed")
        print(f"{type(exc).__name__}: {exc}")
        print("".join(traceback.format_exception(type(exc), exc, exc.__traceback__)))
        raise

    print("compiled: ok")


if __name__ == "__main__":
    main()

Reproduction Command

Since the error happens intermittently, use the following loop to trigger the failure reliably:

for i in {1..20}; do
  echo "===== run $i ====="
  python test.py || break
done

Error Traceback

(torch-nightly) xyt19@Oasis:/tmp$ python bug.py
torch version: 2.13.0.dev20260521+cu130
eager: ok
W0527 22:28:02.567000 17283 site-packages/torch/_dynamo/variables/tensor.py:1662] [5/0] Graph break from `Tensor.item()`, consider setting:
W0527 22:28:02.567000 17283 site-packages/torch/_dynamo/variables/tensor.py:1662] [5/0]     torch._dynamo.config.capture_scalar_outputs = True
W0527 22:28:02.567000 17283 site-packages/torch/_dynamo/variables/tensor.py:1662] [5/0] or:
W0527 22:28:02.567000 17283 site-packages/torch/_dynamo/variables/tensor.py:1662] [5/0]     env TORCHDYNAMO_CAPTURE_SCALAR_OUTPUTS=1
W0527 22:28:02.567000 17283 site-packages/torch/_dynamo/variables/tensor.py:1662] [5/0] to include these operations in the captured graph.
W0527 22:28:02.567000 17283 site-packages/torch/_dynamo/variables/tensor.py:1662] [5/0]
W0527 22:28:02.567000 17283 site-packages/torch/_dynamo/variables/tensor.py:1662] [5/0] Graph break: from user code at:
W0527 22:28:02.567000 17283 site-packages/torch/_dynamo/variables/tensor.py:1662] [5/0]   File "/tmp/bug.py", line 49, in torch_dynamo_resume_in_target_at_48
W0527 22:28:02.567000 17283 site-packages/torch/_dynamo/variables/tensor.py:1662] [5/0]     d = graph_break_branch(x, r)
W0527 22:28:02.567000 17283 site-packages/torch/_dynamo/variables/tensor.py:1662] [5/0]   File "/tmp/bug.py", line 22, in graph_break_branch
W0527 22:28:02.567000 17283 site-packages/torch/_dynamo/variables/tensor.py:1662] [5/0]     idx = torch.searchsorted(y, r.item())
W0527 22:28:02.567000 17283 site-packages/torch/_dynamo/variables/tensor.py:1662] [5/0]
W0527 22:28:02.567000 17283 site-packages/torch/_dynamo/variables/tensor.py:1662] [5/0]
compiled: failed
RuntimeError: cannot enter context: <_contextvars.Context object at 0x7ff13bb87800> is already entered
Traceback (most recent call last):
  File "/tmp/bug.py", line 126, in main
    run(compiled)
  File "/tmp/bug.py", line 110, in run
    loss.backward()
  File "/home/xyt19/miniconda3/envs/torch-nightly/lib/python3.10/site-packages/torch/_tensor.py", line 633, in backward
    torch.autograd.backward(
  File "/home/xyt19/miniconda3/envs/torch-nightly/lib/python3.10/site-packages/torch/autograd/__init__.py", line 395, in backward
    _engine_run_backward(
  File "/home/xyt19/miniconda3/envs/torch-nightly/lib/python3.10/site-packages/torch/autograd/graph.py", line 913, in _engine_run_backward
    return Variable._execution_engine.run_backward(  # Calls into the C++ engine to run the backward pass
  File "/home/xyt19/miniconda3/envs/torch-nightly/lib/python3.10/site-packages/torch/autograd/function.py", line 333, in apply_boxed
    return self._get_user_fn()(self, *args)
  File "/home/xyt19/miniconda3/envs/torch-nightly/lib/python3.10/site-packages/torch/_functorch/_aot_autograd/runtime_wrappers.py", line 3454, in backward
    return CompiledFunction._bwd_fn(
  File "/home/xyt19/miniconda3/envs/torch-nightly/lib/python3.10/site-packages/torch/_functorch/_aot_autograd/subclass_codegen.py:codegen(compiled_function_backward)", line 23, in _compiled_backward
RuntimeError: cannot enter context: <_contextvars.Context object at 0x7ff13bb87800> is already entered

Traceback (most recent call last):
  File "/tmp/bug.py", line 137, in <module>
    main()
  File "/tmp/bug.py", line 126, in main
    run(compiled)
  File "/tmp/bug.py", line 110, in run
    loss.backward()
  File "/home/xyt19/miniconda3/envs/torch-nightly/lib/python3.10/site-packages/torch/_tensor.py", line 633, in backward
    torch.autograd.backward(
  File "/home/xyt19/miniconda3/envs/torch-nightly/lib/python3.10/site-packages/torch/autograd/__init__.py", line 395, in backward
    _engine_run_backward(
  File "/home/xyt19/miniconda3/envs/torch-nightly/lib/python3.10/site-packages/torch/autograd/graph.py", line 913, in _engine_run_backward
    return Variable._execution_engine.run_backward(  # Calls into the C++ engine to run the backward pass
  File "/home/xyt19/miniconda3/envs/torch-nightly/lib/python3.10/site-packages/torch/autograd/function.py", line 333, in apply_boxed
    return self._get_user_fn()(self, *args)
  File "/home/xyt19/miniconda3/envs/torch-nightly/lib/python3.10/site-packages/torch/_functorch/_aot_autograd/runtime_wrappers.py", line 3454, in backward
    return CompiledFunction._bwd_fn(
  File "/home/xyt19/miniconda3/envs/torch-nightly/lib/python3.10/site-packages/torch/_functorch/_aot_autograd/subclass_codegen.py:codegen(compiled_function_backward)", line 23, in _compiled_backward
RuntimeError: cannot enter context: <_contextvars.Context object at 0x7ff13bb87800> is already entered

Versions

PyTorch version: 2.13.0.dev20260521+cu130 Is debug build: False CUDA used to build PyTorch: 13.0 ROCM used to build PyTorch: N/A

OS: Ubuntu 24.04.4 LTS (x86_64) GCC version: (Ubuntu 13.3.0-6ubuntu2~24.04.1) 13.3.0 Clang version: 18.1.3 (1ubuntu1) CMake version: version 3.28.3 Libc version: glibc-2.39

Python version: 3.10.20 (main, Mar 11 2026, 17:46:40) [GCC 14.3.0] (64-bit runtime) Python platform: Linux-5.15.167.4-microsoft-standard-WSL2-x86_64-with-glibc2.39 Is CUDA available: True CUDA runtime version: 12.0.140 Nvidia driver version: 596.49 cuDNN version: Probably one of the following: /usr/lib/x86_64-linux-gnu/libcudnn.so.9.21.1 /usr/lib/x86_64-linux-gnu/libcudnn_adv.so.9.21.1 /usr/lib/x86_64-linux-gnu/libcudnn_cnn.so.9.21.1 /usr/lib/x86_64-linux-gnu/libcudnn_engines_precompiled.so.9.21.1 /usr/lib/x86_64-linux-gnu/libcudnn_engines_runtime_compiled.so.9.21.1 /usr/lib/x86_64-linux-gnu/libcudnn_engines_tensor_ir.so.9.21.1 /usr/lib/x86_64-linux-gnu/libcudnn_graph.so.9.21.1 /usr/lib/x86_64-linux-gnu/libcudnn_heuristic.so.9.21.1 /usr/lib/x86_64-linux-gnu/libcudnn_ops.so.9.21.1 Is XPU available: False HIP runtime version: N/A MIOpen runtime version: N/A Is XNNPACK available: True Caching allocator config: N/A ersions of relevant libraries: [pip3] numpy==2.2.6 [pip3] nvidia-cublas==13.1.1.3 [pip3] nvidia-cuda-cupti==13.0.85 [pip3] nvidia-cuda-nvrtc==13.0.88 [pip3] nvidia-cuda-runtime==13.0.96 [pip3] nvidia-cudnn-cu13==9.20.0.48 [pip3] nvidia-cufft==12.0.0.61 [pip3] nvidia-curand==10.4.0.35 [pip3] nvidia-cusolver==12.0.4.66 [pip3] nvidia-cusparse==12.6.3.3 [pip3] nvidia-cusparselt-cu13==0.8.1 [pip3] nvidia-nccl-cu13==2.29.7 [pip3] nvidia-nvjitlink==13.0.88 [pip3] nvidia-nvtx==13.0.85 [pip3] torch==2.13.0.dev20260521+cu130 [pip3] torchaudio==2.11.0.dev20260525+cu130 [pip3] torchvision==0.28.0.dev20260525+cu130 [pip3] triton==3.7.0+git88b227e2 [conda] numpy 2.2.6 pypi_0 pypi [conda] nvidia-cublas 13.1.1.3 pypi_0 pypi [conda] nvidia-cuda-cupti 13.0.85 pypi_0 pypi [conda] nvidia-cuda-nvrtc 13.0.88 pypi_0 pypi [conda] nvidia-cuda-runtime 13.0.96 pypi_0 pypi [conda] nvidia-cudnn-cu13 9.20.0.48 pypi_0 pypi [conda] nvidia-cufft 12.0.0.61 pypi_0 pypi [conda] nvidia-curand 10.4.0.35 pypi_0 pypi [conda] nvidia-cusolver 12.0.4.66 pypi_0 pypi [conda] nvidia-cusparse 12.6.3.3 pypi_0 pypi [conda] nvidia-cusparselt-cu13 0.8.1 pypi_0 pypi [conda] nvidia-nccl-cu13 2.29.7 pypi_0 pypi [conda] nvidia-nvjitlink 13.0.88 pypi_0 pypi [conda] nvidia-nvtx 13.0.85 pypi_0 pypi [conda] torch 2.13.0.dev20260521+cu130 pypi_0 pypi [conda] torchaudio 2.11.0.dev20260525+cu130 pypi_0 pypi [conda] torchvision 0.28.0.dev20260525+cu130 pypi_0 pypi [conda] triton 3.7.0+git88b227e2 pypi_0 pypi

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

pytorch - 💡(How to fix) Fix [AOTAutograd/PT2] compiled backward can re-enter contextvars.Context after graph break