Skip to content

[12.9.x] Fix CUDA pointer and coredump attribute types - #2930

Merged
leofang merged 5 commits into
NVIDIA:12.9.xfrom
kkraus14:codex/issue-2928-pointer-device-ordinal-12.9
Sep 22, 2026
Merged

leofang merged 5 commits into
NVIDIA:12.9.xfrom
kkraus14:codex/issue-2928-pointer-device-ordinal-12.9

Conversation

@kkraus14

@kkraus14 kkraus14 commented Sep 22, 2026

Copy link
Copy Markdown
Collaborator

Backport of #2929 to the 12.9.x maintenance branch.

Correct the internal result storage and Python conversion for CUDA pointer and coredump attributes:

  • return CU_POINTER_ATTRIBUTE_DEVICE_ORDINAL from signed integer storage so negative CUDA device sentinels are preserved
  • store CU_POINTER_ATTRIBUTE_ALLOWED_HANDLE_TYPES in its 64-bit unsigned slot instead of truncating it to 32 bits
  • use a void * result slot for CU_POINTER_ATTRIBUTE_HOST_POINTER
  • use a one-byte C++ bool and its actual size for boolean coredump attributes

The helper declarations are private implementation details, so these corrections do not change the public API or extension ABI. Regression tests exercise negative device ordinals, full-width allowed-handle results, and one-byte coredump writes; the existing pointer and coredump integration tests cover the affected API paths.

Testing:

  • The identical helper and regression-test changes pass the focused CUDA 13 test set on the main branch (5 passed)
  • The 12.9.x source completes Cythonization locally; the native build requires CUDA 12.x headers and is covered by this PR's CI
  • git diff --check

@kkraus14 kkraus14 added bug Something isn't working cuda.bindings Everything related to the cuda.bindings module labels Sep 22, 2026
@kkraus14 kkraus14 self-assigned this Sep 22, 2026
@kkraus14 kkraus14 changed the title [12.9.x] Fix CU_POINTER_ATTRIBUTE_DEVICE_ORDINAL results [12.9.x] Fix CUDA pointer and coredump attribute types Sep 22, 2026
@leofang

leofang commented Sep 22, 2026

Copy link
Copy Markdown
Member

@kkraus14 could you check the CI failure?

@leofang
leofang merged commit b6c0fa6 into NVIDIA:12.9.x Sep 22, 2026
62 checks passed
leofang added a commit to leofang/cuda-python that referenced this pull request Sep 22, 2026
* Add cuda-bindings 13.4.3 release notes covering the two recent FFI-audit
  fixes that landed on 13.4.x (NVIDIA#2929 and NVIDIA#2931).
* Back-fill 12.9.9 release notes on the 13.4.x line (from 12.9.x) so the
  docs site — built from the mainline branches — lists them under the
  Version selector.  The 12.9.9 notes get the recent 12.9.x FFI-audit
  backports (NVIDIA#2930 and NVIDIA#2934) appended to their Bugfixes section.
* Add 13.4.3, 12.9.9, and 12.9.8 entries to cuda_bindings/docs/nv-versions.json
  and cuda_python/docs/nv-versions.json.  12.9.8 notes themselves are
  already on main via NVIDIA#2851, so only the version-selector entry is missing.
leofang added a commit to leofang/cuda-python that referenced this pull request Sep 22, 2026
* Add cuda-bindings 13.4.3 release notes covering the two recent FFI-audit
  fixes that landed on 13.4.x (NVIDIA#2929 and NVIDIA#2931).
* Back-fill 12.9.9 release notes on the 13.4.x line (from 12.9.x) so the
  docs site — built from the mainline branches — lists them under the
  Version selector.  The 12.9.9 notes get the recent 12.9.x FFI-audit
  backports (NVIDIA#2930 and NVIDIA#2934) appended to their Bugfixes section.
* Add a 13.4.3 entry to cuda_bindings/docs/nv-versions.json and
  cuda_python/docs/nv-versions.json.
leofang added a commit to leofang/cuda-python that referenced this pull request Sep 22, 2026
* Add cuda-bindings 13.4.3 release notes covering the two recent FFI-audit
  fixes that landed on 13.4.x (NVIDIA#2929 and NVIDIA#2931).
* Back-fill 12.9.9 release notes on the 13.4.x line (from 12.9.x) so the
  docs site — built from the mainline branches — lists them under the
  Version selector.  The 12.9.9 notes get the recent 12.9.x FFI-audit
  backports (NVIDIA#2930 and NVIDIA#2934) appended to their Bugfixes section.
* Add a 13.4.3 entry to cuda_bindings/docs/nv-versions.json and
  cuda_python/docs/nv-versions.json.
leofang added a commit to leofang/cuda-python that referenced this pull request Sep 22, 2026
* Add cuda-bindings 13.4.3 release notes covering the two recent FFI-audit
  fixes that landed on 13.4.x (NVIDIA#2929 and NVIDIA#2931).
* Back-fill 12.9.9 release notes on the 13.4.x line (from 12.9.x) so the
  docs site — built from the mainline branches — lists them under the
  Version selector.  The 12.9.9 notes get the recent 12.9.x FFI-audit
  backports (NVIDIA#2930 and NVIDIA#2934) appended to their Bugfixes section.
* Add a 13.4.3 entry to cuda_bindings/docs/nv-versions.json and
  cuda_python/docs/nv-versions.json.
leofang added a commit that referenced this pull request Sep 23, 2026
* Prepare the 13.4.3 release

* Add cuda-bindings 13.4.3 release notes covering the two recent FFI-audit
  fixes that landed on 13.4.x (#2929 and #2931).
* Back-fill 12.9.9 release notes on the 13.4.x line (from 12.9.x) so the
  docs site — built from the mainline branches — lists them under the
  Version selector.  The 12.9.9 notes get the recent 12.9.x FFI-audit
  backports (#2930 and #2934) appended to their Bugfixes section.
* Add a 13.4.3 entry to cuda_bindings/docs/nv-versions.json and
  cuda_python/docs/nv-versions.json.

* Update cuda_bindings/docs/source/release/12.9.9-notes.rst
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working cuda.bindings Everything related to the cuda.bindings module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants