-
Notifications
You must be signed in to change notification settings - Fork 197
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
Use cuda::proclaim_return_type on device lambda. #2048
Conversation
return thrust::reduce( | ||
thrust_policy, | ||
buffer_.data(), | ||
buffer_.data() + buffer_.size(), | ||
value_type{0}, | ||
cuda::proclaim_return_type<value_type>([] __device__(auto left, auto right) { | ||
auto abs_left = left > 0 ? left : -left; | ||
auto abs_right = right > 0 ? right : -right; | ||
return abs_left + abs_right; | ||
})); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the only place in RAFT that uses a device lambda along with thrust?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I can tell, yes. RAFT builds with only this change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I built cuGraph successfully with only this change, too.
/merge |
This PR updates RAFT to CCCL 2.2.0. Do not merge until all of RAPIDS is ready to update. Depends on #2048. Replaces #1464. Authors: - Bradley Dice (https://github.com/bdice) Approvers: - Vyas Ramasubramani (https://github.com/vyasr) - Robert Maynard (https://github.com/robertmaynard) URL: #2049
This PR updates RAFT to CCCL 2.2.0. Do not merge until all of RAPIDS is ready to update. Depends on rapidsai#2048. Replaces rapidsai#1464. Authors: - Bradley Dice (https://github.com/bdice) Approvers: - Vyas Ramasubramani (https://github.com/vyasr) - Robert Maynard (https://github.com/robertmaynard) URL: rapidsai#2049
This PR is needed to change the one piece of RAFT that requires
cuda::proclaim_return_type
for compatibility with CCCL (Thrust) 2.2.0. This pulls out part of the diff of #1464, which we will be able to close in favor of a new PR after this is merged.