cuda::experimental::places::is_stream_capturing#

inline bool cuda::experimental::places::is_stream_capturing(
cudaStream_t stream
)#

Is stream currently participating in a CUDA graph capture?

Returns false for nullptr (the legacy default stream is never capturing). cudaStreamIsCapturing is itself capture-safe, so this can be called from contexts where most other driver queries (cuStreamGetId, cudaStreamGetDevice, …) would be rejected with cudaErrorStreamCaptureUnsupported and would invalidate the in-flight capture.