Migrate thrust_allocator to modern thrust::mr::allocator API#2204
Draft
bdice wants to merge 1 commit into
Draft
Conversation
This commit contributes to issue rapidsai#2193 by migrating rmm::mr::thrust_allocator from the deprecated thrust::device_malloc_allocator to the modern thrust::mr::allocator API. Changes: - Added rmm_thrust_device_resource: A thrust::mr::memory_resource adapter that wraps RMM's device_async_resource_ref with stream support - Migrated thrust_allocator to inherit from thrust::mr::allocator instead of the deprecated thrust::device_malloc_allocator - Implemented thrust_allocator_resource_holder helper base class to ensure correct initialization order (resource before allocator base class) - Added device() accessor method for consistency All existing API is preserved for backward compatibility. The allocator remains stream-aware and properly manages per-allocator resource state.
|
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. |
Collaborator
Author
|
This is a low priority task and will need testing across all of RAPIDS before merging. This may slip to 26.04. |
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.
This PR contributes to issue #2193 by migrating
rmm::mr::thrust_allocatorfrom the deprecatedthrust::device_malloc_allocatorto the modernthrust::mr::allocatorAPI.Changes
rmm_thrust_device_resource: Athrust::mr::memory_resourceadapter that wraps RMM'sdevice_async_resource_refwith stream supportthrust_allocator: Now inherits fromthrust::mr::allocatorinstead of the deprecatedthrust::device_malloc_allocatorthrust_allocator_resource_holderhelper base class to ensure correct initialization order (resource before allocator base class)device()accessor: For consistency with the resource API