-
Notifications
You must be signed in to change notification settings - Fork 204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor mr_ref_tests to not depend on MR base classes #1589
Merged
rapids-bot
merged 3 commits into
rapidsai:branch-24.08
from
harrism:fea-baseclassless-device-mr-tests
Jul 2, 2024
Merged
Refactor mr_ref_tests to not depend on MR base classes #1589
rapids-bot
merged 3 commits into
rapidsai:branch-24.08
from
harrism:fea-baseclassless-device-mr-tests
Jul 2, 2024
Conversation
This file contains 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
harrism
added
feature request
New feature or request
non-breaking
Non-breaking change
labels
Jun 25, 2024
harrism
changed the title
Refactor mr_ref_tests to not depend on MR base classes
Add resource_ref versions of current_device_resource functions, refactor mr_ref_tests to not depend on MR base classes
Jun 27, 2024
harrism
force-pushed
the
fea-baseclassless-device-mr-tests
branch
from
June 27, 2024 11:01
4e90eeb
to
78520cd
Compare
harrism
changed the title
Add resource_ref versions of current_device_resource functions, refactor mr_ref_tests to not depend on MR base classes
Refactor mr_ref_tests to not depend on MR base classes
Jun 27, 2024
3 tasks
vyasr
approved these changes
Jun 27, 2024
bdice
approved these changes
Jun 27, 2024
/merge |
rapids-bot bot
pushed a commit
that referenced
this pull request
Aug 28, 2024
Fixes #1597 Adds new` get_per_device_resource_ref()`, `set_per_device_resource_ref()` and `current_device` versions of these, intended to replace `get_per_device_resource()`. The new functions deal in `device_async_resource_ref`, while the old functions deal in `device_memory_resource` pointers. Tests are updated to use the new functions. Note that I have also added `reset_per_device_resource_ref()` and `reset_current_device_resource_ref()` which are necessary because previously we implemented the resetting behavior by passing `nullptr` to `set_current_device_resource()`, which doesn't work with `resource_ref` because it can't refer to `nullptr` (no such thing as a null reference). Updates tests to cover the new functionality, and re-enables tests of `set_current_device_resource_ref()` which were disabled in #1589. Authors: - Mark Harris (https://github.com/harrism) Approvers: - Bradley Dice (https://github.com/bdice) - Rong Ou (https://github.com/rongou) - Lawrence Mitchell (https://github.com/wence-) URL: #1598
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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
Fixes #1444
Refactors mr_ref_tests.hpp and the .cpp files that include it to use a hierarchy of factory classes in which the base class contains a
resource_ref
and the derived classes are templated on the actual resource type and own the MR under test to maintain its lifetime. This way the tests can still be value parameterized (by name) and the test machinery can be type erased. In the future, if CCCL adds anany_resource
type-erased owning resource container, we can use that to simplify this machinery.Note that until #1598 merges, this PR necessarily disables (comments out) tests of
set_current_device_resource()
. This is because the test only has a resource_ref, so it can'tset_current_device_resource(ref).
#1598 addsset_current_device_resource_ref()
which reenables this testing.Checklist