Skip to content

Improve tuning introduction docs - #9661

Merged
bernhardmgruber merged 3 commits into
NVIDIA:mainfrom
bernhardmgruber:tune_docs
Jul 2, 2026
Merged

bernhardmgruber merged 3 commits into
NVIDIA:mainfrom
bernhardmgruber:tune_docs

Conversation

@bernhardmgruber

@bernhardmgruber bernhardmgruber commented Jul 1, 2026 •

Copy link
Copy Markdown
Contributor

Note to reviewers: The diff looks a bit large, but I basically renamed tuning.rst -> tuning-_infra.rst

Fixes: #8731

@bernhardmgruber
bernhardmgruber requested review from a team as code owners July 1, 2026 09:28
@bernhardmgruber
bernhardmgruber requested a review from fbusato July 1, 2026 09:28
@bernhardmgruber
bernhardmgruber requested a review from wmaxey July 1, 2026 09:28
@github-project-automation github-project-automation Bot moved this to Todo in CCCL Jul 1, 2026
@cccl-authenticator-app cccl-authenticator-app Bot moved this from Todo to In Review in CCCL Jul 1, 2026
@coderabbitai

coderabbitai Bot commented Jul 1, 2026 •

Copy link
Copy Markdown
Contributor

Review 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: cb01d08e-bab1-484a-9e45-b3ae0e2474e8

📥 Commits

Reviewing files that changed from the base of the PR and between 812a355 and 706f960.

📒 Files selected for processing (2)
  • docs/cub/tuning.rst
  • docs/cub/tuning_infra.rst
✅ Files skipped from review due to trivial changes (1)
  • docs/cub/tuning_infra.rst
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs/cub/tuning.rst

📝 Walkthrough

Summary by CodeRabbit

  • Documentation
    • Added a new CUB guide for the automated tuning infrastructure, covering key concepts, benchmark authoring, the search/analyze workflow, and verification.
    • Reworked CUB tuning documentation to focus on device-scope policy selectors, including how to define and pass them to CUB algorithms.
    • Updated CUB documentation navigation and cross-references to point to the new tuning infrastructure guide.
    • Removed the previously standalone policy selectors page and updated related references.

Walkthrough

Docs-only changes split CUB tuning content into a policy-selector guide and a separate tuning-infrastructure guide, removed the standalone policy-selectors page, and updated cross-references and navigation to the new page layout.

Changes

Tuning documentation restructuring

Layer / File(s) Summary
Policy selector guide rewrite
docs/cub/tuning.rst, docs/cub/policy_selectors.rst
tuning.rst now focuses on defining and passing policy selectors via cuda::execution::tune(...); policy_selectors.rst content was removed.
New tuning infrastructure guide
docs/cub/tuning_infra.rst
New page covers tuning terminology, benchmark authoring, search, analysis, policy updates, and verification.
Cross-reference and navigation updates
docs/cub/benchmarking.rst, docs/cub/developer/device_scope.rst, docs/cub/index.rst, nvbench_helper/nvbench_helper/nvbench_helper.cuh
Updates doc links and toctree entries to reference tuning_infra and removes the old policy_selectors entry.

Assessment against linked issues

Objective Addressed Explanation
Reorganize tuning docs to focus on user-facing custom tuning / policy selectors (#8731) ✅
Move detailed tuning-process content into a separate infrastructure guide (#8731) ✅

Suggested reviewers: alliepiper, NaderAlAwar, miscco


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: 3


ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: d269bcb9-f8bb-4b95-a60c-1668336fcb8c

📥 Commits

Reviewing files that changed from the base of the PR and between 7154c0b and 812a355.

📒 Files selected for processing (7)
  • docs/cub/benchmarking.rst
  • docs/cub/developer/device_scope.rst
  • docs/cub/index.rst
  • docs/cub/policy_selectors.rst
  • docs/cub/tuning.rst
  • docs/cub/tuning_infra.rst
  • nvbench_helper/nvbench_helper/nvbench_helper.cuh
💤 Files with no reviewable changes (1)
  • docs/cub/policy_selectors.rst

Comment thread docs/cub/tuning_infra.rst
Comment on lines +142 to +158
#if !TUNE_BASE
template <typename T>
struct policy_selector {
_CCCL_HOST_DEVICE_API constexpr auto operator()(cuda::compute_capability /*cc*/) const -> cub::ReducePolicy {
const auto [items, threads] = cub::detail::scale_mem_bound(
TUNE_THREADS_PER_BLOCK, TUNE_ITEMS_PER_THREAD, sizeof(T));
const auto policy = cub::detail::agent_reduce_policy{
.threads_per_block = threads,
.items_per_thread = items,
.vector_load_length = 1 << TUNE_ITEMS_PER_VEC_LOAD_POW2,
.block_algorithm = cub::BLOCK_REDUCE_WARP_REDUCTIONS,
.load_modifier = cub::LOAD_DEFAULT
};
return {policy, policy, policy, policy};
}
};
#endif

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.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

important: Define the missing tuning macro in the example.

TUNE_ITEMS_PER_VEC_LOAD_POW2 is used in the selector but never introduced by the surrounding %RANGE% comments, so this code block is not self-contained. Add the missing macro definition or remove the reference.

As per path instructions, docs/**/*: focus on technical accuracy and buildable examples.

Source: Path instructions

Comment thread docs/cub/tuning_infra.rst Resolved
Comment thread docs/cub/tuning.rst Resolved
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

🥳 CI Workflow Results

🟩 Finished in 2h 16m: Pass: 100%/37 | Total: 8h 40m | Max: 55m 16s | Hits: 83%/30211

See results here.

@bernhardmgruber
bernhardmgruber merged commit e5c3e0e into NVIDIA:main Jul 2, 2026
55 of 56 checks passed
@bernhardmgruber
bernhardmgruber deleted the tune_docs branch July 2, 2026 08:36
@github-project-automation github-project-automation Bot moved this from In Review to Done in CCCL Jul 2, 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.

Streamline the tuning documentation

2 participants