Stream#
- class torch.mps.Stream(device=None, **kwargs)#
Wrapper around an MPS stream.
An MPS stream is a linear sequence of execution that is independent from other streams. Use the
stream()context manager to ensure operators run on the corresponding stream.- Parameters:
device (torch.device or int, optional) – a device on which to allocate the stream. If
deviceisNone(default) or a negative integer, this will use the current device.