warp.set_stream#
- warp.set_stream(stream, device=None, sync=False)[source]#
Convenience function for calling
Device.set_stream()on the givendevice.- Parameters:
device (Device | str | None) – An optional
Deviceinstance or device alias (e.g. “cuda:0”) for which the current stream is to be replaced withstream. IfNone, the default device will be used.stream (Stream) – The stream to set as this device’s current stream.
sync (bool) – If
True, thenstreamwill perform a device-side synchronization with the device’s previous current stream.
- Return type:
None