Skip to content

cuda.core: add LaunchConfig.programmatic_stream_serialization for programmatic dependent launch - #2456

Merged
isVoid merged 5 commits into
NVIDIA:mainfrom
lijinf2:feat/1334-pdl-launch-config
Aug 6, 2026
Merged

cuda.core: add LaunchConfig.programmatic_stream_serialization for programmatic dependent launch#2456
isVoid merged 5 commits into
NVIDIA:mainfrom
lijinf2:feat/1334-pdl-launch-config

Conversation

@lijinf2

@lijinf2lijinf2 commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Description

Part of #1334

Expose LaunchConfig.programmatic_stream_serialization to set
CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_STREAM_SERIALIZATION, and add mapping plus
Hopper+ primary/secondary overlap tests.

Reference: https://docs.nvidia.com/cuda/cuda-programming-guide/04-special-topics/programmatic-dependent-launch.html

Release notes / Graph showcase will be in next PR.

Checklist

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

…alization
Allow users to set CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_STREAM_SERIALIZATION
through LaunchConfig, matching the is_cooperative attribute pattern (NVIDIA#1334).
Add an end-to-end Hopper+ test that launches primary and secondary kernels
on the same stream with programmatic_stream_serialization, and asserts
overlap only when the PDL attribute is enabled (NVIDIA#1334).
Drop unused secondary sync/sleep from the overlap test, clarify the
primary clock window comment, and print a short success line for CI.
@copy-pr-bot

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.

@lijinf2lijinf2 self-assigned this Jul 30, 2026
@github-actionsgithub-actionsBot added the cuda.core Everything related to the cuda.core module label Jul 30, 2026
@lijinf2lijinf2 added this to the cuda.core 1.2.0 milestone Jul 30, 2026
@lijinf2

Copy link
Copy Markdown
ContributorAuthor

/ok to test d3b3b25

@github-actions

Copy link
Copy Markdown

@lijinf2lijinf2 changed the title cuda.core: add LaunchConfig.programmatic_stream_serialization for programatic dependent launchcuda.core: add LaunchConfig.programmatic_stream_serialization for programmatic dependent launchJul 30, 2026
@lijinf2
lijinf2 marked this pull request as ready for review July 30, 2026 16:30
@lijinf2
lijinf2 requested a review from isVoidJuly 30, 2026 16:31
@lijinf2lijinf2 linked an issue Jul 30, 2026 that may be closed by this pull request
2 tasks
@lijinf2lijinf2 added the feature New feature or request label Jul 30, 2026

@isVoidisVoid 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.

I have one question regarding the test, another small comment for the documentation.

Comment threadcuda_core/cuda/core/_launch_config.pyi
attr.value.cooperative = 1
attrs.append(attr)

if config.programmatic_stream_serialization:

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.

Non blocking Q: I see from the comment to this function "once all modules are cythonized, this function can be dropped in favor of the cdef method above". Are all modules cythonized?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

I have no answer. this cpdef function might still be needed for tests / non-Cython callers.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Just checked codebase. This function is used in tests/test_launcher.py::test_to_native_launch_config_no_cluster, where there is a python caller "from cuda.core._launch_config import _to_native_launch_config"

Comment threadcuda_core/tests/test_launcher.py
@lijinf2

Copy link
Copy Markdown
ContributorAuthor

/ok to test 717fe7f

@isVoidisVoid 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.

lgtm!

@isVoid
isVoid merged commit bf8dc41 into NVIDIA:mainAug 6, 2026
103 checks passed
github-actionsBot pushed a commit that referenced this pull request Aug 7, 2026
Removed preview folders for the following PRs:
- PR #2456
- PR #2491
- PR #2514
- PR #2520
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cuda.coreEverything related to the cuda.core modulefeatureNew feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support programatic dependent launch (PDL)

2 participants

@lijinf2@isVoid