Skip to content

Fix undefined TUNE_LOAD_ALGORITHM in scan benchmark .variant builds#10212

Open
gonidelis wants to merge 1 commit into
NVIDIA:mainfrom
gonidelis:scan_tuning_bug
Open

Fix undefined TUNE_LOAD_ALGORITHM in scan benchmark .variant builds#10212
gonidelis wants to merge 1 commit into
NVIDIA:mainfrom
gonidelis:scan_tuning_bug

Conversation

@gonidelis

@gonidelis gonidelis commented Jul 23, 2026

Copy link
Copy Markdown
Member

cub/benchmarks/bench/scan/policy_selector.h consumes TUNE_LOAD_ALGORITHM/TUNE_LOAD_MODIFIER/TUNE_STORE_ALGORITHM, but sum.cu's %RANGE% axes only define TUNE_TRANSPOSE/TUNE_LOAD. The translation block every other lookback bench carries (partition, select, by_key) is missing from the scan chain.

That results for every scan.exclusive.sum variant build to fail with "identifier TUNE_LOAD_ALGORITHM is undefined". The scan tuning is broken upstream on every architecture. This is invisible in CI because .variant targets are never built there which is something that has led to other problems in the past.

I ran a dummy tuning to verify that the fix works since no tests exist.

(cccl) root ➜ /src/fixtest/cccl (scan_tuning_bug) $  CIQ_GPU=0 CIQ_POOL=32 CIQ_GENERATIONS=1 python3 /src/compileiq_search.py \
    -R '^cub\.bench\.scan\.exclusive\.sum$' -a 'T{ct}=I32' -a 'OffsetT{ct}=I32' \
    -DCMAKE_CUDA_ARCHITECTURES=native
cmake ../.. -DCUB_ENABLE_BENCHMARKS=YES -DCUB_ENABLE_TUNING=YES -DCCCL_ENABLE_THRUST=OFF -DCCCL_ENABLE_LIBCUDACXX=OFF -DCCCL_ENABLE_CUB=ON -DCCCL_ENABLE_TESTING=OFF -DCUB_ENABLE_DIALECT_CPP11=OFF -DCUB_ENABLE_DIALECT_CPP14=OFF -DCUB_ENABLE_DIALECT_CPP17=ON -DCUB_ENABLE_DIALECT_CPP20=OFF -DTHRUST_IGNORE_DEPRECATED_CPP_DIALECT=ON -DCUB_ENABLE_RDC_TESTS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_CUDA_ARCHITECTURES=native
 ctk:  13.4.46
cccl:  monorepo-5367-g0bfeaa0611
Driver-side probe evaluation: {'ipt': 7, 'tpb': 128, 'ns': 0, 'dcid': 0, 'l2w': 0, 'trp': 0, 'ld': 0}
cub.bench.scan.exclusive.sum.ipt_7.tpb_128.ns_0.dcid_0.l2w_0.trp_0.ld_0 0.4714180865641916
Probe score: 0.4714180865641916

ping @bernhardmgruber

@gonidelis
gonidelis requested a review from a team as a code owner July 23, 2026 17:17
@github-project-automation github-project-automation Bot moved this to Todo in CCCL Jul 23, 2026
@cccl-authenticator-app cccl-authenticator-app Bot moved this from Todo to In Review in CCCL Jul 23, 2026
@gonidelis gonidelis changed the title Fix undefined TUNE_LOAD_ALGORITHM in scan benchmark variant builds Fix undefined TUNE_LOAD_ALGORITHM in scan benchmark .variant builds Jul 23, 2026
@coderabbitai

coderabbitai Bot commented Jul 23, 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: 8ed4d3e6-fe59-47d1-b79f-1933126466ff

📥 Commits

Reviewing files that changed from the base of the PR and between 210d788 and 0bfeaa0.

📒 Files selected for processing (1)
  • cub/benchmarks/bench/scan/policy_selector.h

📝 Walkthrough

Summary by CodeRabbit

  • Performance Improvements
    • Improved scan performance tuning for configurations that do not use lookahead.
    • Memory loading and storing strategies are now selected more effectively across supported configurations.
    • No user-facing API or behavior changes are expected.

Walkthrough

Changes

Scan tuning

Layer / File(s) Summary
Non-lookahead policy tuning
cub/benchmarks/bench/scan/policy_selector.h
Defines algorithm and load-modifier macros from TUNE_TRANSPOSE and TUNE_LOAD for non-lookahead scan policy construction.

Suggested reviewers: bernhardmgruber


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

@github-actions

Copy link
Copy Markdown
Contributor

😬 CI Workflow Results

🟥 Finished in 2h 43m: Pass: 99%/242 | Total: 12d 05h | Max: 2h 38m | Hits: 16%/920258

See results here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Review

Development

Successfully merging this pull request may close these issues.

1 participant