cuda.bindings._v2.driver.stream_get_id#
- cuda.bindings._v2.driver.stream_get_id(intptr_t h_stream) unsigned long long#
Returns the unique Id associated with the stream handle supplied.
Returns in
stream_idthe unique Id which is associated with the given stream handle. The Id is unique for the life of the program. The stream handleh_streamcan refer to any of the following:.a stream created via any of the CUDA driver APIs such as
cuStreamCreateandcuStreamCreateWithPriority, or their runtime API equivalents such ascudaStreamCreate,cudaStreamCreateWithFlagsandcudaStreamCreateWithPriority. Passing an invalid handle will result in undefined behavior.any of the special streams such as the NULL stream,
CU_STREAM_LEGACYandCU_STREAM_PER_THREAD. The runtime API equivalents of these are also accepted, which are NULL,cudaStreamLegacyandcudaStreamPerThreadrespectively.
- Parameters:
h_stream (intptr_t) – Handle to the stream to be queried.
- Returns:
Pointer to store the Id of the stream.
- Return type:
unsigned long long
See also
cuStreamGetId