Repository navigation
ArgMin/Max fixes and improvements - #8897
Merged
Merged
Conversation
There were a couple of oversights in NVIDIA#8285, which are fixed by this PR: * arguments to dispatch_streaming_arg_reduce are passed in the wrong order in the arg_extrema.cu benchmark * arg_less wasn't a good name since it does not return bool. arg_min would be right, but that name is taken. So it's arg_reduce_op. * Call __arg_min directly in some device level APIs to avoid one additional function call
bernhardmgruber
commented
May 11, 2026
| EnvT env = {}) | ||
| { | ||
| _CCCL_NVTX_RANGE_SCOPE("cub::DeviceReduce::ArgMax"); | ||
| return __arg_min_env(d_in, d_max_out, d_index_out, num_items, detail::arg_less{detail::swap_args{compare_op}}, env); |
Contributor
Author
There was a problem hiding this comment.
Wrapping in arg_less here was too early as well.
7 tasks done
This comment has been minimized.
This comment has been minimized.
Contributor
🥳 CI Workflow Results🟩 Finished in 5h 51m: Pass: 100%/283 | Total: 12d 02h | Max: 2h 45m | Hits: 14%/1176829See results here. |
miscco
approved these changes
May 12, 2026
davebayer
approved these changes
May 12, 2026
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.
There were a couple of oversights in #8285, which are fixed by this PR:
dispatch_streaming_arg_reduceare passed in the wrong order in thearg_extrema.cubenchmarkarg_lesswasn't a good name since it does not return bool.arg_minwould be right, but that name is taken. So it'sarg_reduce_op.__arg_mindirectly in some device level APIs to avoid one additional function call