Skip to content

[libcu++] Make memory resources work with get_memory_resource when wrapped in environment#8404

Merged
pciolkosz merged 3 commits intoNVIDIA:mainfrom
pciolkosz:get_memory_resource_for_resources
Apr 22, 2026
Merged

[libcu++] Make memory resources work with get_memory_resource when wrapped in environment#8404
pciolkosz merged 3 commits intoNVIDIA:mainfrom
pciolkosz:get_memory_resource_for_resources

Conversation

@pciolkosz
Copy link
Copy Markdown
Contributor

Right now when an API takes an environment, in order to use get_memory_resource on that environment it needs to be wrapped in cuda::std::execution::prop. It would be nice to put the resource directly into it, to make it work this PR adds a CRTP base class for resources that implements query(get_memory_resource) that allows it to work with the environment machinery.

@pciolkosz pciolkosz requested review from a team as code owners April 14, 2026 04:55
@pciolkosz pciolkosz requested a review from fbusato April 14, 2026 04:55
@github-project-automation github-project-automation Bot moved this to Todo in CCCL Apr 14, 2026
@cccl-authenticator-app cccl-authenticator-app Bot moved this from Todo to In Review in CCCL Apr 14, 2026
//! This enables the resource to be discovered inside a composed
//! `cuda::std::execution::env` by the `get_memory_resource` customization point.
template <class _Derived>
struct memory_resource_base
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I feel this is overkill. It would be much better to just add the query to the individual resources

@github-project-automation github-project-automation Bot moved this from In Review to In Progress in CCCL Apr 14, 2026
@github-actions

This comment has been minimized.

@gonidelis gonidelis self-requested a review April 15, 2026 00:52
@github-project-automation github-project-automation Bot moved this from In Progress to In Review in CCCL Apr 20, 2026
@pciolkosz pciolkosz force-pushed the get_memory_resource_for_resources branch from 25dde91 to e157292 Compare April 20, 2026 23:23
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions
Copy link
Copy Markdown
Contributor

🥳 CI Workflow Results

🟩 Finished in 1d 19h: Pass: 100%/321 | Total: 2d 21h | Max: 55m 05s | Hits: 98%/409798

See results here.

@pciolkosz pciolkosz merged commit 64b4b94 into NVIDIA:main Apr 22, 2026
676 of 679 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants