Skip to content

ArgMin/Max fixes and improvements - #8897

Merged
bernhardmgruber merged 1 commit into
NVIDIA:mainfrom
bernhardmgruber:fix_arg
May 12, 2026
Merged

bernhardmgruber merged 1 commit into
NVIDIA:mainfrom
bernhardmgruber:fix_arg

Conversation

@bernhardmgruber

@bernhardmgruber bernhardmgruber commented May 11, 2026 •

Copy link
Copy Markdown
Contributor

There were a couple of oversights in #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

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
bernhardmgruber requested review from a team as code owners May 11, 2026 13:53
@github-project-automation github-project-automation Bot moved this to Todo in CCCL May 11, 2026
@cccl-authenticator-app cccl-authenticator-app Bot moved this from Todo to In Review in CCCL 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);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Wrapping in arg_less here was too early as well.

@github-actions

This comment has been minimized.

@github-actions

Copy link
Copy Markdown
Contributor

🥳 CI Workflow Results

🟩 Finished in 5h 51m: Pass: 100%/283 | Total: 12d 02h | Max: 2h 45m | Hits: 14%/1176829

See results here.

@bernhardmgruber
bernhardmgruber merged commit e978330 into NVIDIA:main May 12, 2026
601 of 607 checks passed
@github-project-automation github-project-automation Bot moved this from In Review to Done in CCCL May 12, 2026
@bernhardmgruber
bernhardmgruber deleted the fix_arg branch May 12, 2026 07:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants