Skip to content

test(cuda.core): cover PDL same-stream overlap via GraphBuilder capture - #2524

Open
lijinf2 wants to merge 11 commits into
NVIDIA:mainfrom
lijinf2:fea/1334-pdl-launch-config-graph
Open

test(cuda.core): cover PDL same-stream overlap via GraphBuilder capture#2524
lijinf2 wants to merge 11 commits into
NVIDIA:mainfrom
lijinf2:fea/1334-pdl-launch-config-graph

Conversation

@lijinf2

@lijinf2 lijinf2 commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Description

close #1334

  • Add GraphBuilder coverage for programmatic_stream_serialization: programmatic dependency-edge mapping and same-stream primary/secondary overlap (Hopper+, opportunistic → xfail).
  • Share the overlap protocol in helpers/pdl_kernels.py so direct and graph-capture paths stay in sync.
  • Tweak 1.2.0 notes to use the runtime PDL attribute name.

Checklist

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

lijinf2 added 2 commits August 6, 2026 19:45
Cover GraphBuilder stream-capture for programmatic_stream_serialization:
functional launch, programmatic dependency edge mapping, and Hopper+
overlap (xfail if opportunistic), plus 1.2.0 release notes.
Refer to cudaLaunchAttributeProgrammaticStreamSerialization instead of
the driver-style CU_LAUNCH_ATTRIBUTE_* spelling.
@copy-pr-bot

copy-pr-bot Bot commented Aug 6, 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.

@lijinf2 lijinf2 self-assigned this Aug 6, 2026
@lijinf2
lijinf2 marked this pull request as draft August 6, 2026 19:50
@lijinf2 lijinf2 changed the title Fea/1334 pdl launch config graph Cover GraphBuilder stream-capture for programmatic dependent launch (PDL) Aug 6, 2026
@lijinf2 lijinf2 added cuda.core Everything related to the cuda.core module CI/CD CI/CD infrastructure labels Aug 6, 2026
@lijinf2 lijinf2 added this to the cuda.core 1.2.0 milestone Aug 6, 2026
@lijinf2
lijinf2 force-pushed the fea/1334-pdl-launch-config-graph branch from 7ebea54 to 4ca415b Compare August 6, 2026 20:01
@lijinf2

lijinf2 commented Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 4ca415b

@lijinf2 lijinf2 changed the title Cover GraphBuilder stream-capture for programmatic dependent launch (PDL) Cover GraphBuilder in programmatic dependent launch (PDL) Aug 7, 2026
lijinf2 added 6 commits August 7, 2026 18:04
The test writes host buffers from np.from_dlpack, which are read-only before NumPy 2.2.5 (GH #28632).
Align with other graph builder tests so context setup and teardown stay consistent.
Drop fragile Programming Guide section numbers and note Driver vs Runtime enum name equivalence at the edge asserts.
Extract kernels and the same-stream / graph-capture overlap check into
run_pdl_overlap_check so launcher and GraphBuilder tests stay in sync.
Both direct and graph-capture paths are same-stream; update names and docs accordingly.
@lijinf2 lijinf2 changed the title Cover GraphBuilder in programmatic dependent launch (PDL) test(cuda.core): cover PDL same-stream overlap via GraphBuilder capture Aug 7, 2026
@lijinf2
lijinf2 marked this pull request as ready for review August 7, 2026 18:58
@lijinf2

lijinf2 commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test fdfdf8b

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown

Comment thread cuda_core/tests/helpers/pdl_kernels.py Outdated
return mod.get_kernel("primary_kernel"), mod.get_kernel("secondary_kernel")


def run_pdl_overlap_check(device, *, via_graph: bool = False):

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.

Why do we need to test with graph launch? This seems like an additional requirement for programmatic stream.

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.

Yeah, that is a request in #1334
per "PDL launches are graph-compatible and this use case should be tested and showcased"

Comment on lines +734 to +736
mod = compile_common_kernels()
producer = mod.get_kernel("add_one")
consumer = mod.get_kernel("add_one")

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.

So... I'm curious. add_one is a simple kernel that doesn't have programmatic dependency like the kernel primary_kernel. Setting programmatic_stream_serialization between for the second launch still create a graph dependency between these two kernels?

@lijinf2 lijinf2 Aug 13, 2026

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.

Yeah, here just needs two dummy kernels as input so that we can check things in _assert_programmatic_dependency_edge.

Renamed to dummy_kernel.

@lijinf2
lijinf2 force-pushed the fea/1334-pdl-launch-config-graph branch from fdfdf8b to 2e0d2e6 Compare August 13, 2026 20:43
…tests

Keep the stream overlap case self-contained in test_launcher, and inline the
graph capture/overlap checks in test_graph_builder so each path stays simple.
Avoid implying an in-kernel producer/consumer dependency; the test only needs two launches for the programmatic edge assert.
@lijinf2

lijinf2 commented Aug 13, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 8f922e6

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

Labels

CI/CD CI/CD infrastructure cuda.core Everything related to the cuda.core module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support programatic dependent launch (PDL)

2 participants