Skip to content

Global stream pool - #13922

Merged
rapids-bot[bot] merged 146 commits into
NVIDIA:branch-23.10from
etseidl:draft_stream_pool
Sep 13, 2023
Merged

rapids-bot[bot] merged 146 commits into
NVIDIA:branch-23.10from
etseidl:draft_stream_pool

Conversation

@etseidl

@etseidl etseidl commented Aug 18, 2023 •

Copy link
Copy Markdown
Contributor

Description

#13637 added a static stream pool object for use by the Parquet reader. This PR expands upon that by:

  • Moving the stream pool to the cudf::detail namespace.
  • Adding a debugging implementation that always returns the default stream.
  • Hiding implementation details behind a more streamlined interface.
  • Using cuda events for synchronization.

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

etseidl and others added 30 commits June 26, 2023 15:54
* @param count The number of `cuda_stream_view` objects to return.
* @return Vector containing `count` stream views.
*/
std::vector<rmm::cuda_stream_view> fork_streams(rmm::cuda_stream_view stream, std::size_t count);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not 100% sure, but can't think of a scenario where caller would not want to keep the streams.

Suggested change
std::vector<rmm::cuda_stream_view> fork_streams(rmm::cuda_stream_view stream, std::size_t count);
[[nodiscard]] std::vector<rmm::cuda_stream_view> fork_streams(rmm::cuda_stream_view stream, std::size_t count);

@etseidl
etseidl requested review from bdice and harrism September 8, 2023 16:06
Comment thread cpp/src/utilities/stream_pool.cpp Resolved
@PointKernel

Copy link
Copy Markdown
Member

/ok to test

@github-actions github-actions Bot removed the conda label Sep 8, 2023

@vuule vuule left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥

@bdice
bdice removed the request for review from a team September 11, 2023 20:06

@harrism harrism left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work. Just one more missing const, I think.

* @param count The number of stream views to return.
* @return Vector containing `count` stream views.
*/
std::vector<rmm::cuda_stream_view> fork_streams(rmm::cuda_stream_view stream, uint32_t count);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ultimately this will not be in the cudf namespace, but in rmm. I think there we should consider cudf::stream_view::fork(int num_streams) and cudf::stream_view::join(std::span<rmm::cuda_stream_view const> other_streams).

I'm OK with this for now.

@vuule

vuule commented Sep 12, 2023

Copy link
Copy Markdown
Contributor

/ok to test

@vuule
vuule requested a review from harrism September 12, 2023 22:35
@harrism

harrism commented Sep 12, 2023

Copy link
Copy Markdown
Contributor

/merge

@vuule

vuule commented Sep 12, 2023

Copy link
Copy Markdown
Contributor

/ok to test

@rapids-bot
rapids-bot Bot merged commit 3be772f into NVIDIA:branch-23.10 Sep 13, 2023
@etseidl
etseidl deleted the draft_stream_pool branch September 13, 2023 01:21
@bdice bdice mentioned this pull request Sep 21, 2023
3 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CMake CMake build issue feature request New feature or request libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change Performance Performance related issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants