Stream
class torch.cuda.Stream(device=None, priority=0, **kwargs)
Wrapper around a CUDA stream.
A CUDA stream is a linear sequence of execution that belongs to a
   specific device, independent from other streams.  See CUDA
   semantics for details.
Parameters:
      * device (torch.device or int, optional) -- a
        device on which to allocate the stream. If "device" is "None"
        (default) or a negative integer, this will use the current
        device.
  * **priority** (*int**, **optional*) -- priority of the stream.
    Can be either -1 (high priority) or 0 (low priority). By
    default, streams have priority 0.

Note:
 Although CUDA versions >= 11 support more than two levels of
 priorities, in PyTorch, we only support two levels of priorities.

query()
  Checks if all the work submitted has been completed.

  Returns:
     A boolean indicating if all kernels in this stream are
     completed.
