warp.set_stream#

warp.set_stream(stream, device=None, sync=False)[source]#

Convenience function for calling Device.set_stream() on the given device.

Parameters:
  • device (Device | str | None) – An optional Device instance or device alias (e.g. “cuda:0”) for which the current stream is to be replaced with stream. If None, the default device will be used.

  • stream (Stream) – The stream to set as this device’s current stream.

  • sync (bool) – If True, then stream will perform a device-side synchronization with the device’s previous current stream.

Return type:

None