pub unsafe extern "C" fn cuGreenCtxStreamCreate(
phStream: *mut CUstream,
greenCtx: CUgreenCtx,
flags: c_uint,
priority: c_int,
) -> CUresultExpand description
Create a stream for use in the green context.
Creates a stream for use in the specified green context greenCtx and returns a handle in phStream. The stream can be destroyed by calling cuStreamDestroy(). Note that the API ignores the context that is current to the calling thread and creates a stream in the specified green context greenCtx.
The supported values for flags are:
CUstream_flags_enum::CU_STREAM_NON_BLOCKING: This must be specified. It indicates that work running in the created stream may run concurrently with work in the default stream, and that the created stream should perform no implicit synchronization with the default stream.
Specifying priority affects the scheduling priority of work in the stream. Priorities provide a hint to preferentially run work with higher priority when possible, but do not preempt already-running work or provide any other functional guarantee on execution order. priority follows a convention where lower numbers represent higher priorities. ‘0’ represents default priority. The range of meaningful numerical priorities can be queried using cuCtxGetStreamPriorityRange. If the specified priority is outside the numerical range returned by cuCtxGetStreamPriorityRange, it will automatically be clamped to the lowest or the highest number in the range.
Note that this function may also return error codes from previous, asynchronous launches.
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.
§Parameters
phStream: Returned newly created stream.greenCtx: Green context for which to create the stream for.flags: Flags for stream creation.CUstream_flags::CU_STREAM_NON_BLOCKINGmust be specified.priority: Stream priority. Lower numbers represent higher priorities. SeecuCtxGetStreamPriorityRangefor more information about meaningful stream priorities that can be passed.
§Return value
CUresult::CUDA_SUCCESSCUresult::CUDA_ERROR_DEINITIALIZEDCUresult::CUDA_ERROR_NOT_INITIALIZEDCUresult::CUDA_ERROR_INVALID_CONTEXTCUresult::CUDA_ERROR_INVALID_VALUECUresult::CUDA_ERROR_OUT_OF_MEMORY
See also: cuStreamDestroy, cuGreenCtxCreate, cuStreamCreate, cuStreamGetPriority, cuCtxGetStreamPriorityRange, cuStreamGetFlags, cuStreamGetDevice, cuStreamWaitEvent, cuStreamQuery, cuStreamSynchronize, cuStreamAddCallback, cudaStreamCreateWithPriority.