You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The tensor bridge's _torch_version_check() in _memoryview.pyx caps the supported PyTorch version range at (2, 3) <= (major, minor) <= (2, 11). PyTorch 2.12 was released on ~May 14, 2026, causing the version check to fail. When this happens, _is_torch_tensor() returns False and torch tensors fall through to the generic CAI/DLPack paths instead of the fast AOTI tensor bridge.
For from_cuda_array_interface, this causes a hard failure because PyTorch reports __cuda_array_interface__ version 2, while cuda-python requires version 3+:
BufferError: only CUDA Array Interface v3 or above is supported
The upper bound exists because the tensor bridge relies on undocumented PyTorch internals (THPVariable struct layout, AtenTensorHandle == at::Tensor*). The docstring says: "Bump the upper bound after verifying a new PyTorch release."
Action needed
Verify PyTorch 2.12's THPVariable struct layout is unchanged (check torch/csrc/autograd/python_variable.h)
Summary
The tensor bridge's
_torch_version_check()in_memoryview.pyxcaps the supported PyTorch version range at(2, 3) <= (major, minor) <= (2, 11). PyTorch 2.12 was released on ~May 14, 2026, causing the version check to fail. When this happens,_is_torch_tensor()returnsFalseand torch tensors fall through to the generic CAI/DLPack paths instead of the fast AOTI tensor bridge.For
from_cuda_array_interface, this causes a hard failure because PyTorch reports__cuda_array_interface__version 2, while cuda-python requires version 3+:Root cause
The upper bound exists because the tensor bridge relies on undocumented PyTorch internals (
THPVariablestruct layout,AtenTensorHandle == at::Tensor*). The docstring says: "Bump the upper bound after verifying a new PyTorch release."Action needed
THPVariablestruct layout is unchanged (checktorch/csrc/autograd/python_variable.h)(2, 12)latestto the nightly CI pytorch test matrix (currently pinned to2.11.0as a workaround in Add nightly CI for optional-dependency testing (PyTorch, numba-cuda) #1987)Discovered by
Nightly optional-dependency CI (#1987) — the
latesttorch entry started failing when PyTorch 2.12 was released.-- Leo's bot