Skip to content

Conversation

@etseidl
Copy link
Contributor

@etseidl etseidl commented Aug 18, 2023

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
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
@PointKernel
Copy link
Member

/ok to test

@github-actions github-actions bot removed the conda label Sep 8, 2023
Copy link
Contributor

@vuule vuule left a comment

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
Copy link
Member

@harrism harrism left a comment

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
Member

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
Copy link
Contributor

vuule commented Sep 12, 2023

/ok to test

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

harrism commented Sep 12, 2023

/merge

@vuule
Copy link
Contributor

vuule commented Sep 12, 2023

/ok to test

@rapids-bot rapids-bot bot merged commit 3be772f into rapidsai:branch-23.10 Sep 13, 2023
@etseidl etseidl deleted the draft_stream_pool branch September 13, 2023 01:21
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