Event¶
- class torch.mps.event.Event(enable_timing=False)[source]¶
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)[source]¶
Returns the time elapsed in milliseconds after the event was recorded and before the end_event was recorded.