class_docstr: 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 :ref:`cuda-semantics` for
  details.
  
  Args:
      device(torch.device or int, optional): a device on which to allocate
          the stream. If :attr:`device` is ``None`` (default) or a negative
          integer, this will use the current device.
      priority(int, optional): priority of the stream, should be 0 or
          negative, where negative numbers indicate higher priority. By default,
          streams have priority 0.
class_docstr_tok: ["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",":","ref",":","`","cuda-semantics","`","for","details",".","Args",":","device","(","torch.device","or","int",",","optional",")",":","a","device","on","which","to","allocate","the","stream",".","If",":","attr",":","`","device","`","is","``","None","``","(","default",")","or","a","negative","integer",",","this","will","use","the","current","device",".","priority","(","int",",","optional",")",":","priority","of","the","stream",",","should","be","0","or","negative",",","where","negative","numbers","indicate","higher","priority",".","By","default",",","streams","have","priority","0","."]
docstr: Wait for all the kernels in this stream to complete.
  
  .. note:: This is a wrapper around ``cudaStreamSynchronize()``: see
     `CUDA Stream documentation`_ for more info.
docstr_tok: ["Wait","for","all","the","kernels","in","this","stream","to","complete",".","..","note",":",":","This","is","a","wrapper","around","``","cudaStreamSynchronize","(",")","``",":","see","`","CUDA","Stream","documentation","`","_","for","more","info","."]
code: def synchronize(self):
      r"""Wait for all the kernels in this stream to complete.
  
      .. note:: This is a wrapper around ``cudaStreamSynchronize()``: see
         `CUDA Stream documentation`_ for more info.
      """
      super().synchronize()
  
imports: import ctypes
  import torch
  from torch._streambase import _EventBase, _StreamBase
  from ._utils import _dummy_type
label_desc: Use image node_id 6 for calling the Stream obj's underlying member method code with example usage: obj.synchronize() without return types