Refactor pool_memory_resource to shared CCCL MR design#2258
Draft
bdice wants to merge 2 commits intorapidsai:stagingfrom
Draft
Refactor pool_memory_resource to shared CCCL MR design#2258bdice wants to merge 2 commits intorapidsai:stagingfrom
bdice wants to merge 2 commits intorapidsai:stagingfrom
Conversation
Extract pool_memory_resource_impl into detail header and source files, rewrite pool_memory_resource as a non-template outer class with private shared_resource inheritance. Update Cython bindings, tests, and doc comment examples. Remove pool/pinned_pool mr_ref tests (replaced by dedicated fixture-based tests in pool_mr_tests.cpp). 81/81 C++ tests pass, 1163/1163 Python tests pass.
7f067a6 to
64208e0
Compare
|
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. |
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
Convert
pool_memory_resourcefrom a templated, header-only class to a non-templated class usingcuda::mr::shared_resourcefor reference-counted ownership. Implementation is now compiled intolibrmm.so.This follows the same pattern established in #2246. Part of #2011.
Key changes
pool_memory_resource<Upstream>)pool_memory_resource_implinrmm::mr::detailnamespaceUpstream*constructor overloads (usedevice_async_resource_ref)any_resourcefor owning semanticsdevice_memory_resourceinheritance for Python compatibilityPOOL_MR_REF_TESTandPINNED_POOL_MR_REF_TEST(replaced by dedicated fixture-based tests)PoolMemoryResourceTestfixture with tests forGetUpstreamResource,AllocateDeallocate,SharedOwnership,Equality,PoolSizeBreaking API changes
pool_memory_resource<Upstream>→pool_memory_resourceUpstream*overloads, usedevice_async_resource_refFuture changes
Once we migrate everything from using
device_memory_resourceto the CCCL MR design, we can drop the pieces of code labeled aslegacy device_memory_resource compatibility layer.