cuda.bindings._v2.driver.stream_is_capturing#

cuda.bindings._v2.driver.stream_is_capturing(intptr_t h_stream) → int#

Returns a stream’s capture status.

Return the capture status of h_stream via capture_status. After a successful call, *capture_status will contain one of the following:.

  • CU_STREAM_CAPTURE_STATUS_NONE: The stream is not capturing.

  • CU_STREAM_CAPTURE_STATUS_ACTIVE: The stream is capturing.

  • CU_STREAM_CAPTURE_STATUS_INVALIDATED: The stream was capturing but an error has invalidated the capture sequence. The capture sequence must be terminated with cuStreamEndCapture on the stream where it was initiated in order to continue using h_stream.

Note that, if this is called on CU_STREAM_LEGACY (the “null stream”) while a blocking stream in the same context is capturing, it will return CUDA_ERROR_STREAM_CAPTURE_IMPLICIT and *capture_status is unspecified after the call. The blocking stream capture is not invalidated. When a blocking stream is capturing, the legacy stream is in an unusable state until the blocking stream capture is terminated. The legacy stream is not supported for stream capture, but attempted use would have an implicit dependency on the capturing stream(s).

Parameters:

h_stream (intptr_t) – Stream to query.

Returns:

Returns the stream’s capture status.

Return type:

int

See also

cuStreamIsCapturing