Skip to content

Add BlockReduce benchmark - #11755

Merged
bernhardmgruber merged 2 commits into
NVIDIA:mainfrom
fbusato:block-reduce-benchmark
Sep 30, 2026
Merged

bernhardmgruber merged 2 commits into
NVIDIA:mainfrom
fbusato:block-reduce-benchmark

Conversation

@fbusato

@fbusato fbusato commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Description

Fixes #11754

Considering [QA agent] findings, I'm start worrying about the maintainability of having 4 different algorithms/implementation for BlockReduce. The first step to understand if we can get rid of something is to benchmark them.

@fbusato
fbusato requested a review from a team as a code owner September 29, 2026 23:03
@fbusato fbusato added this to CCCL Sep 29, 2026
@github-project-automation github-project-automation Bot moved this to Todo in CCCL Sep 29, 2026
@coderabbitai

coderabbitai Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: NVIDIA/cccl/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 2ad9ac12-f18a-410c-91f8-e8da1728bb84

📥 Commits

Reviewing files that changed from the base of the PR and between e87214e and bef35a7.

📒 Files selected for processing (1)
  • cub/benchmarks/bench/reduce/block_reduce_sum.cu
🚧 Files skipped from review as they are similar to previous changes (1)
  • cub/benchmarks/bench/reduce/block_reduce_sum.cu

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 10 remain after this review.


📝 Summary

Summary by CodeRabbit

  • Tests
    • Added benchmark coverage for block-level sum reductions across integer and floating-point types, multiple reduction strategies, and supported block sizes.
    • Benchmarks support latency-focused and throughput-focused modes, using a single block or an occupancy-based grid respectively.
    • Benchmarks skip unsupported configurations, including block sizes that cannot run and certain types that are incompatible with a reduction strategy.

Walkthrough

The pull request adds an NVBench benchmark for CUB BlockReduce. It covers supported integer and floating-point types, four reduction algorithms, block sizes from 64 to 1024, and throughput and latency modes.

Changes

BlockReduce benchmark

Layer / File(s) Summary
Types and reduction action
cub/benchmarks/bench/reduce/block_reduce_sum.cu
Defines supported types and algorithms. Adds a reduction action that uses shared temporary storage and synchronizes before reuse.
Dispatch and benchmark configuration
cub/benchmarks/bench/reduce/block_reduce_sum.cu
Registers type, algorithm, block-size, and mode axes. Dispatches supported block sizes and types, and selects launch size based on occupancy and mode.

Assessment against linked issues

Objective Addressed Explanation
Provide a device-side BlockReduce benchmark for throughput and latency to evaluate its four algorithms [#11754] ✅

Suggested reviewers: bernhardmgruber

Priority: ⬇️ Low

Change: Other

Merge Risk: 🔵 Low · up to bef35

The benchmark still feeds unspecified non-leader results into later reductions, weakening comparisons between algorithms. Define those inputs before relying on its measurements; the demonstrated impact is confined to benchmark workload correctness.


Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 2


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: NVIDIA/cccl/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 2d000222-9531-4451-a548-69e6f65fb778

📥 Commits

Reviewing files that changed from the base of the PR and between 038f78b and e87214e.

📒 Files selected for processing (1)
  • cub/benchmarks/bench/reduce/block_reduce_sum.cu

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.

@github-actions

Copy link
Copy Markdown
Contributor

🥳 CI Workflow Results

🟩 Finished in 1h 49m: Pass: 100%/133 | Total: 3d 00h | Max: 1h 49m | Hits: 69%/183921

See results here.

@bernhardmgruber
bernhardmgruber merged commit 55fc35c into NVIDIA:main Sep 30, 2026
163 checks passed
@fbusato fbusato mentioned this pull request Oct 13, 2026
19 of 27 tasks
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.

[FEA]: Provide BlockReduce benchmarks

2 participants