ó
    !EñiÂ  ã                   ó    • S SK r  " S S5      rg)é    Nc                   óv   • \ rS rSrSrSS\SS4S jjrSS jrSS jrSS	 jr	S\4S
 jr
SS jrSS S\4S jrSrg)ÚEventé   a)  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   • [         R                  R                  U5      U l        g )N)ÚtorchÚ_CÚ_mps_acquireEventÚ_Event__eventId)Úselfr   s     ÚL/home/mande/repo/quber/.venv/lib/python3.13/site-packages/torch/mps/event.pyÚ__init__ÚEvent.__init__   s   € ÜŸ™×3Ñ3°MÓBˆ�ó    c                 ó¸   • [        [        R                  S5      (       a;  U R                  S:”  a*  [        R                  R	                  U R                  5        g g g )NÚ_mps_releaseEventr   )Úhasattrr	   r
   r   r   ©r   s    r   Ú__del__ÚEvent.__del__   s>   € ä”5—8‘8Ð0×1Ñ1°d·n±nÀqÓ6HÜ�H‰H×&Ñ& t§~¡~Õ6ð 7IÐ1r   c                 óV   • [         R                  R                  U R                  5        g)z(Records the event in the default stream.N)r	   r
   Ú_mps_recordEventr   r   s    r   ÚrecordÚEvent.record   s   € ä�‰×!Ñ! $§.¡.Õ1r   c                 óV   • [         R                  R                  U R                  5        g)zJMakes all future work submitted to the default stream wait for this event.N)r	   r
   Ú_mps_waitForEventr   r   s    r   ÚwaitÚ
Event.wait   s   € ä�‰×"Ñ" 4§>¡>Õ2r   c                 óT   • [         R                  R                  U R                  5      $ )zCReturns True if all work currently captured by event has completed.)r	   r
   Ú_mps_queryEventr   r   s    r   ÚqueryÚEvent.query   s   € ä�x‰x×'Ñ'¨¯©Ó7Ð7r   c                 óV   • [         R                  R                  U R                  5        g)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   ÚsynchronizeÚEvent.synchronize#   s   € ô 	�‰×&Ñ& t§~¡~Õ6r   Ú	end_eventc                 ój   • [         R                  R                  U R                  UR                  5      $ )zmReturns 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_timeÚEvent.elapsed_time)   s%   € ô �x‰x×0Ñ0°·±À×ATÑATÓUÐUr   )Ú	__eventId)F)r   N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Úboolr   r   r   r   r"   r&   Úfloatr+   Ú__static_attributes__© 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   r6   r   r   Ú<module>r7      s   ðÛ ÷)Vò )Vr   