Ensure all execution policies are also environments#8155
Merged
miscco merged 6 commits intoNVIDIA:mainfrom Mar 31, 2026
Merged
Conversation
miscco
commented
Mar 24, 2026
This comment has been minimized.
This comment has been minimized.
8322290 to
228e42c
Compare
This comment has been minimized.
This comment has been minimized.
228e42c to
8bdc9c9
Compare
8bdc9c9 to
08e209d
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
pciolkosz
approved these changes
Mar 27, 2026
miscco
commented
Mar 30, 2026
libcudacxx/test/libcudacxx/cuda/execution/execution_policy/get_stream.pass.cpp
Outdated
Show resolved
Hide resolved
d470fb4 to
0b18867
Compare
This comment has been minimized.
This comment has been minimized.
0b18867 to
45a5d6c
Compare
45a5d6c to
a364f81
Compare
libcudacxx/test/libcudacxx/std/utilities/expol/policies.compile.pass.cpp
Show resolved
Hide resolved
1 task
libcudacxx/test/libcudacxx/std/utilities/expol/environments.pass.cpp
Outdated
Show resolved
Hide resolved
libcudacxx/test/libcudacxx/std/utilities/expol/environments.pass.cpp
Outdated
Show resolved
Hide resolved
Comment on lines
+262
to
+265
| test(cuda::std::execution::seq); | ||
| test(cuda::std::execution::par); | ||
| test(cuda::std::execution::par_unseq); | ||
| test(cuda::std::execution::unseq); |
Contributor
There was a problem hiding this comment.
Q: Why should the standard policies accept streams and memory resources?
Contributor
Author
There was a problem hiding this comment.
Memory resources are universally useful also for potential host execution policies
regarding streams, its a bit more questionable, but I believe if we add a way to add a backend to an execution policy it will make sense
Contributor
There was a problem hiding this comment.
I would really not allow this for any of the standard execution policies, even if we saw a use for this in the future. Users are going to do unimaginable things if they have a chance to ;)
8997d7a to
f110f72
Compare
We want to be able to pass additional information to execution policies. We already settled on the sender & receiver approach with queries and key value pairs. This refactors the current approach to turn `__execution_policy_base` into a proper environment. That has the advantage that we do not need to handle the cuda execution policy in a special way. The only cuda specific code is when we want to ensure that streams are passed as `cuda::stream_ref` and memory resources as `cuda::mr::resource_ref`
d9ef7ea to
1a8e3e9
Compare
davebayer
approved these changes
Mar 30, 2026
1a8e3e9 to
2c63149
Compare
This comment has been minimized.
This comment has been minimized.
34406e7 to
d91096a
Compare
Contributor
🥳 CI Workflow Results🟩 Finished in 2h 47m: Pass: 100%/137 | Total: 4d 16h | Max: 2h 46m | Hits: 58%/281638See results here. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We want to be able to pass additional information to execution policies.
We already settled on the sender & receiver approach with queries and key value pairs.
This refactors the current approach to turn
__execution_policy_baseinto a proper environment. That has the advantage that we do not need to handle the cuda execution policy in a special way.The only cuda specific code is when we want to ensure that streams are passed as
cuda::stream_refand memory resources ascuda::mr::resource_refThis is currently failing some tests we had in place that relied on special handling of the
cudapolicy wrt to memory resourcesI am not sure if that is something we want to change?