Skip to content

Conversation

@miscco
Copy link
Contributor

@miscco miscco commented Jan 16, 2026

The __query_or currently requires that the query is always of the form env.query(CPO, args...)

However, we also want that to work with types that are their own query, which would satisfy cpo(env, args...)

This is the case for ::cuda::get_stream(::cudaStream_t) and also for our memory resources

@miscco miscco requested a review from a team as a code owner January 16, 2026 08:51
@miscco miscco requested a review from davebayer January 16, 2026 08:51
@github-project-automation github-project-automation bot moved this to Todo in CCCL Jan 16, 2026
@cccl-authenticator-app cccl-authenticator-app bot moved this from Todo to In Review in CCCL Jan 16, 2026
@miscco miscco changed the title Fix __query_or CPO [Backport 3.2] Fix __query_or CPO Jan 16, 2026
@miscco miscco force-pushed the backport_fix_query_or branch 3 times, most recently from 061def9 to 9bec5a6 Compare January 16, 2026 10:06
@miscco miscco force-pushed the backport_fix_query_or branch 2 times, most recently from b2a0d16 to a11f836 Compare January 16, 2026 19:33
@miscco miscco requested a review from a team as a code owner January 16, 2026 19:33
We want to be able to also handle fallbacks, so add those CPOs
@miscco miscco force-pushed the backport_fix_query_or branch from a11f836 to 6d222cb Compare January 16, 2026 19:34
@miscco miscco enabled auto-merge (squash) January 16, 2026 20:20
@github-actions

This comment has been minimized.

@miscco miscco force-pushed the backport_fix_query_or branch from 4edb2ec to 0048f78 Compare January 19, 2026 11:39
Copy link
Contributor

@bernhardmgruber bernhardmgruber left a comment

Choose a reason for hiding this comment

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

This LGTM, but I would also like @gevtushenko 's opinion, since he divised the original query_or pattern and my knowledge about it is limited.

#include <cub/util_namespace.cuh>

#include <cuda/__functional/address_stability.h>
#include <cuda/__functional/call_or.h>
Copy link
Contributor

Choose a reason for hiding this comment

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

Remark: I think this is not strictly necessary, since there are no other changes in this file.

Alternatively, you can also use call_or in the implementation below.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah that is a merge conflict, because the environment APIs came after 3.2

That said I would like to not run another CI run for this

@github-actions
Copy link
Contributor

🥳 CI Workflow Results

🟩 Finished in 4h 30m: Pass: 100%/134 | Total: 2d 23h | Max: 4h 30m | Hits: 96%/269962

See results here.

@miscco miscco merged commit ffa5468 into NVIDIA:branch/3.2.x Jan 19, 2026
148 checks passed
@miscco miscco deleted the backport_fix_query_or branch January 19, 2026 16:13
@github-project-automation github-project-automation bot moved this from In Review to Done in CCCL Jan 19, 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.

3 participants