def record(self, stream=None):
        r"""Records the event in a given stream.

        Uses ``intel_extension_for_pytorch.xpu.current_stream()`` if no stream is specified.
        """
        if stream is None:
            stream = intel_extension_for_pytorch.xpu.current_stream()
        super(Event, self).record(stream)
Records the event in a given stream.

        Uses ``intel_extension_for_pytorch.xpu.current_stream()`` if no stream is specified.
        
intel_extension_for_pytorch/xpu/streams.py