Function rcudnn::cudaStreamGetCaptureInfo_v2[][src]

pub unsafe extern "C" fn cudaStreamGetCaptureInfo_v2(
    stream: *mut CUstream_st,
    captureStatus_out: *mut cudaStreamCaptureStatus,
    id_out: *mut u64,
    graph_out: *mut *mut CUgraph_st,
    dependencies_out: *mut *const *mut CUgraphNode_st,
    numDependencies_out: *mut usize
) -> cudaError
Expand description

\brief Query a stream’s capture state (11.3+)

Query stream state related to stream capture.

If called on ::cudaStreamLegacy (the “null stream”) while a stream not created with ::cudaStreamNonBlocking is capturing, returns ::cudaErrorStreamCaptureImplicit.

Valid data (other than capture status) is returned only if both of the following are true:

  • the call returns cudaSuccess
  • the returned capture status is ::cudaStreamCaptureStatusActive

This version of cudaStreamGetCaptureInfo is introduced in CUDA 11.3 and will supplant the previous version ::cudaStreamGetCaptureInfo in 12.0. Developers requiring compatibility across minor versions to CUDA 11.0 (driver version 445) can do one of the following:

  • Use the older version of the API, ::cudaStreamGetCaptureInfo
  • Pass null for all of \p graph_out, \p dependencies_out, and \p numDependencies_out.

\param stream - The stream to query \param captureStatus_out - Location to return the capture status of the stream; required \param id_out - Optional location to return an id for the capture sequence, which is unique over the lifetime of the process \param graph_out - 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 ::cudaStreamEndCapture. 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 at ::cudaStreamEndCapture due to direct actions on the graph do not trigger ::cudaErrorStreamCaptureUnjoined. \param dependencies_out - 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 end of capture. 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. \param numDependencies_out - Optional location to store the size of the array returned in dependencies_out.

\return ::cudaSuccess, ::cudaErrorInvalidValue, ::cudaErrorStreamCaptureImplicit \note_graph_thread_safety \notefnerr

\sa ::cudaStreamGetCaptureInfo, ::cudaStreamBeginCapture, ::cudaStreamIsCapturing, ::cudaStreamUpdateCaptureDependencies