Repository navigation
[CUDAX] Remove assign and execution policy from async_buffer - #4604
Merged
Merged
Conversation
Contributor
ðĐ CI finished in 31m 25s: Pass: 100%/26 | Total: 2h 21m | Avg: 5m 26s | Max: 12m 35s | Hits: 96%/14616
|
| Project | |
|---|---|
| CCCL Infrastructure | |
| libcu++ | |
| CUB | |
| Thrust | |
| +/- | CUDA Experimental |
| stdpar | |
| python | |
| CCCL C Parallel Library | |
| Catch2Helper |
Modifications in project or dependencies?
| Project | |
|---|---|
| CCCL Infrastructure | |
| libcu++ | |
| CUB | |
| Thrust | |
| +/- | CUDA Experimental |
| stdpar | |
| python | |
| CCCL C Parallel Library | |
| Catch2Helper |
ðâ Runner counts (total jobs: 26)
| # | Runner |
|---|---|
| 17 | linux-amd64-cpu16 |
| 4 | linux-arm64-cpu16 |
| 2 | windows-amd64-cpu16 |
| 2 | linux-amd64-gpu-rtx2080-latest-1 |
| 1 | linux-amd64-gpu-h100-latest-1 |
miscco
approved these changes
May 2, 2025
miscco
left a comment
Contributor
There was a problem hiding this comment.
I would like to note that initialization is also meaningfull work, so we might need to retain the execution policy if we want to not just drop this and go back to uninitialized buffer
Contributor
Author
I agree and noted at the end of the description that environment will most likely retain the execution policy for the initialization part, but after the buffer is constructed there is no reason to store it in the buffer |
ericniebler
approved these changes
May 2, 2025
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.
Currently
async_buffertechnically has both size and capacity, becauseassigncan could assign a smaller sequence to the buffer. We don't fully expose capacity controls, so this is all internal detail that is hard to control. Assign was also capable of reallocating the buffer.This PR aims to simplify that and drop both
assignand internal separate size and capacity tracking. Size will now always report full size of the allocation.With the recently added move assignment operator the buffer can be explicitly resized by the user by constructing and assigning a new buffer. This way it's easier to understand reallocation is happening and provide separate streams for previous buffer destruction and new buffer construction.
With the last member function in the
async_bufferthat could submit meaningful GPU work gone there is no need for the buffer to hold execution policy anymore. The policy was unused even before the changes in this PR, but now it's doubtful it would be useful past the buffer construction. The environment type used during buffer construction will retain its execution policy member in case the buffer constructor would utilize it in the future.