Skip to content

[CUB] Support stream-aware launch wrappers - #12265

Closed
oleksandr-pavlyk wants to merge 4 commits into
NVIDIA:pull-request/12263from
oleksandr-pavlyk:launch-helper-and-tests
Closed

oleksandr-pavlyk wants to merge 4 commits into
NVIDIA:pull-request/12263from
oleksandr-pavlyk:launch-helper-and-tests

Conversation

@oleksandr-pavlyk

@oleksandr-pavlyk oleksandr-pavlyk commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Description

This PR is a focused part of #11374 that modifies launch helper macros to support passing execution stream as last argument.

Infer trailing stream-like arguments through cuda::get_stream and preserve ordering with test setup across all launch modes:

  • TEST_LAUNCH=0: forward the supplied stream to the host API and synchronize it before returning. Preserve omitted stream arguments.
  • TEST_LAUNCH=1: synchronize the supplied host stream before launching the parent kernel, invoke the API on the device-side default stream, and wait for device execution to complete.
  • TEST_LAUNCH=2: capture on the supplied non-default stream, or a temporary stream when the default stream is requested. Launch the graph on the requested stream and synchronize it before returning.

Use checked C2H buffers for temporary storage and scalar results. Fix the device-side memory resource to return the allocation's starting offset.

Add stream-forwarding and explicit default-stream tests, and update the launch-wrapper usage documentation.

gated by #12263

Checklist

  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@copy-pr-bot

copy-pr-bot Bot commented Oct 26, 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 Oct 26, 2026
@cccl-authenticator-app cccl-authenticator-app Bot moved this from Todo to In Progress in CCCL Oct 26, 2026
@oleksandr-pavlyk
oleksandr-pavlyk force-pushed the launch-helper-and-tests branch 3 times, most recently from 0d5fcc3 to 9fb2bbc Compare October 28, 2026 18:24
@oleksandr-pavlyk

Copy link
Copy Markdown
Contributor Author

/ok to test 9fb2bbc

@github-actions

This comment has been minimized.

Infer trailing stream-like arguments through cuda::get_stream and preserve
ordering with test setup across all launch modes:

- TEST_LAUNCH=0: forward the supplied stream to the host API and synchronize
  it before returning. Preserve omitted stream arguments.
- TEST_LAUNCH=1: synchronize the supplied host stream before launching the
  parent kernel, invoke the API on the device-side default stream, and
  wait for device execution to complete.
- TEST_LAUNCH=2: capture on the supplied non-default stream, or a temporary
  stream when the default stream is requested. Launch the graph on the
  requested stream and synchronize it before returning.

Use checked C2H buffers for temporary storage and scalar results. Fix the
device-side memory resource to return the allocation's starting offset.

Add stream-forwarding and explicit default-stream tests, and update the
launch-wrapper usage documentation.
@oleksandr-pavlyk

Copy link
Copy Markdown
Contributor Author

/ok to test 93b2bde

@oleksandr-pavlyk

Copy link
Copy Markdown
Contributor Author

/ok to test 47fffd1

@github-actions

Copy link
Copy Markdown
Contributor

🥳 CI Workflow Results

🟩 Finished in 1h 51m: Pass: 100%/137 | Total: 4d 04h | Max: 1h 45m | Hits: 53%/227343

See results here.

@copy-pr-bot
copy-pr-bot Bot deleted the branch NVIDIA:pull-request/12263 November 2, 2026 17:55
@copy-pr-bot copy-pr-bot Bot closed this Nov 2, 2026
@github-project-automation github-project-automation Bot moved this from In Progress to Done in CCCL Nov 2, 2026
@oleksandr-pavlyk
oleksandr-pavlyk deleted the launch-helper-and-tests branch November 2, 2026 18:00
@oleksandr-pavlyk
oleksandr-pavlyk restored the launch-helper-and-tests branch November 2, 2026 18:01
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.

1 participant