Merge RmmResourceAdaptor into BufferResource as a CCCL resource - #1067
Closed
madsbk wants to merge 1 commit into
Closed
Merge RmmResourceAdaptor into BufferResource as a CCCL resource#1067madsbk wants to merge 1 commit into
RmmResourceAdaptor into BufferResource as a CCCL resource#1067madsbk wants to merge 1 commit into
Conversation
singleton commit
|
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. |
Member
Author
|
/ok to test |
Member
Author
|
Closed in favor of #1069. |
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.
Closes #641
Merge
RmmResourceAdaptorintoBufferResourcesoBufferResourceitself becomes a CCCLcuda::mr::resource_with<device_accessible>.The Python
BufferResourcenow subclassesrmm.pylibrmm.DeviceMemoryResource. This removes a lifetime foot-gun: previously, callers had to passbr.device_mr()(the inner adaptor) to RMM APIs such asrmm.DeviceBuffer(mr=...). That kept the adaptor alive, but not the parentBufferResource, so its stream pool could in principle be destroyed while async work on those streams was still in flight.Now
rmm.DeviceBuffer(mr=br)is the natural call. It keeps a strong reference to the entireBufferResource, ensuring the stream pool stays alive as long as any buffer allocated from it exists.This will break
cudf-polarsCI, so we should have a PR ready there before merging.