Skip to content

Conversation

@pciolkosz
Copy link
Contributor

@pciolkosz pciolkosz commented Jan 8, 2026

We introduced environment based APIs in CUB, but right now you need to use:

auto memory_prop  = cuda::std::execution::prop{cuda::mr::get_memory_resource, mr};
auto env = cuda::std::execution::env{ memory_prop, other_things};

It would be better to just do

auto env = cuda::std::execution::env{mr, other_things};

like we do with a stream. This PR adds an overload accepting a resource to cuda::mr::get_memory_resource, like we do with get_stream. It would be a burden to require every resource to declare cuda::mr::get_memory_resource query, so instead this PR changes cuda::std::execution::__query_or to also try to call the supplied query with the env as an argument, to utilize the newly added overload in cuda::mr::get_memory_resource

@copy-pr-bot
Copy link
Contributor

copy-pr-bot bot commented Jan 8, 2026

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.

@cccl-authenticator-app cccl-authenticator-app bot moved this from Todo to In Progress in CCCL Jan 8, 2026
@pciolkosz
Copy link
Contributor Author

/ok to test 6708395

@github-actions

This comment has been minimized.

//! @brief `__get_memory_resource_t` is a customization point object that queries a type `T` for an associated memory
//! @brief `get_memory_resource_t` is a customization point object that queries a type `T` for an associated memory
//! resource
struct __get_memory_resource_t
Copy link
Contributor

Choose a reason for hiding this comment

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

My memory is fuzzy here, why did we keep this internal last release?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am not sure, but I think we can just remove the internal name usage

@pciolkosz pciolkosz marked this pull request as ready for review January 8, 2026 20:46
@pciolkosz pciolkosz requested review from a team as code owners January 8, 2026 20:46
@cccl-authenticator-app cccl-authenticator-app bot moved this from In Progress to In Review in CCCL Jan 8, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Jan 9, 2026

😬 CI Workflow Results

🟥 Finished in 5h 43m: Pass: 97%/136 | Total: 5d 14h | Max: 5h 43m | Hits: 88%/272253

See results here.

@pciolkosz pciolkosz mentioned this pull request Jan 16, 2026
@pciolkosz
Copy link
Contributor Author

Closing in favor of #7266

@pciolkosz pciolkosz closed this Jan 16, 2026
@github-project-automation github-project-automation bot moved this from In Review to Done in CCCL Jan 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants