Function rcudnn_sys::cudaStreamCreateWithPriority[][src]

pub unsafe extern "C" fn cudaStreamCreateWithPriority(
    pStream: *mut cudaStream_t,
    flags: c_uint,
    priority: c_int
) -> cudaError_t
Expand description

\brief Create an asynchronous stream with the specified priority

Creates a stream with the specified priority and returns a handle in \p pStream. This API alters the scheduler priority of work in the stream. Work in a higher priority stream may preempt work already executing in a low priority stream.

\p priority follows a convention where lower numbers represent higher priorities. ‘0’ represents default priority. The range of meaningful numerical priorities can be queried using ::cudaDeviceGetStreamPriorityRange. If the specified priority is outside the numerical range returned by ::cudaDeviceGetStreamPriorityRange, it will automatically be clamped to the lowest or the highest number in the range.

\param pStream - Pointer to new stream identifier \param flags - Flags for stream creation. See ::cudaStreamCreateWithFlags for a list of valid flags that can be passed \param priority - Priority of the stream. Lower numbers represent higher priorities. See ::cudaDeviceGetStreamPriorityRange for more information about the meaningful stream priorities that can be passed.

\return ::cudaSuccess, ::cudaErrorInvalidValue \notefnerr \note_init_rt \note_callback

\note Stream priorities are supported only on GPUs with compute capability 3.5 or higher.

\note In the current implementation, only compute kernels launched in priority streams are affected by the stream’s priority. Stream priorities have no effect on host-to-device and device-to-host memory operations.

\sa ::cudaStreamCreate, ::cudaStreamCreateWithFlags, ::cudaDeviceGetStreamPriorityRange, ::cudaStreamGetPriority, ::cudaStreamQuery, ::cudaStreamWaitEvent, ::cudaStreamAddCallback, ::cudaStreamSynchronize, ::cudaStreamDestroy, ::cuStreamCreateWithPriority