cuda.bindings._v2.driver.thread_exchange_stream_capture_mode#
- cuda.bindings._v2.driver.thread_exchange_stream_capture_mode(int mode) int#
Swap the stream capture interaction mode of the calling thread.
Sets the calling thread’s stream capture interaction mode to
modeand returns the mode it had before. Callers are encouraged to use this in a push-pop fashion: set the mode they need, and restore the returned one afterwards.During stream capture, some actions (such as a call to
cudaMalloc) may be unsafe. A thread’s mode is one of theStreamCaptureModevalues:GLOBAL(the default),THREAD_LOCALorRELAXED.- Parameters:
mode (int) – The new mode, a
StreamCaptureModevalue.- Returns:
The previous mode of the thread, a
StreamCaptureModevalue.- Return type:
See also
cuThreadExchangeStreamCaptureMode