Skip to content

cuda.core: validate pinned host memory pool support - #2487

Merged
Andy-Jost merged 4 commits into
NVIDIA:mainfrom
uday1o1:fix/pinned-memory-capability-check
Aug 7, 2026
Merged

cuda.core: validate pinned host memory pool support#2487
Andy-Jost merged 4 commits into
NVIDIA:mainfrom
uday1o1:fix/pinned-memory-capability-check

Conversation

@uday1o1

@uday1o1uday1o1 commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Description

Closes#2486.

PinnedMemoryResource.allocate() can return an unusable buffer when the stream's device does not support the requested host memory-pool type. The first transfer using that buffer then fails with CUDA_ERROR_INVALID_VALUE.

Validate HOST and HOST_NUMA memory-pool support before allocation. Unsupported requests now raise RuntimeError and identify LegacyPinnedMemoryResource as the alternative when stream-ordered allocation is not required.

This also documents the capability requirements and adds a regression test that runs on devices without host memory pool support.

Validation

  • CUDA 12 and CUDA 13 Cython translation
  • Jetson AGX Orin unsupported-device regression test
  • LegacyPinnedMemoryResource allocation and transfer round trip
  • Pre-commit checks for the changed files
  • Sphinx render with warnings treated as errors

Checklist

  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@copy-pr-bot

Copy link
Copy Markdown
Contributor

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@github-actionsgithub-actionsBot added the cuda.core Everything related to the cuda.core module label Aug 4, 2026
@uday1o1
uday1o1force-pushed the fix/pinned-memory-capability-check branch 3 times, most recently from 5da214f to 2735740CompareAugust 5, 2026 18:11
uday1o1and others added 2 commits August 6, 2026 10:32
Reject unsupported host memory pools during allocation instead of allowing a later copy to fail with CUDA_ERROR_INVALID_VALUE.
Signed-off-by: Uday Arora <udaya@nvidia.com>
Drop the unnecessary CUDA 12 fence around host_memory_pools_supported,
raise RuntimeError instead of a synthetic CUDAError, and keep the
regression test hardware-gated for devices without host memory pools.
@Andy-Jost
Andy-Jostforce-pushed the fix/pinned-memory-capability-check branch from 2735740 to 5b7c9b1CompareAugust 6, 2026 17:35
@Andy-Jost
Andy-Jost marked this pull request as ready for review August 6, 2026 17:35
@Andy-Jost
Andy-Jost self-requested a review August 6, 2026 17:36
@Andy-JostAndy-Jost self-assigned this Aug 6, 2026
@Andy-JostAndy-Jost added bug Something isn't working P0 High priority - Must do! labels Aug 6, 2026
@Andy-JostAndy-Jost added this to the cuda.core 1.2.0 milestone Aug 6, 2026
@Andy-Jost

Copy link
Copy Markdown
Contributor

/ok to test 5b7c9b1

@Andy-Jost
Andy-Jost enabled auto-merge (squash) August 6, 2026 17:38
@github-actions

Copy link
Copy Markdown

Return safe defaults in CUDA 12 builds and skip the pinned-pool regression test when pool construction is unsupported.
@Andy-Jost
Andy-Jost merged commit 5199241 into NVIDIA:mainAug 7, 2026
107 checks passed
@uday1o1
uday1o1 deleted the fix/pinned-memory-capability-check branch August 7, 2026 20:36
github-actionsBot pushed a commit that referenced this pull request Aug 8, 2026
Removed preview folders for the following PRs:
- PR #2455
- PR #2487
- PR #2495
- PR #2503
- PR #2518
- PR #2534
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugSomething isn't workingcuda.coreEverything related to the cuda.core moduleP0High priority - Must do!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG]: PinnedMemoryResource returns an unusable buffer when host memory pools are unsupported

2 participants

@uday1o1@Andy-Jost