Repository navigation
Extract environment boilerplate code from within the device interfaces to a separate header - #6622
Merged
Merged
Conversation
gonidelis
commented
Nov 13, 2025
|
|
||
| // Initial value | ||
| OutputExtremumT initial_value{::cuda::std::numeric_limits<InputValueT>::max()}; | ||
| OutputExtremumT initial_value{::cuda::std::numeric_limits<InputValueT>::lowest()}; |
Member
Author
There was a problem hiding this comment.
I need to figure out why this bug was not caught from the tests
This comment has been minimized.
This comment has been minimized.
gonidelis
force-pushed
the
refactor_env_boilerplate
branch
from
November 13, 2025 20:38
c72dd09 to
03c1ee9
Compare
This comment has been minimized.
This comment has been minimized.
NaderAlAwar
reviewed
Nov 14, 2025
1 of 5 tasks
gonidelis
force-pushed
the
refactor_env_boilerplate
branch
from
November 30, 2025 07:01
03c1ee9 to
27f9479
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
gonidelis
force-pushed
the
refactor_env_boilerplate
branch
from
December 11, 2025 17:17
0ae2fc1 to
020e232
Compare
This comment has been minimized.
This comment has been minimized.
Member
Author
|
LLVMs 15-18 are not friendly with complex C++20 aggregate expressions codegen hence this PR breaks CCCL for these compilers/C++ version. Investigating what's the best course of action. I see three options: a) simplify the code in this pr digging deeper to see what's the exact issue. |
bernhardmgruber
force-pushed
the
refactor_env_boilerplate
branch
from
December 15, 2025 21:07
57d2bd5 to
401b345
Compare
gonidelis
commented
Dec 15, 2025
| using tuning_t = | ||
| ::cuda::std::execution::__query_result_or_t<EnvT, ::cuda::execution::__get_tuning_t, ::cuda::std::execution::env<>>; | ||
|
|
||
| // clang 15-19 ICE when using __query_result_or_t, so we just use the underlying machinery as a workaround |
Member
Author
There was a problem hiding this comment.
i would promise we tried the same thing with @miscco
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
gonidelis
force-pushed
the
refactor_env_boilerplate
branch
from
December 16, 2025 09:40
96b593a to
8bef46f
Compare
gonidelis
enabled auto-merge (squash)
December 16, 2025 09:40
Member
Author
|
Once green this should be good to go |
This comment has been minimized.
This comment has been minimized.
bernhardmgruber
approved these changes
Dec 16, 2025
| //! - Memory resource querying from environment | ||
| //! | ||
| //! @param env The execution environment | ||
| //! @param algorithm_callable Callable that invokes the algorithm implementation with determinism specified |
Contributor
There was a problem hiding this comment.
Suggested change
| //! @param algorithm_callable Callable that invokes the algorithm implementation with determinism specified | |
| //! @param algorithm_callable Callable that invokes the algorithm |
Comment on lines
+1155
to
+1157
| using tuning_t = | ||
| ::cuda::std::execution::__query_result_or_t<EnvT, ::cuda::execution::__get_tuning_t, ::cuda::std::execution::env<>>; | ||
|
|
Contributor
There was a problem hiding this comment.
Why do we need this here?
Comment on lines
+1904
to
+1906
| using tuning_t = | ||
| ::cuda::std::execution::__query_result_or_t<EnvT, ::cuda::execution::__get_tuning_t, ::cuda::std::execution::env<>>; | ||
|
|
Contributor
There was a problem hiding this comment.
Also, I think this is unused.
Contributor
🥳 CI Workflow Results🟩 Finished in 14h 56m: Pass: 100%/95 | Total: 5d 01h | Max: 5h 51m | Hits: 69%/91590See 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.
fixes #5606
Boilerplate code for extracting types information (
stream,mr,tuning_tetc.) is too big and repetitive across the new device environment based interfaces we introduced. This PR extracts the code into a separate function and re-uses it in the existing environment based device APIs that we have (DeviceScanandDeviceReduce).Some consideration about the design for the reviewers:
deterministm_tis supported. For exampleDeviceReduce::Reducecan support bothgpu_to_gpuandrun_to_rundeterminism, whileDeviceReduce::ArgMax/MinorDeviceScanonly supportrun_to_runat the moment. That means the determinism heuristics cannot be incorporated into the boilerplate code. Future environment-based APIs must individually evaluate each algorithm to determine and support the appropriate deterministic types.I need some feedback on whether this interface on the
dispatch_with_env()looks sane.