Ë
    [^(hÂ  ã                   ó    — d dl Z  G d„ d«      Zy)é    Nc                   ó^   — e Zd ZdZddeddfd„Zdd„Zdd„Zdd„Zdefd	„Z	dd
„Z
dd defd„Zy)ÚEventaA  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.

    Args:
        enable_timing (bool, optional): indicates if the event should measure time
            (default: ``False``)
    Úenable_timingÚreturnNc                 óL   — t         j                  j                  |«      | _        y )N)ÚtorchÚ_CÚ_mps_acquireEventÚ_Event__eventId)Úselfr   s     úM/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/torch/mps/event.pyÚ__init__zEvent.__init__   s   € ÜŸ™×3Ñ3°MÓBˆ�ó    c                 ó¬   — t        t        j                  d«      r:| j                  dkD  r*t        j                  j	                  | j                  «       y y y )NÚ_mps_releaseEventr   )Úhasattrr   r	   r   r   ©r   s    r   Ú__del__zEvent.__del__   s;   € ä”5—8‘8Ð0Ô1°d·n±nÀqÒ6HÜ�H‰H×&Ñ& t§~¡~Õ6ð 7IÐ1r   c                 óV   — t         j                  j                  | j                  «       y)z(Records the event in the default stream.N)r   r	   Ú_mps_recordEventr   r   s    r   ÚrecordzEvent.record   s   € ä�‰×!Ñ! $§.¡.Õ1r   c                 óV   — t         j                  j                  | j                  «       y)zJMakes all future work submitted to the default stream wait for this event.N)r   r	   Ú_mps_waitForEventr   r   s    r   Úwaitz
Event.wait   s   € ä�‰×"Ñ" 4§>¡>Õ2r   c                 óT   — t         j                  j                  | j                  «      S )zCReturns True if all work currently captured by event has completed.)r   r	   Ú_mps_queryEventr   r   s    r   ÚqueryzEvent.query   s   € ä�x‰x×'Ñ'¨¯©Ó7Ð7r   c                 óV   — t         j                  j                  | j                  «       y)z¡Waits until the completion of all work currently captured in this event.
        This prevents the CPU thread from proceeding until the event completes.
        N)r   r	   Ú_mps_synchronizeEventr   r   s    r   ÚsynchronizezEvent.synchronize#   s   € ô 	�‰×&Ñ& t§~¡~Õ6r   Ú	end_eventc                 ój   — t         j                  j                  | j                  |j                  «      S )z}Returns the time elapsed in milliseconds after the event was
        recorded and before the end_event was recorded.
        )r   r	   Ú_mps_elapsedTimeOfEventsr   )r   r!   s     r   Úelapsed_timezEvent.elapsed_time)   s%   € ô �x‰x×0Ñ0°·±À×ATÑATÓUÐUr   )F)r   N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Úboolr   r   r   r   r   r    Úfloatr$   © r   r   r   r      sS   „ ññC dð C°tó Có7ó
2ó3ð8�tó 8ó7ðV gð V°%ô Vr   r   )r   r   r+   r   r   ú<module>r,      s   ðÛ ÷)Vò )Vr   