cuda.core: validate pinned host memory pool support - #2487
Merged
Andy-Jost merged 4 commits intoAug 7, 2026
Conversation
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. |
uday1o1
force-pushed
the
fix/pinned-memory-capability-check
branch
3 times, most recently
from
August 5, 2026 18:11
5da214f to
2735740
Compare
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
force-pushed
the
fix/pinned-memory-capability-check
branch
from
August 6, 2026 17:35
2735740 to
5b7c9b1
Compare
Andy-Jost
marked this pull request as ready for review
August 6, 2026 17:35
Andy-Jost
self-requested a review
August 6, 2026 17:36
Contributor
|
/ok to test 5b7c9b1 |
Andy-Jost
approved these changes
Aug 6, 2026
Andy-Jost
enabled auto-merge (squash)
August 6, 2026 17:38
|
…ry-capability-check
Return safe defaults in CUDA 12 builds and skip the pinned-pool regression test when pool construction is unsupported.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 withCUDA_ERROR_INVALID_VALUE.Validate HOST and HOST_NUMA memory-pool support before allocation. Unsupported requests now raise
RuntimeErrorand identifyLegacyPinnedMemoryResourceas 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
LegacyPinnedMemoryResourceallocation and transfer round tripChecklist