test(cuda.core): cover PDL same-stream overlap via GraphBuilder capture - #2524
test(cuda.core): cover PDL same-stream overlap via GraphBuilder capture#2524lijinf2 wants to merge 11 commits into
Conversation
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.
7ebea54 to
4ca415b
Compare
|
/ok to test 4ca415b |
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.
|
/ok to test fdfdf8b |
|
| return mod.get_kernel("primary_kernel"), mod.get_kernel("secondary_kernel") | ||
|
|
||
|
|
||
| def run_pdl_overlap_check(device, *, via_graph: bool = False): |
There was a problem hiding this comment.
Why do we need to test with graph launch? This seems like an additional requirement for programmatic stream.
There was a problem hiding this comment.
Yeah, that is a request in #1334
per "PDL launches are graph-compatible and this use case should be tested and showcased"
| mod = compile_common_kernels() | ||
| producer = mod.get_kernel("add_one") | ||
| consumer = mod.get_kernel("add_one") |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Yeah, here just needs two dummy kernels as input so that we can check things in _assert_programmatic_dependency_edge.
Renamed to dummy_kernel.
fdfdf8b to
2e0d2e6
Compare
…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.
|
/ok to test 8f922e6 |
Description
close #1334
programmatic_stream_serialization: programmatic dependency-edge mapping and same-stream primary/secondary overlap (Hopper+, opportunistic → xfail).helpers/pdl_kernels.pyso direct and graph-capture paths stay in sync.Checklist