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: Make all future work submitted to the stream wait for an event.
  
  Args:
      event (torch.cuda.Event): an event to wait for.
  
  .. note:: This is a wrapper around ``cudaStreamWaitEvent()``: see
     `CUDA Stream documentation`_ for more info.
  
     This function returns without waiting for :attr:`event`: only future
     operations are affected.
  
  .. _CUDA Stream documentation:
     https://docs.nvidia.com/cuda/cuda-runtime-api/group__CUDART__STREAM.html
docstr_tok: ["Make","all","future","work","submitted","to","the","stream","wait","for","an","event",".","Args",":","event","(","torch.cuda.Event",")",":","an","event","to","wait","for",".","..","note",":",":","This","is","a","wrapper","around","``","cudaStreamWaitEvent","(",")","``",":","see","`","CUDA","Stream","documentation","`","_","for","more","info",".","This","function","returns","without","waiting","for",":","attr",":","`","event","`",":","only","future","operations","are","affected",".","..","_CUDA","Stream","documentation",":","https",":","\/\/docs.nvidia.com\/cuda\/cuda-runtime-api\/group__CUDART__STREAM.html"]
code: def wait_event(self, event):
      r"""Make all future work submitted to the stream wait for an event.
  
      Args:
          event (torch.cuda.Event): an event to wait for.
  
      .. note:: This is a wrapper around ``cudaStreamWaitEvent()``: see
         `CUDA Stream documentation`_ for more info.
  
         This function returns without waiting for :attr:`event`: only future
         operations are affected.
  
      .. _CUDA Stream documentation:
         https://docs.nvidia.com/cuda/cuda-runtime-api/group__CUDART__STREAM.html
      """
      event.wait(self)
  
imports: import ctypes
  import torch
  from torch._streambase import _EventBase, _StreamBase
  from ._utils import _dummy_type
label_desc: Use image node_id 2 for calling the Stream obj's underlying member method code with example usage: obj.wait_event(event) without return types