Skip to content

Document env-overload testing conventions in CUB test guide - #11488

Merged
bernhardmgruber merged 4 commits into
NVIDIA:mainfrom
bernhardmgruber:docs/cub-env-test-checklist
Sep 23, 2026
Merged

bernhardmgruber merged 4 commits into
NVIDIA:mainfrom
bernhardmgruber:docs/cub-env-test-checklist

Conversation

@bernhardmgruber

@bernhardmgruber bernhardmgruber commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Documents in docs/cub/developer/test_overview.rst that every CUB device-wide algorithm must expose a two-phase and a single-phase overload (both taking an environment last), and where each kind of test for them belongs: functional tests in catch2_test_device_xxx.cu via the two-phase API, environment-interaction tests in catch2_test_device_xxx_env.cu via the single-phase API only. Adds a recommended minimum checklist of env-interaction tests for new overloads, derived from reviewing the existing catch2_test_device_*_env.cu files.

🤖 Generated with Claude Code

Add a section to test_overview.rst describing the two-phase/single-phase
API overload split, where each kind of test belongs, and a minimum
checklist for env-interaction tests on a new single-phase overload.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
@bernhardmgruber
bernhardmgruber requested a review from a team as a code owner September 18, 2026 13:35
@github-project-automation github-project-automation Bot moved this to Todo in CCCL Sep 18, 2026
@cccl-authenticator-app cccl-authenticator-app Bot moved this from Todo to In Review in CCCL Sep 18, 2026
@coderabbitai

coderabbitai Bot commented Sep 18, 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: deda0e77-e26d-4ae1-ab75-7ad4e659b6b9

📥 Commits

Reviewing files that changed from the base of the PR and between 902989a and 13a2069.

📒 Files selected for processing (1)
  • docs/cub/developer/test_overview.rst
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs/cub/developer/test_overview.rst

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


📝 Summary

Summary by CodeRabbit

  • Documentation
    • Added guidance for testing environment-aware CUB APIs.
    • Documented when to use functional device tests versus environment-specific test files.
    • Added a checklist covering default environments, allocation sizing, custom streams, tuning, determinism, and operator or predicate combinations.
    • Clarified that the checklist applies across all API variants.
    • Added requirements for minimal default-environment examples and output verification.

Walkthrough

The test overview defines test placement and coverage for environment-aware CUB APIs. It separates two-phase functional device tests from single-phase environment-interaction tests.

Changes

CUB testing guidance

Layer / File(s) Summary
Environment-aware test coverage
docs/cub/developer/test_overview.rst
Documents test placement for two-phase and single-phase environment-aware APIs. The checklist covers default environments, allocation sizing, custom streams, tuning, determinism, operators, predicates, and API variants.

Suggested reviewers: bdice

Priority: ⬇️ Low

Change: Other

Merge Risk: 🔵 Low · up to 13a20

The guidance can allow custom-stream tests that miss a default-stream fallback. This is a narrow test-coverage documentation gap and can be addressed in follow-up.


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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: ed4199f3-fe44-4496-82ab-9224ef59333b

📥 Commits

Reviewing files that changed from the base of the PR and between 6ffbe33 and 2048649.

📒 Files selected for processing (1)
  • docs/cub/developer/test_overview.rst

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

Comment thread docs/cub/developer/test_overview.rst Resolved
Comment thread docs/cub/developer/test_overview.rst Resolved
``expected_allocation_size(...)`` is honored: the algorithm neither over- nor under-allocates
temporary storage compared to the two-phase API.
3. ``"<algorithm> uses custom stream"`` — passing a ``cuda::stream_ref`` (e.g. obtained from
``c2h::make_current_device_stream()``) as custom environment is honored: the algorithm's work

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New function is proposed here: #11491

SamMausberg added a commit to SamMausberg/cccl that referenced this pull request Sep 22, 2026
Adds the missing "uses custom stream" tests for SortKeys, StableSortPairs
and SortPairsCopy and switches the SortPairs and StableSortKeys ones to a
stream_ref from c2h::make_current_device_stream(), so all seven variants
follow the checklist from NVIDIA#11488. The SortPairs tuning test now uses the
launch wrapper under the same guard as the other six. The legacy stream
test keeps only the nullptr form.

Developed in combination with Claude Fable 5.1
@bernhardmgruber
bernhardmgruber merged commit 1bc96e6 into NVIDIA:main Sep 23, 2026
34 checks passed
@bernhardmgruber
bernhardmgruber deleted the docs/cub-env-test-checklist branch September 23, 2026 06:57
@github-project-automation github-project-automation Bot moved this from In Review to Done in CCCL Sep 23, 2026
SamMausberg added a commit to SamMausberg/cccl that referenced this pull request Sep 24, 2026
Adds the missing "uses custom stream" tests for SortKeys, StableSortPairs
and SortPairsCopy and switches the SortPairs and StableSortKeys ones to a
stream_ref from c2h::make_current_device_stream(), so all seven variants
follow the checklist from NVIDIA#11488. The SortPairs tuning test now uses the
launch wrapper under the same guard as the other six. The legacy stream
test keeps only the nullptr form.

Developed in combination with Claude Fable 5.1
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.

2 participants