Repository navigation
Remove warning in the stream pool when asking for more streams than available - #18236
Merged
rapids-bot[bot] merged 2 commits intoMar 13, 2025
Merged
Conversation
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
Contributor
Author
|
/ok to test |
mhaseeb123
approved these changes
Mar 12, 2025
bdice
reviewed
Mar 12, 2025
| std::min<std::size_t>({sources.size() - start_source + 1, | ||
| cudf::detail::global_cuda_stream_pool().get_stream_pool_size(), | ||
| pools::tpool().get_thread_count()}); | ||
| std::min<std::size_t>(sources.size() - start_source + 1, pools::tpool().get_thread_count()); |
Contributor
There was a problem hiding this comment.
Can we remove the cur_stream++ % stream_pool.size() mod operation now? Just use cur_stream++?
Contributor
Author
There was a problem hiding this comment.
Same here, number of streams is limited to pools::tpool().get_thread_count()
| auto const streams = cudf::detail::fork_streams(stream, num_streams); | ||
| for (size_t i = 0; i < num_chunks; ++i) { | ||
| auto const idx = task_order[i]; | ||
| auto const cur_stream = streams[i % streams.size()]; |
Contributor
There was a problem hiding this comment.
Suggested change
| auto const cur_stream = streams[i % streams.size()]; | |
| auto const cur_stream = streams[i]; |
Contributor
Author
There was a problem hiding this comment.
we can't remove the modulo because the number of streams can still be lower than the number of chunks: auto const num_streams = std::min<std::size_t>(num_chunks, h_comp_pool().get_thread_count());
shrshi
approved these changes
Mar 13, 2025
Contributor
Author
|
/merge |
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.
Description
When
get_streamsrequests more streams than there are in the pool, the pool returns existing streams in round-robin order. We originally included this warning because the behavior might be surprising to the caller. However, this warning just clutters the logs when we don't add extra logic to make sure we don't ask for more streams than available.Removing the warning and cleaning up call sites.
Checklist