cuda.bindings._v2.driver.green_ctx_stream_create#
- cuda.bindings._v2.driver.green_ctx_stream_create(
- intptr_t green_ctx,
- unsigned int flags,
- int priority,
Create a stream for use in the green context.
Creates a stream for use in the specified green context
green_ctxand returns a handle inph_stream. The stream can be destroyed by callingcuStreamDestroy(). Note that the API ignores the context that is current to the calling thread and creates a stream in the specified green contextgreen_ctx. The supported values forflagsare:.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
priorityaffects 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.priorityfollows a convention where lower numbers represent higher priorities. ‘0’ represents default priority. The range of meaningful numerical priorities can be queried usingcuCtxGetStreamPriorityRange. If the specified priority is outside the numerical range returned bycuCtxGetStreamPriorityRange, it will automatically be clamped to the lowest or the highest number in the range.- Parameters:
green_ctx (intptr_t) – Green context for which to create the stream for.
flags (unsigned int) – Flags for stream creation.
CU_STREAM_NON_BLOCKINGmust be specified.priority (int) – Stream priority. Lower numbers represent higher priorities. See
cuCtxGetStreamPriorityRangefor more information about meaningful stream priorities that can be passed.
- Returns:
Returned newly created stream.
- Return type:
intptr_t
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.
See also
cuGreenCtxStreamCreate