Function rcudnn::cudaStreamBeginCapture[][src]

pub unsafe extern "C" fn cudaStreamBeginCapture(
    stream: *mut CUstream_st,
    mode: cudaStreamCaptureMode
) -> cudaError
Expand description

\brief Begins graph capture on a stream

Begin graph capture on \p stream. When a stream is in capture mode, all operations pushed into the stream will not be executed, but will instead be captured into a graph, which will be returned via ::cudaStreamEndCapture. Capture may not be initiated if \p stream is ::cudaStreamLegacy. Capture must be ended on the same stream in which it was initiated, and it may only be initiated if the stream is not already in capture mode. The capture mode may be queried via ::cudaStreamIsCapturing. A unique id representing the capture sequence may be queried via ::cudaStreamGetCaptureInfo.

If \p mode is not ::cudaStreamCaptureModeRelaxed, ::cudaStreamEndCapture must be called on this stream from the same thread.

\note Kernels captured using this API must not use texture and surface references. Reading or writing through any texture or surface reference is undefined behavior. This restriction does not apply to texture and surface objects.

\param stream - Stream in which to initiate capture \param mode - Controls the interaction of this capture sequence with other API calls that are potentially unsafe. For more details see ::cudaThreadExchangeStreamCaptureMode.

\return ::cudaSuccess, ::cudaErrorInvalidValue \notefnerr

\sa ::cudaStreamCreate, ::cudaStreamIsCapturing, ::cudaStreamEndCapture, ::cudaThreadExchangeStreamCaptureMode