Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce cuco::cuda_stream_ref #296

Merged
merged 1 commit into from
Apr 25, 2023

Conversation

sleeepyjack
Copy link
Collaborator

@sleeepyjack sleeepyjack commented Apr 25, 2023

This PR introduces a non-owning wrapper for cudaStream_t coined cuco::cuda_stream_ref and primarily borrows from RMM's implementation.

@sleeepyjack sleeepyjack added type: feature request New feature request P2: Nice to have Desired, but not necessary labels Apr 25, 2023
Comment on lines +118 to +137
// /**
// * @brief Equality comparison operator for streams
// *
// * @param lhs The first stream view to compare
// * @param rhs The second stream view to compare
// * @return true if equal, false if unequal
// */
// inline bool operator==(cuda_stream_ref lhs, cuda_stream_ref rhs)
// {
// return lhs.value() == rhs.value();
// }

// /**
// * @brief Inequality comparison operator for streams
// *
// * @param lhs The first stream view to compare
// * @param rhs The second stream view to compare
// * @return true if unequal, false if equal
// */
// inline bool operator!=(cuda_stream_ref lhs, cuda_stream_ref rhs) { return not(lhs == rhs); }
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

RMM defines these equality operators. However, they collide with the built-in ptr == ptr operator.

@sleeepyjack sleeepyjack added the Needs Review Awaiting reviews before merging label Apr 25, 2023
@jrhemstad
Copy link
Collaborator

@sleeepyjack
Copy link
Collaborator Author

cuda::stream_ref will be available in libcu++ v2.1.0, and we should get that version soon: rapidsai/rapids-cmake#399.

I would say we merge the current PR as a WAR and switch to cuda::stream_ref once it's available to us.

@PointKernel PointKernel merged commit 1b6dd07 into NVIDIA:dev Apr 25, 2023
@PointKernel
Copy link
Member

Merging this to unblock the following PRs for set.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Review Awaiting reviews before merging P2: Nice to have Desired, but not necessary type: feature request New feature request
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants