is_current_stream_capturing
- paddle.device. is_current_stream_capturing ( ) bool [source]
-
Check whether the current stream is in CUDA graph capturing state.
- Returns
-
True if the current stream is capturing, False otherwise.
- Return type
-
bool
Examples
>>> import paddle >>> if paddle.device.is_available(): ... graph = paddle.device.cuda.graphs.CUDAGraph() ... graph.capture_begin() ... print(paddle.device.is_current_stream_capturing()) # True ... graph.capture_end()
