Table of Contents
Shortcuts

# Event

class torch.mps.event.Event(enable_timing=False)

  Wrapper around an MPS event.

  MPS events are synchronization markers that can be used to monitor the device’s progress, to accurately measure timing, and to synchronize MPS streams.

  Parameters:

    enable_timing (bool, optional) – indicates if the event should measure time (default: `False`)

  elapsed_time(end_event)

    Returns the time elapsed in milliseconds after the event was recorded and before the end_event was recorded.

  query()

    Returns True if all work currently captured by event has completed.

  record()

    Records the event in the default stream.

  synchronize()

    Waits until the completion of all work currently captured in this event. This prevents the CPU thread from proceeding until the event completes.

  wait()

    Makes all future work submitted to the default stream wait for this event.

## Docs

Access comprehensive developer documentation for PyTorch

View Docs

## Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

## Resources

Find development resources and get your questions answered

View Resources

To analyze traffic and optimize your experience, we serve cookies on this site. By clicking or navigating, you agree to allow our usage of cookies. As the current maintainers of this site, Facebook’s Cookies Policy applies. Learn more, including about available controls: Cookies Policy.