ó
    ÊÓshÅ	  ã            
       óº   • S SK r S SKJr  S SKJr  S SKJr  S SKJr  SS/r	\" SS	9 " S
 S\" SSS/5      5      5       r
\" SS	9 " S S\ R                  5      5       rg)é    N)Ú
namedtuple)ÚOptional)Úcompatibility)ÚGraphModuleÚ
PassResultÚPassBaseF)Úis_backward_compatiblec                   ó0   ^ • \ rS rSrSrSrU 4S jrSrU =r$ )r   é   z‚
Result of a pass:
    graph_module: The modified graph module
    modified: A flag for if the pass has modified the graph module
© c                 ó$   >• [         TU ]  XU5      $ )N)ÚsuperÚ__new__)ÚclsÚgraph_moduleÚmodifiedÚ	__class__s      €Ús/Users/tiagomarins/Projetos/claudeai/copy_bank/venv/lib/python3.13/site-packages/torch/fx/passes/infra/pass_base.pyr   ÚPassResult.__new__   s   ø€ Ü‰w‰˜s°(Ó;Ð;ó    )	Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Ú	__slots__r   Ú__static_attributes__Ú__classcell__)r   s   @r   r   r      s   ø† ñð €I÷<ó <r   r   r   c                   óŠ   • \ rS rSrSrS\S\\   4S jr\	R                  S\S\\   4S j5       rS\SS4S jrS\SS4S	 jrS
rg)r   é   a:  
Base interface for implementing passes.

It is required to implement the `call` function so that we can directly
pass instances of the Pass directly to the PassManager and call them as a
function.

We can directly pass an instance of a class implementing this interface into
the PassManager's `passes` attribute.
r   Úreturnc                 ól   • U R                  U5        U R                  U5      nU R                  U5        U$ )zL
Runs the precondition check, the pass itself, and the postcondition check.
)ÚrequiresÚcallÚensures)Úselfr   Úress      r   Ú__call__ÚPassBase.__call__(   s/   € ð
 	‰lÔ#Øi‰i˜Ó%ˆØ‰\Ô"Øˆ
r   c                 ó   • g)z¶
The pass that is run through the given graph module. To implement a
pass, it is required to implement this function.

Args:
    graph_module: The graph module we will run a pass on
Nr   ©r&   r   s     r   r$   ÚPassBase.call2   ó    r   Nc                 ó   • g)a  
This function will be called before the pass is run and will check that
the given graph module contains the preconditions needed to run the
pass. It is not required to implement this function.

Args:
    graph_module: The graph module we will run checks on
Nr   r+   s     r   r#   ÚPassBase.requires<   r-   r   c                 ó   • g)a  
This function will be called after the pass is run and will check that
the given graph module contains the postconditions needed to run the
pass. It is not required to implement this function.

Args:
    graph_module: The graph module we will run checks on
Nr   r+   s     r   r%   ÚPassBase.ensuresF   r-   r   r   )r   r   r   r   r   r   r   r   r(   ÚabcÚabstractmethodr$   r#   r%   r   r   r   r   r   r      sr   † ñ	ð [ð °X¸jÑ5Iô ð 	×Ñð ð °¸*Ñ1Eó ó ðð [ð °Tô ð Kð °D÷ r   )r2   Úcollectionsr   Útypingr   Útorch.fx._compatibilityr   Útorch.fx.graph_moduler   Ú__all__r   ÚABCr   r   r   r   Ú<module>r:      sp   ðã 
Ý "Ý å 1Ý -ð ˜Ð
$€ñ  eÑ,ô
<‘˜L¨>¸:Ð*FÓGó 
<ó -ð
<ñ  eÑ,ô2ˆsw‰wó 2ó -ñ2r   