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
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