Title: Bump tensor bridge version cap for PyTorch 2.12 · Issue #2089 · NVIDIA/cuda-python · GitHub
Open Graph Title: Bump tensor bridge version cap for PyTorch 2.12 · Issue #2089 · NVIDIA/cuda-python
X Title: Bump tensor bridge version cap for PyTorch 2.12 · Issue #2089 · NVIDIA/cuda-python
Description: Summary 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 th...
Open Graph Description: Summary 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, ca...
X Description: Summary 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...
Opengraph URL: https://github.com/NVIDIA/cuda-python/issues/2089
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Bump tensor bridge version cap for PyTorch 2.12","articleBody":"## Summary\n\nThe tensor bridge's `_torch_version_check()` in `_memoryview.pyx` caps the supported PyTorch version range at `(2, 3) \u003c= (major, minor) \u003c= (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.\n\nFor `from_cuda_array_interface`, this causes a hard failure because PyTorch reports `__cuda_array_interface__` version 2, while cuda-python requires version 3+:\n\n```\nBufferError: only CUDA Array Interface v3 or above is supported\n```\n\n## Root cause\n\n```python\n# _memoryview.pyx\ncdef inline bint _torch_version_check():\n ...\n _torch_version_ok = (2, 3) \u003c= (major, minor) \u003c= (2, 11) # ← needs bumping\n```\n\nThe 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.\"\n\n## Action needed\n\n1. Verify PyTorch 2.12's `THPVariable` struct layout is unchanged (check `torch/csrc/autograd/python_variable.h`)\n2. Bump the upper bound to `(2, 12)`\n3. Re-add `latest` to the nightly CI pytorch test matrix (currently pinned to `2.11.0` as a workaround in #1987)\n\n## Discovered by\n\nNightly optional-dependency CI (#1987) — the `latest` torch entry started failing when PyTorch 2.12 was released.\n\n-- Leo's bot","author":{"url":"https://github.com/leofang","@type":"Person","name":"leofang"},"datePublished":"2026-05-15T02:36:58Z","url":"https://github.com/NVIDIA/cuda-python/issues/2089"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:0e86aa46-1a7f-cf89-d7c4-30c9fa4c3967 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | EC2E:3920C5:2BCF1D:3BEB02:6AF833F4 |
| html-safe-nonce | 29a087dbccca3742e30628d13af773e1318a2955bd284f91079966691a599747 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQzJFOjM5MjBDNToyQkNGMUQ6M0JFQjAyOjZBRjgzM0Y0IiwidmlzaXRvcl9pZCI6Ijc3OTc3OTY1NzgzNDQzMTc5NDAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 8463e44dd754a0fddc01f11bcb34adcdba38dcc056c5bae6174a0b18abd67df4 |
| hovercard-subject-tag | issue:4450777762 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/NVIDIA/cuda-python/2089/issue_layout |
| twitter:image | https://opengraph.githubassets.com/bec0fcb4fd0bee046511005f3a268b793c62c16e1f5a78671e7c67111c5583ec/NVIDIA/cuda-python/issues/2089 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/bec0fcb4fd0bee046511005f3a268b793c62c16e1f5a78671e7c67111c5583ec/NVIDIA/cuda-python/issues/2089 |
| og:image:alt | Summary 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, ca... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | leofang |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5713ecd83001b2f55c3509fb7a292bf7d66d0f167c7ae87a9f7eaec5a52bf8db |
| turbo-cache-control | no-preview |
| go-import | github.com/NVIDIA/cuda-python git https://github.com/NVIDIA/cuda-python.git |
| octolytics-dimension-user_id | 1728152 |
| octolytics-dimension-user_login | NVIDIA |
| octolytics-dimension-repository_id | 381173759 |
| octolytics-dimension-repository_nwo | NVIDIA/cuda-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 381173759 |
| octolytics-dimension-repository_network_root_nwo | NVIDIA/cuda-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 653be32ff5c755082a4db662491bfbbcfc9112c1 |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width