Skip to content

Make DeviceTransform easier to tune - #11241

Merged
bernhardmgruber merged 4 commits into
NVIDIA:mainfrom
bernhardmgruber:tune_transform
Sep 10, 2026
Merged

bernhardmgruber merged 4 commits into
NVIDIA:mainfrom
bernhardmgruber:tune_transform

Conversation

@bernhardmgruber

@bernhardmgruber bernhardmgruber commented Sep 7, 2026 •

Copy link
Copy Markdown
Contributor

The PR currently shows how I would imagine to tune DeviceTransform. We have a benchmark not suitable for tuning, and another one per backend algorithm that should only be used for tuning (it's identical to the main benchmark file when not in tuning mode).

Fixes: #7262
Fixes: #7507

@copy-pr-bot

copy-pr-bot Bot commented Sep 7, 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.

@github-project-automation github-project-automation Bot moved this to Todo in CCCL Sep 7, 2026
@cccl-authenticator-app cccl-authenticator-app Bot moved this from Todo to In Progress in CCCL Sep 7, 2026
@bernhardmgruber
bernhardmgruber marked this pull request as ready for review September 7, 2026 15:28
@bernhardmgruber
bernhardmgruber requested a review from a team as a code owner September 7, 2026 15:28
@cccl-authenticator-app cccl-authenticator-app Bot moved this from In Progress to In Review in CCCL Sep 7, 2026
@bernhardmgruber
bernhardmgruber requested a review from a team as a code owner September 7, 2026 15:29
@bernhardmgruber

Copy link
Copy Markdown
Contributor Author

@gonidelis I believe after this change we can tune transform.

@coderabbitai

coderabbitai Bot commented Sep 7, 2026 •

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 1716f451-add2-41f1-8ded-10e84f9b426d

📥 Commits

Reviewing files that changed from the base of the PR and between 1f5807f and 6d19550.

📒 Files selected for processing (8)
  • cub/benchmarks/bench/transform/README.md
  • cub/benchmarks/bench/transform/babelstream.cu
  • cub/benchmarks/bench/transform/babelstream.h
  • cub/benchmarks/bench/transform/babelstream.prefetch.cu
  • cub/benchmarks/bench/transform/babelstream.ublkcp.cu
  • cub/benchmarks/bench/transform/babelstream.vectorized.cu
  • cub/benchmarks/bench/transform/common.h
  • cub/benchmarks/bench/transform/fill.cu
🚧 Files skipped from review as they are similar to previous changes (7)
  • cub/benchmarks/bench/transform/README.md
  • cub/benchmarks/bench/transform/babelstream.prefetch.cu
  • cub/benchmarks/bench/transform/babelstream.ublkcp.cu
  • cub/benchmarks/bench/transform/fill.cu
  • cub/benchmarks/bench/transform/babelstream.vectorized.cu
  • cub/benchmarks/bench/transform/babelstream.h
  • cub/benchmarks/bench/transform/babelstream.cu

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


📝 Summary

Summary by CodeRabbit

  • New Features

    • Added BabelStream transform benchmarks for mul, add, triad, and nstream operations across multiple numeric types.
    • Added support for aligned and unaligned inputs, configurable data sizes, memory metrics, and out-of-memory handling.
    • Added benchmark configurations for prefetch, vectorized, and hardware-specific tuning scenarios.
  • Documentation

    • Added guidance for configuring, running, and comparing backend-specific transform benchmark results.
  • Benchmark Updates

    • Limited the fill benchmark to vectorized transform tuning options.
    • Added configurable store-vector sizing for applicable tuning scenarios.

Walkthrough

Changes

The PR moves BabelStream workloads into a shared header and adds separate benchmark configurations for prefetch, ublkcp, and vectorized cub::DeviceTransform tuning. The fill benchmark now targets only the vectorized implementation.

BabelStream DeviceTransform tuning

Layer / File(s) Summary
Shared BabelStream workloads
cub/benchmarks/bench/transform/babelstream.h
The shared header defines typed mul, add, triad, and nstream benchmarks with alignment controls, configurable sizes, memory metrics, and allocation handling.
Backend-specific tuning configurations
cub/benchmarks/bench/transform/babelstream.cu, cub/benchmarks/bench/transform/babelstream.prefetch.cu, cub/benchmarks/bench/transform/babelstream.ublkcp.cu, cub/benchmarks/bench/transform/babelstream.vectorized.cu, cub/benchmarks/bench/transform/fill.cu, cub/benchmarks/bench/transform/common.h, cub/benchmarks/bench/transform/README.md
The benchmark sources separate tuning parameters by implementation. The ublkcp configuration maps the store-vector tuning value. The documentation describes the shared header, backend-specific files, and result comparison workflow.

Assessment against linked issues

Objective Addressed Explanation
Enable tuning of non-vectorized DeviceTransform algorithms without invalid parameter combinations [#7262] ✅
Tune DeviceTransform across multiply, add, triad, and nstream workloads [#7507] ✅
Evaluate relevant data types and GPU architectures, including sm80, sm90, sm100, and sm120 [#7507] ❓ The changes add multiple data types and an SM90+ ublkcp configuration, but they do not show explicit coverage for all listed architectures or sm120.

Priority: ➖ Normal

Severity of issue fixed: Medium

Merge Risk: ⚪ Minimal · up to 6d195

This change refactors BabelStream DeviceTransform benchmarks into shared workloads and adds backend-specific tuning configurations. No concrete correctness, runtime, or deployment risk remains identified for merge.


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

@github-actions

This comment has been minimized.

@bernhardmgruber bernhardmgruber changed the title Make DeviceTransform tunable Make DeviceTransform easier to tune Sep 7, 2026

@NaderAlAwar NaderAlAwar 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.

Question: is ldgsts ommitted on purpose?

Comment thread cub/benchmarks/bench/transform/fill.cu Resolved
@bernhardmgruber

Copy link
Copy Markdown
Contributor Author

Question: is ldgsts ommitted on purpose?

Yes. In practice we want to bulk copy when the GPU supports it and otherwise vectorize.

@coderabbitai

coderabbitai Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

🥳 CI Workflow Results

🟩 Finished in 2h 58m: Pass: 100%/127 | Total: 7d 17h | Max: 2h 58m | Hits: 23%/496297

See results here.

@bernhardmgruber
bernhardmgruber merged commit 397a667 into NVIDIA:main Sep 10, 2026
156 checks passed
@github-project-automation github-project-automation Bot moved this from In Review to Done in CCCL Sep 10, 2026
@bernhardmgruber
bernhardmgruber deleted the tune_transform branch September 10, 2026 07:56
kaatish pushed a commit to kaatish/cccl that referenced this pull request Sep 11, 2026
charan-003 pushed a commit to charan-003/cccl that referenced this pull request Sep 15, 2026
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.

Tune cub::DeviceTransform Tuning cub::DeviceTransform does not pick algorithms other than the vectorized code path

2 participants