Skip to content

Implement the new tuning API for deterministic (rfa) reduce dispatch - #7346

Merged
bernhardmgruber merged 6 commits into
NVIDIA:mainfrom
bernhardmgruber:tuning_determin_reduce
Feb 25, 2026
Merged

bernhardmgruber merged 6 commits into
NVIDIA:mainfrom
bernhardmgruber:tuning_determin_reduce

Conversation

@bernhardmgruber

@bernhardmgruber bernhardmgruber commented Jan 25, 2026 •

Copy link
Copy Markdown
Contributor

@copy-pr-bot

copy-pr-bot Bot commented Jan 25, 2026

Copy link
Copy Markdown
Contributor

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@cccl-authenticator-app cccl-authenticator-app Bot moved this from Todo to In Progress in CCCL Jan 25, 2026
@bernhardmgruber

Copy link
Copy Markdown
Contributor Author

/ok to test 1962a21

@github-actions

This comment has been minimized.

@bernhardmgruber
bernhardmgruber marked this pull request as ready for review February 3, 2026 21:41
@bernhardmgruber
bernhardmgruber requested review from a team as code owners February 3, 2026 21:41
@cccl-authenticator-app cccl-authenticator-app Bot moved this from In Progress to In Review in CCCL Feb 3, 2026
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@fbusato fbusato left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

a few minor comments. Looks good.
It's a bit hard to review because some files have been moved and it looks new.


using ftype = typename AccumT::ftype;
constexpr int bin_length = AccumT::max_index + AccumT::max_fold;
const int tid = block_threads * blockIdx.x + threadIdx.x;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

do we need to handle large input?

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.

I did not change any code in this file, just moved it from kernel_reduce.cuh. So I don't know. I guess it's fine.

// Output result
if (threadIdx.x == 0)
{
detail::uninitialized_copy_single(d_out + blockIdx.x, block_aggregate);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
detail::uninitialized_copy_single(d_out + blockIdx.x, block_aggregate);
cub::detail::uninitialized_copy_single(d_out + blockIdx.x, block_aggregate);

if (accum_t == type_t::float32)
{
// ipt_13.tpb_224 1.107188 1.009709 1.097114 1.316820
const auto scaled = scale_mem_bound(224, 13, accum_size);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

missing full qualification?

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.

We do not require full qualification outside libcu++ AFAIK

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Image

@github-actions

Copy link
Copy Markdown
Contributor

🥳 CI Workflow Results

🟩 Finished in 3h 50m: Pass: 100%/249 | Total: 8d 22h | Max: 3h 50m | Hits: 72%/154068

See results here.

if (accum_t == type_t::float32)
{
// ipt_13.tpb_224 1.107188 1.009709 1.097114 1.316820
const auto scaled = scale_mem_bound(224, 13, accum_size);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Image

}

const auto scaled = scale_mem_bound(256, 20, accum_size);
return {{scaled.block_threads, scaled.items_per_thread, BLOCK_REDUCE_RAKING},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just to be sure, are they always the same?

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.

Currently yes, but we could change this. It comes from the old policy_hub, where we had using SingleTilePolicy = ReducePolicy; everywhere.

@bernhardmgruber
bernhardmgruber merged commit 9ef62ef into NVIDIA:main Feb 25, 2026
268 of 269 checks passed
@bernhardmgruber
bernhardmgruber deleted the tuning_determin_reduce branch February 25, 2026 16:44
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.

5 participants