You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Task] Make entities defined by DECLARE_LAUNCH_WRAPPER stream aware #11346
This issue tracks extracting a portion of #10898 that extends the conventional C2H launch helpers with stream-aware execution.
Callables generated by DECLARE_LAUNCH_WRAPPER and DECLARE_TMPL_LAUNCH_WRAPPER accept a stream-like object supported by cuda::get_stream as their first argument. A direct launch(stream, action, ...) API is also provided. The wrapper macros themselves remain unchanged.
The motivation is to support the eventual migration of CUB tests to cuda::buffer, where buffer initialization and algorithm execution must be correctly ordered on a caller-provided stream.
The behavior depends on value of TEST_LAUNCH preprocessor variable test was compiled with:
TEST_LAUNCH == 0: the supplied stream is passed directly to the CUB API.
TEST_LAUNCH == 1: because a host stream handle cannot be used from device code, the supplied stream is synchronized before the CDP launch begins. The CUB API is then invoked device-side using its default stream.
TEST_LAUNCH == 2: the supplied stream is used for the temporary-storage query, CUDA graph capture, graph execution, and synchronization.
Each launch mode is tested independently, including direct launch and wrapper calls using cuda::stream_ref, cudaStream_t, and a custom type exposing get_stream() method.
Environment-based launch wrappers are not changed by this work.
Activity