-
Notifications
You must be signed in to change notification settings - Fork 322
[Backport 3.2] Fix __query_or CPO
#7267
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
061def9 to
9bec5a6
Compare
b2a0d16 to
a11f836
Compare
We want to be able to also handle fallbacks, so add those CPOs
a11f836 to
6d222cb
Compare
This comment has been minimized.
This comment has been minimized.
Co-authored-by: Bernhard Manfred Gruber <[email protected]>
Its relatively easy to not properly pass a memory resource
4edb2ec to
0048f78
Compare
bernhardmgruber
left a comment
There was a problem hiding this 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> |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
🥳 CI Workflow Results🟩 Finished in 4h 30m: Pass: 100%/134 | Total: 2d 23h | Max: 4h 30m | Hits: 96%/269962See results here. |
The
__query_orcurrently requires that the query is always of the formenv.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