parameters: (device=None)
return_statement: return core._get_current_stream(device_id)
docstring: Return the current CUDA stream by the device.
  
      Parameters:
          device(paddle.CUDAPlace()|int, optional): The device or the ID of the device which want to get stream from. 
          If device is None, the device is the current device. Default: None.
      
      Returns:
          CUDAStream: the stream to the device.
      
      Examples:
          .. code-block:: python
  
              # required: gpu
              import paddle
  
              s1 = paddle.device.cuda.current_stream()
  
              s2 = paddle.device.cuda.current_stream(0)
  
              s3 = paddle.device.cuda.current_stream(paddle.CUDAPlace(0))
docstring_summary: Return the current CUDA stream by the device.
docstring_tokens: Return the current CUDA stream by the device .
function: def current_stream(device=None):
      '''
      Return the current CUDA stream by the device.
  
      Parameters:
          device(paddle.CUDAPlace()|int, optional): The device or the ID of the device which want to get stream from. 
          If device is None, the device is the current device. Default: None.
      
      Returns:
          CUDAStream: the stream to the device.
      
      Examples:
          .. code-block:: python
  
              # required: gpu
              import paddle
  
              s1 = paddle.device.cuda.current_stream()
  
              s2 = paddle.device.cuda.current_stream(0)
  
              s3 = paddle.device.cuda.current_stream(paddle.CUDAPlace(0))
  
      '''
  
      device_id = -1
  
      if device is not None:
          if isinstance(device, int):
              device_id = device
          elif isinstance(device, core.CUDAPlace):
              device_id = device.get_device_id()
          else:
              raise ValueError("device type must be int or paddle.CUDAPlace")
  
      return core._get_current_stream(device_id)
function_tokens: def current_stream ( device = None ) : device_id = - 1 if device is not None : if isinstance ( device , int ) : device_id = device elif isinstance ( device , core . CUDAPlace ) : device_id = device . get_device_id ( ) else : raise ValueError ( "device type must be int or paddle.CUDAPlace" ) return core . _get_current_stream ( device_id )