cuda.core: don't require a CUDA context for host-only memory - #2773
Open
Andy-Jost wants to merge 1 commit into
Open
cuda.core: don't require a CUDA context for host-only memory#2773Andy-Jost wants to merge 1 commit into
Andy-Jost wants to merge 1 commit into
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. |
Since 1.2.0, Buffer.from_handle binds a default-stream deallocation token to the current context for every owning memory resource. Memory the device cannot access has no stream ordering to preserve, so skip the binding when mr.is_device_accessible is False. Such buffers record no deallocation stream and never call the driver. Fixes NVIDIA#2769 Co-Authored-By: Claude Sonnet 5 <[email protected]>
Andy-Jost
force-pushed
the
ajost/issue-2769
branch
from
September 5, 2026 15:49
9730a1a to
7fcefa1
Compare
1 task
Andy-Jost
marked this pull request as ready for review
September 5, 2026 15:57
|
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.
Summary
Since 1.2.0,
Buffer.from_handlebinds a default-stream deallocation token to the current CUDA context for every owning memory resource (#2526). A memory resource whose memory the device cannot access has no stream ordering to preserve, yet it could no longer create aBufferin a process that never initialized CUDA. This is a regression from 1.1.x, reported against nvmath-python's NVPL-backed host APIs.Changes
mr.is_device_accessibleisFalse,Buffer.from_handlerecords no deallocation stream and does not call the driver.mr.deallocate()still receives the default stream, as in 1.1.Related Work