Skip to content

[CUB] Only use compiled compute capabilities in the radix_sort_runs_on tests - #12155

Closed
SUKUNA-AI wants to merge 1 commit into
NVIDIA:mainfrom
SUKUNA-AI:fix/cub-radix-sort-runs-on-single-arch
Closed

SUKUNA-AI wants to merge 1 commit into
NVIDIA:mainfrom
SUKUNA-AI:fix/cub-radix-sort-runs-on-single-arch

Conversation

@SUKUNA-AI

Copy link
Copy Markdown
Contributor

Description

closes #12154

Two test cases in cub/test/catch2_test_device_radix_sort_runs_on.cu (added in #10998) passed RunsOn a hard-coded compute capability:

  • "Device radix sort queries storage with a mismatched runs_on capability": 8.0, or 9.0 when the device is 8.0.
  • "Device radix sort queries storage with runs_on and no device allocations": 7.5 and 9.0.

dispatch_to_cc_list asserts that the capability is one of cuda::__target_compute_capabilities(). So in a single-architecture build both test cases abort. The [CTK13.4 GCC16 C++23] HostLaunch(amd64, RTXA6000): sm{86} job fails this way on unrelated PRs, for example #12131 and #12138.

This PR takes the capabilities from cuda::__target_compute_capabilities():

  • The mismatch case uses the first compiled capability that differs from the device's. If the build has only one capability, there is nothing to mismatch, so the test case returns early (SKIP() is not available yet, same pattern as catch2_test_device_radix_sort_keys.cu).
  • The storage query case runs once per compiled capability. With the default all-major-cccl list (75, 80, 90, 100, 120) this still covers 7.5 and 9.0.

Testing

cub.test.device.radix_sort_runs_on.lid_0, cub-lid0 preset, nvcc 13.4.59, gcc 16.2.1, C++17, RTX 5070 Ti (sm_120):

CMAKE_CUDA_ARCHITECTURES before after
86 both test cases abort with the dispatch_to_cc_list assertion 6/6 test cases pass; the mismatch case returns early
75;90;120 6/6 pass; the mismatch case queries 7.5 on the sm_120 device; storage queries for 7.5, 9.0 and 12.0
86;120 6/6 pass

I could not build the C++23 configuration locally: nvcc 13.4.59 rejects gcc 16.2's <string> in C++23 mode. The change does not depend on the dialect.

Checklist

  • New or existing tests cover these changes. (This changes the tests themselves.)
  • The documentation is up to date with these changes. (Test-only change.)

…n tests

Two test cases passed RunsOn a hard-coded compute capability (8.0 or
9.0, and 7.5 and 9.0). dispatch_to_cc_list asserts that the capability
is one the binary was compiled for, so both test cases aborted in
single-architecture builds such as CMAKE_CUDA_ARCHITECTURES=86.

Take the capabilities from cuda::__target_compute_capabilities()
instead, and skip the mismatch case when the build has only one.
@SUKUNA-AI
SUKUNA-AI requested a review from a team as a code owner October 22, 2026 06:35
@SUKUNA-AI
SUKUNA-AI requested a review from fbusato October 22, 2026 06:35
@copy-pr-bot

copy-pr-bot Bot commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@coderabbitai

coderabbitai Bot commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

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: ecc01b20-d8e8-49dc-ac51-315e645e9e93
📥 Commits

Reviewing files that changed from the base of the PR and between e6548e6 and dee55f3.

📒 Files selected for processing: 1
  • cub/test/catch2_test_device_radix_sort_runs_on.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.

📝 Summary

Summary by CodeRabbit

  • Tests
    • Updated device capability coverage for storage-query tests, including selection of a mismatched capability when available.

The storage-query tests now use compute capabilities compiled into the binary. The mismatched-capability test returns when no different compiled capability is available.

Changes: Radix sort storage-query tests

Layer / File(s) Summary
Select compiled capabilities
cub/test/catch2_test_device_radix_sort_runs_on.cu
The mismatch test selects a compiled capability different from the current device and returns if none exists. The no-device-allocation test generates capability cases from the compiled target list. The item-count cases remain 1 and 100,000.

Assessment against linked issues

Objective Addressed Explanation
Use only compiled capabilities in the storage-query tests and skip the mismatch case when no second capability exists [#12154] ✅

Possibly related issues

Suggested reviewers: jacobfaib

Priority: ➖ Normal

Change: Bug fix · Severity of issue fixed: Medium

Merge Risk: ⚪ Minimal · up to dee55

No actionable merge-blocking risk remains in the reviewed test changes.

- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@Jacobfaib Jacobfaib closed this Oct 22, 2026
@github-project-automation github-project-automation Bot moved this from In Review to Done in CCCL Oct 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[BUG]: cub.test.device.radix_sort_runs_on.lid_0 aborts in single-architecture builds

2 participants