[libcu++] Add dynamic_accessibility_property added to all resources#7727
Conversation
bb98162 to
a47376d
Compare
|
/ok to test a47376d |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
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 |
This comment has been minimized.
This comment has been minimized.
|
This can land whenever -- we'll take it in the next release if needed. A backport to 3.3.x would be welcome, though.
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 |
There was a problem hiding this comment.
Typo: accessibility. Please fix throughout.
| _CCCL_API constexpr __memory_accessability | |
| _CCCL_API constexpr __memory_accessibility |
This comment has been minimized.
This comment has been minimized.
…ility_resources_property
🥳 CI Workflow Results🟩 Finished in 2h 10m: Pass: 100%/99 | Total: 2d 02h | Max: 1h 29m | Hits: 94%/254549See results here. |
|
Backport failed for 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 |
…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]>
* [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]>
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
Closes #7505
This PR adds a new
dynamic_accessibility_property. This property is enabled for all resources, there is aget_propertytemplate that will just infer the accessibility from static properties. Users can provide a customget_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_propertyto 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_resourcewas modified to useforward_propertyto inherit handling of this new property. To avoid addingupstream_resourcetoshared_resource, which already hasget()and operators doing the same thing,forward_propertywas modified to also support.get()member.