Skip to content

[libcu++] Add dynamic_accessibility_property added to all resources#7727

Merged
pciolkosz merged 8 commits intoNVIDIA:mainfrom
pciolkosz:add_dynamic_accesibility_resources_property
Feb 27, 2026
Merged

[libcu++] Add dynamic_accessibility_property added to all resources#7727
pciolkosz merged 8 commits intoNVIDIA:mainfrom
pciolkosz:add_dynamic_accesibility_resources_property

Conversation

@pciolkosz
Copy link
Contributor

Closes #7505

This PR adds a new dynamic_accessibility_property. This property is enabled for all resources, there is a get_property template that will just infer the accessibility from static properties. Users can provide a custom get_property(dynamic_accessibility_property) for their resources to change that behavior and run some runtime checks to see what accessibility is supported by the system.

This PR also modifies forward_property to properly handle this new property without ambiguous overloads. There was a need to exclude the type-erased wrappers from the default template as well.

Finally shared_resource was modified to use forward_property to inherit handling of this new property. To avoid adding upstream_resource to shared_resource, which already has get() and operators doing the same thing, forward_property was modified to also support .get() member.

@pciolkosz pciolkosz requested a review from a team as a code owner February 20, 2026 23:17
@pciolkosz pciolkosz requested a review from davebayer February 20, 2026 23:18
@github-project-automation github-project-automation bot moved this to Todo in CCCL Feb 20, 2026
@copy-pr-bot
Copy link
Contributor

copy-pr-bot bot commented Feb 20, 2026

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@cccl-authenticator-app cccl-authenticator-app bot moved this from Todo to In Review in CCCL Feb 20, 2026
@pciolkosz pciolkosz force-pushed the add_dynamic_accesibility_resources_property branch from bb98162 to a47376d Compare February 20, 2026 23:20
@pciolkosz
Copy link
Contributor Author

/ok to test a47376d

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-project-automation github-project-automation bot moved this from In Review to In Progress in CCCL Feb 25, 2026
@wmaxey
Copy link
Member

wmaxey commented Feb 25, 2026

Do we need to backport this? I'd prefer to avoid changing 3.3.x.

@pciolkosz
Copy link
Contributor Author

pciolkosz commented Feb 25, 2026

Do we need to backport this? I'd prefer to avoid changing 3.3.x.

Yeah, we agreed with RAPIDS to bring in this feature into 3.3, I thought there was still plenty of time until last CL

@github-actions

This comment has been minimized.

@bdice
Copy link
Contributor

bdice commented Feb 26, 2026

This can land whenever -- we'll take it in the next release if needed. A backport to 3.3.x would be welcome, though.

To avoid adding upstream_resource to shared_resource, which already has get() and operators doing the same thing, forward_property was modified to also support .get() member.

I was wondering how you were going to resolve this! Thanks for calling it out.

//! get_property dispatches via their interface to the stored concrete resource.
_CCCL_TEMPLATE(class _Resource)
_CCCL_REQUIRES((!__disable_default_dynamic_accessibility_property<_Resource>) )
_CCCL_API constexpr __memory_accessability
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo: accessibility. Please fix throughout.

Suggested change
_CCCL_API constexpr __memory_accessability
_CCCL_API constexpr __memory_accessibility

@github-project-automation github-project-automation bot moved this from In Progress to In Review in CCCL Feb 27, 2026
@github-actions

This comment has been minimized.

@pciolkosz pciolkosz enabled auto-merge (squash) February 27, 2026 19:12
@github-actions
Copy link
Contributor

🥳 CI Workflow Results

🟩 Finished in 2h 10m: Pass: 100%/99 | Total: 2d 02h | Max: 1h 29m | Hits: 94%/254549

See results here.

@pciolkosz pciolkosz merged commit 16a45e1 into NVIDIA:main Feb 27, 2026
116 checks passed
@github-actions
Copy link
Contributor

Backport failed for branch/3.3.x, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin branch/3.3.x
git worktree add -d .worktree/backport-7727-to-branch/3.3.x origin/branch/3.3.x
cd .worktree/backport-7727-to-branch/3.3.x
git switch --create backport-7727-to-branch/3.3.x
git cherry-pick -x 16a45e185cfa03a4bfa55270437d9f7f11ee9992

miscco added a commit to miscco/cccl that referenced this pull request Mar 2, 2026
…VIDIA#7727)

* Add dynamic_accessibility_property to all memory resources

* Fix forward property test

* Workaround for gcc 7

* Review feedback

* Address review comments

* Fix merge conflict

* Fix replacment issue

---------

Co-authored-by: Michael Schellenberger Costa <[email protected]>
wmaxey added a commit that referenced this pull request Mar 3, 2026
* [libcu++] Add explicit alignment argument to buffer construction (#7623)

* Add explicit alignment argument to buffer

* Fix format

* Review feedback

* Apply suggestions from code review

Co-authored-by: Michael Schellenberger Costa <[email protected]>

* Fix format

* Fix missing include

---------

Co-authored-by: anon <users.noreply.github.com>
Co-authored-by: Michael Schellenberger Costa <[email protected]>

* [libcu++] Add dynamic_accessibility_property added to all resources (#7727)

* Add dynamic_accessibility_property to all memory resources

* Fix forward property test

* Workaround for gcc 7

* Review feedback

* Address review comments

* Fix merge conflict

* Fix replacment issue

---------

Co-authored-by: Michael Schellenberger Costa <[email protected]>

* Version bump buffer and resource wrappers (#7833)

* Compilation fixes

---------

Co-authored-by: pciolkosz <[email protected]>
Co-authored-by: Wesley Maxey <[email protected]>
bdice added a commit to bdice/rmm that referenced this pull request Mar 21, 2026
Replace the hand-rolled friend get_property templates in
cccl_resource_ref and cccl_async_resource_ref with inheritance from
cuda::forward_property. This delegates property forwarding to CCCL's
own machinery, which correctly handles dynamic_accessibility_property
(NVIDIA/cccl#7727) and any future properties without ambiguity.

Each wrapper now exposes upstream_resource() returning the inner
ResourceType, as required by forward_property for stateful properties.

Closes rapidsai#2322
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Add implicit, dynamic accessibility property to all memory resources

4 participants