Use cuda::proclaim_return_type on device lambda.#2048
Merged
Conversation
divyegala
reviewed
Dec 7, 2023
Comment on lines
+112
to
+121
| 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; | ||
| })); |
Contributor
There was a problem hiding this comment.
Is this the only place in RAFT that uses a device lambda along with thrust?
Contributor
Author
There was a problem hiding this comment.
As far as I can tell, yes. RAFT builds with only this change.
Contributor
Author
There was a problem hiding this comment.
I built cuGraph successfully with only this change, too.
Contributor
Author
|
/merge |
divyegala
approved these changes
Dec 8, 2023
This was referenced Dec 8, 2023
Merged
rapids-bot Bot
pushed a commit
that referenced
this pull request
Dec 19, 2023
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
ChristinaZ
pushed a commit
to ChristinaZ/raft
that referenced
this pull request
Jan 17, 2024
This PR updates RAFT to CCCL 2.2.0. Do not merge until all of RAPIDS is ready to update. Depends on NVIDIA#2048. Replaces NVIDIA#1464. Authors: - Bradley Dice (https://github.com/bdice) Approvers: - Vyas Ramasubramani (https://github.com/vyasr) - Robert Maynard (https://github.com/robertmaynard) URL: NVIDIA#2049
loulankxh
pushed a commit
to loulankxh/raft
that referenced
this pull request
Oct 14, 2025
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 NVIDIA#1464, which we will be able to close in favor of a new PR after this is merged. Authors: - Bradley Dice (https://github.com/bdice) Approvers: - Divye Gala (https://github.com/divyegala) URL: NVIDIA#2048
loulankxh
pushed a commit
to loulankxh/raft
that referenced
this pull request
Oct 14, 2025
This PR updates RAFT to CCCL 2.2.0. Do not merge until all of RAPIDS is ready to update. Depends on NVIDIA#2048. Replaces NVIDIA#1464. Authors: - Bradley Dice (https://github.com/bdice) Approvers: - Vyas Ramasubramani (https://github.com/vyasr) - Robert Maynard (https://github.com/robertmaynard) URL: NVIDIA#2049
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.
This PR is needed to change the one piece of RAFT that requires
cuda::proclaim_return_typefor 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.