§
    êwŠi£  ã                   óØ   — d dl mZ d dlmZmZ d dlmZmZmZm	Z	 e G d„ d¦  «        ¦   «         Z
 e
¦   «         Zdeg df         deg df         fd	„Zdeg df         deg df         fd
„ZdS )é    )Úcontextmanager)Ú	dataclassÚfield)ÚAnyÚCallableÚ	GeneratorÚListc                   ór  — e Zd ZU  ee¬¦  «        Zeeg df                  ed<    ee¬¦  «        Z	eeg df                  ed<   deg df         deg df         fd„Z
deg df         deg df         fd„Zdeg df         ddfd	„Zdeg df         ddfd
„Zdd„Zdd„Zededeef         fd„¦   «         Zdd„ZdS )ÚCompilationCallbackHandler)Údefault_factoryNÚstart_callbacksÚend_callbacksÚcallbackÚreturnc                 ó:   — | j                              |¦  «         |S )z©
        Register a callback function to be called when the compilation starts.

        Args:
        - callback (Callable): The callback function to register.
        )r   Úappend©Úselfr   s     úf/root/.openclaw/workspace/chatterbox_venv_py311/lib/python3.11/site-packages/torch/_dynamo/callback.pyÚregister_start_callbackz2CompilationCallbackHandler.register_start_callback   s    € ð 	Ô×#Ò# HÑ-Ô-Ð-Øˆó    c                 ó:   — | j                              |¦  «         |S )z§
        Register a callback function to be called when the compilation ends.

        Args:
        - callback (Callable): The callback function to register.
        )r   r   r   s     r   Úregister_end_callbackz0CompilationCallbackHandler.register_end_callback   s    € ð 	Ô×!Ò! (Ñ+Ô+Ð+Øˆr   c                 ó:   — | j                              |¦  «         dS )z
        Remove a registered start callback function.

        Args:
        - callback (Callable): The callback function to remove.
        N)r   Úremover   s     r   Úremove_start_callbackz0CompilationCallbackHandler.remove_start_callback!   s!   € ð 	Ô×#Ò# HÑ-Ô-Ð-Ð-Ð-r   c                 ó:   — | j                              |¦  «         dS )z‹
        Remove a registered end callback function.

        Args:
        - callback (Callable): The callback function to remove.
        N)r   r   r   s     r   Úremove_end_callbackz.CompilationCallbackHandler.remove_end_callback*   s!   € ð 	Ô×!Ò! (Ñ+Ô+Ð+Ð+Ð+r   c                 ó.   — | j         D ]} |¦   «          ŒdS )z9
        Execute all registered start callbacks.
        N)r   r   s     r   Úrun_start_callbacksz.CompilationCallbackHandler.run_start_callbacks3   s-   € ð Ô,ð 	ð 	ˆHØˆH‰JŒJˆJˆJð	ð 	r   c                 ó.   — | j         D ]} |¦   «          ŒdS )z7
        Execute all registered end callbacks.
        N)r   r   s     r   Úrun_end_callbacksz,CompilationCallbackHandler.run_end_callbacks:   s-   € ð Ô*ð 	ð 	ˆHØˆH‰JŒJˆJˆJð	ð 	r   c              #   ó–   K  — 	 |                       ¦   «          dV — |                      ¦   «          dS # |                      ¦   «          w xY w)zc
        Context manager to install the callbacks and run them when the context is exited.
        N)r    r"   ©r   s    r   Úinstall_callbacksz,CompilationCallbackHandler.install_callbacksA   sV   è è € ð
	%Ø×$Ò$Ñ&Ô&Ð&ØˆEˆEˆEà×"Ò"Ñ$Ô$Ð$Ð$Ð$øˆD×"Ò"Ñ$Ô$Ð$Ð$øøøs	   „2 ²Ac                 ój   — | j                              ¦   «          | j                             ¦   «          dS )z1
        Clear all registered callbacks.
        N)r   Úclearr   r$   s    r   r'   z CompilationCallbackHandler.clearL   s4   € ð 	Ô×"Ò"Ñ$Ô$Ð$ØÔ× Ò Ñ"Ô"Ð"Ð"Ð"r   )r   N)Ú__name__Ú
__module__Ú__qualname__r   Úlistr   r	   r   Ú__annotations__r   r   r   r   r   r    r"   r   r   r   r%   r'   © r   r   r   r      s›  € € € € € € à05°ÀdÐ0KÑ0KÔ0K€OT˜( 2 t 8Ô,Ô-ÐKÐKÑKØ.3¨eÀDÐ.IÑ.IÔ.I€M4˜  T Ô*Ô+ÐIÐIÑIð
Ø   T Ô*ð
à	"d(Ô	ð
ð 
ð 
ð 
ð¨h°r¸4°xÔ.@ð ÀXÈbÐRVÈhÔEWð ð ð ð ð.¨h°r¸4°xÔ.@ð .ÀTð .ð .ð .ð .ð,¨H°R¸°XÔ,>ð ,À4ð ,ð ,ð ,ð ,ðð ð ð ðð ð ð ð ð% 9¨T°3¸¨^Ô#<ð %ð %ð %ñ „^ð%ð#ð #ð #ð #ð #ð #r   r   r   Nr   c                 ó:   — t                                | ¦  «         | S )zU
    Decorator to register a callback function for the start of the compilation.
    )Úcallback_handlerr   ©r   s    r   Úon_compile_startr1   W   s   € õ ×,Ò,¨XÑ6Ô6Ð6Ø€Or   c                 ó:   — t                                | ¦  «         | S )zS
    Decorator to register a callback function for the end of the compilation.
    )r/   r   r0   s    r   Úon_compile_endr3   _   s   € õ ×*Ò*¨8Ñ4Ô4Ð4Ø€Or   )Ú
contextlibr   Údataclassesr   r   Útypingr   r   r   r	   r   r/   r1   r3   r-   r   r   ú<module>r7      s  ðØ %Ð %Ð %Ð %Ð %Ð %Ø (Ð (Ð (Ð (Ð (Ð (Ð (Ð (Ø 1Ð 1Ð 1Ð 1Ð 1Ð 1Ð 1Ð 1Ð 1Ð 1Ð 1Ð 1ð ðJ#ð J#ð J#ð J#ð J#ñ J#ô J#ñ „ðJ#ðZ .Ð-Ñ/Ô/Ð ð˜x¨¨D¨Ô1ð °h¸rÀ4¸xÔ6Hð ð ð ð ð˜X b¨$ hÔ/ð °H¸RÀ¸XÔ4Fð ð ð ð ð ð r   