cuda.bindings._v2.driver.stream_get_capture_info_v3#
- cuda.bindings._v2.driver.stream_get_capture_info_v3(intptr_t h_stream) tuple#
Query a stream’s capture state.
Query stream state related to stream capture. If called on
CU_STREAM_LEGACY(the “null stream”) while a stream not created withCU_STREAM_NON_BLOCKINGis capturing, returnsCUDA_ERROR_STREAM_CAPTURE_IMPLICIT. Valid data (other than capture status) is returned only if both of the following are true:.the call returns CUDA_SUCCESS.
the returned capture status is
CU_STREAM_CAPTURE_STATUS_ACTIVE.
If
edge_data_outis non-NULL thendependencies_outmust be as well. Ifdependencies_outis non-NULL andedge_data_outis NULL, but there is non-zero edge data for one or more of the current stream dependencies, the call will returnCUDA_ERROR_LOSSY_QUERY.- Parameters:
h_stream (intptr_t) – The stream to query.
- Returns:
- int: Location to return the capture status of the stream;
required.
- uint64_t: Optional location to return an id for the capture
sequence, which is unique over the lifetime of the process.
- intptr_t: Optional location to return the graph being captured
into. All operations other than destroy and node removal are permitted on the graph while the capture sequence is in progress. This API does not transfer ownership of the graph, which is transferred or destroyed at
cuStreamEndCapture. Note that the graph handle may be invalidated before end of capture for certain errors. Nodes that are or become unreachable from the original stream atcuStreamEndCapturedue to direct actions on the graph do not triggerCUDA_ERROR_STREAM_CAPTURE_UNJOINED.
- intptr_t: Optional location to store a pointer to an array of
nodes. The next node to be captured in the stream will depend on this set of nodes, absent operations such as event wait which modify this set. The array pointer is valid until the next API call which operates on the stream or until the capture is terminated. The node handles may be copied out and are valid until they or the graph is destroyed. The driver- owned array may also be passed directly to APIs that operate on the graph (not the stream) without copying.
- CUgraphEdgeData: Optional location to store a pointer to an array
of graph edge data. This array parallels
dependencies_out; the next node to be added has an edge todependencies_out[i] with annotationedge_data_out[i] for eachi. The array pointer is valid until the next API call which operates on the stream or until the capture is terminated.
- Return type:
A 5-tuple containing
See also
cuStreamGetCaptureInfo_v3