ó
    Eñi¿�  ã                   ór  • S SK r S SKJr  S SKJr  S SKJrJrJr  S SK	r	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
KJrJrJrJrJrJrJr  / SQr\ R8                  " \5      r\" SS9 " S S\5      5       r \" SS9 " S S\5      5       r!\" SS9 " S S\5      5       r"\ " S S5      5       r# " S S5      r$g)é    N)ÚCallable)Ú	dataclass)ÚAnyÚcastÚOptional)Úcompatibility)Úmap_argé   )Ú	ShapeProp)Úsplit_by_tags)ÚCALLABLE_NODE_OPSÚFxNetAccFusionsFinderÚNamesÚNodeListÚNodeSetÚTensorOrTensorsÚTensors)ÚFxNetMinimizerBadModuleErrorÚFxNetMinimizerRunFuncErrorÚ!FxNetMinimizerResultMismatchErrorF)Úis_backward_compatiblec                   ó   • \ rS rSrSrSrg)r   é"   z1
Raised if failed to split out a minimize module
© N©Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Ú__static_attributes__r   ó    ÚY/home/mande/repo/quber/.venv/lib/python3.13/site-packages/torch/fx/passes/net_min_base.pyr   r   "   ó   † ôr"   r   c                   ó   • \ rS rSrSrSrg)r   é)   z8
Raised if error occurs during run_a or run_b functions
r   Nr   r   r"   r#   r   r   )   r$   r"   r   c                   ó   • \ rS rSrSrSrg)r   é0   zB
Raised if comparing function thinks the results are mismatching.
r   Nr   r   r"   r#   r   r   0   r$   r"   r   c                   óf   • \ rS rSr% SrSr\\S'   Sr\	\S'   Sr
\\S'   Sr\\S'   Sr\\S	'   S
 rSrg)Ú_MinimizerSettingBaseé7   a˜  
Args:
`accumulate_error`: Instead of using a's input for both converted module to verify
, use the previous outputs of each converted module as input to accumulate the
errors.

`traverse_method`: "sequential" or "binary" or "accumulate"
Determine the way of traverse the nodes in FX module.

`find_all`: Minimizer will go through the entire model and return all problematic nodes.

`return_intermediate`: If true, when using `run_nodes()` function to run the
model, intermediate results of all the ops will be returned as output.

`all_outputs`: If true, when using `_run_and_compare()` function,
all the output nodes in the subgraph will be used for comparison.
FÚaccumulate_errorÚ
sequentialÚtraverse_methodÚfind_allÚreturn_intermediateÚall_outputsc                 óf   • Sn[        U 5      R                  5        H  u  p#USU SU S3-  nM     U$ )NzFX Minimizer Settings:
Ú	ú: Ú
)ÚvarsÚitems)ÚselfÚsettings_strÚkÚvs       r#   Ú__str__Ú_MinimizerSettingBase.__str__Q   s@   € Ø1ˆä˜“J×$Ñ$Ö&‰DˆAØ˜b   2 a S¨˜OÑ+ŠLñ 'ð Ðr"   r   N)r   r   r   r   r    r,   ÚboolÚ__annotations__r.   Ústrr/   r0   r1   r<   r!   r   r"   r#   r*   r*   7   sB   ‡ ñð$ #Ð�dÓ"Ø'€O�SÓ'Ø€HˆdÓØ %Ð˜Ó%Ø€K�Óõr"   r*   c                   ó  • \ rS rSrSr  S8S\R                  R                  S\S\	\
\
\/\\\4   4   S\S\\	\\R                  R                  \/S4      S	\\	\\\/S4      4S
 jjrS9S jr S:S\R                  R                  S\S\S\
4S jjr S:S\R                  R                  S\S\S\
4S jjrS\
S\
S\R                  R                  4S jrS\R                  R                  S\S\\\4   4S jrS\4S jrS\S\\R                  R                  \4   4S jr S:S\R                  R                  S\S\S\4S  jjrS!\S"\S#\S\4S$ jrS\S\4S% jrS\S\4S& jr S\S"\S#\S'\S\\   4
S( jr!S\S'\\   S\4S) jr"S\S\4S* jr#S\S\4S+ jr$S!\S"\S#\S\4S, jr%S!\S-\&S\4S. jr'S/\\   S0\\   S\4S1 jr(S8S/\\   S0\\   4S2 jjr)S3\&\   4S4 jr*S5 r+    S;S/\\   S0\\   S-\\&   S'\\   S\4
S6 jjr,S7r-g)<Ú_MinimizerBaseéZ   a›  
This class is used to automatically find problematic nodes in a model. It takes a FX
graphmodule and generate some submodules while traverse the graph. Then two functions
`run_a` and `run_b` will be used to run the same submodule and a function `compare_fn`
will be used to compare the results.

Currently we provides two ways to traverse the graph and generate submodules.
    1. Sequential traversal: this will traverse the graph node by node and generate
       one submodule with one single node.
    2. Binary searching: this will do a binary search style traversal on the graph.

For internal Users, a guide can be found here https://fb.quip.com/HDtuAgiKGfkP.
NÚmoduleÚsample_inputÚ
compare_fnÚsettingsÚmodule_exporterÚexclusion_fnc                 ó²  • [        U[        R                  R                  5      (       d  [	        S[        U5       35      eXl        X l        X0l        XPl	        X@l
        X`l        0 U l        0 U l        0 U l        / U l        SU l        U R                  R"                  R$                   Vs1 s H  owR&                  [(        ;   d  M  UiM     nnU R+                  5         [-        U R                  U5      " 5       U l        U R                  R"                  R$                   Vs/ s H   owR&                  S:X  d  M  UR0                  PM"     n	n[3        U	5      [3        U R                  5      :w  a.  [	        S[3        U	5       S[3        U R                  5       S35      e[5        U	5       H'  u  p«X*   U R                  U'   X*   U R                  U'   M)     g s  snf s  snf )NzExpected GraphModule, got r   ÚplaceholderzPlaceholder count (z%) does not match sample_input count (Ú))Ú
isinstanceÚtorchÚfxÚGraphModuleÚAssertionErrorÚtyperD   rE   rF   rH   rG   rI   Ú	a_outputsÚ	b_outputsÚresultsÚreportsÚ	iterationÚgraphÚnodesÚopr   Úrun_shape_propr   ÚfusionsÚnameÚlenÚ	enumerate)r8   rD   rE   rF   rG   rH   rI   ÚnodeÚcallable_nodesÚplaceholdersÚir]   s               r#   Ú__init__Ú_MinimizerBase.__init__i   s©  € ô ˜&¤%§(¡(×"6Ñ"6×7Ñ7Ü Ð#=¼dÀ6»l¸^Ð!LÓMÐMàŒØ(ÔØ$ŒØ.ÔØ ŒØ(Ôð *,ˆŒð *,ˆŒð (*ˆŒð )+ˆŒð  ˆŒð "Ÿ[™[×.Ñ.×4Ò4ó
Ú4�T¿¹ÔCTÑ8T�DÑ4ð 	ð 
ð 	×ÑÔÜ,¨T¯[©[¸.ÔIÓKˆŒð #'§+¡+×"3Ñ"3×"9Ò"9ó
Ú"9˜$¿W¹WÈÑ=U‹IˆD�IŒIÑ"9ð 	ð 
ô ˆ|Ó¤ D×$5Ñ$5Ó 6Ó6Ü Ø%¤c¨,Ó&7Ð%8ð 9'Ü'*¨4×+<Ñ+<Ó'=Ð&>¸aðAóð ô ! Ö.‰GˆAØ#/¡?ˆD�N‰N˜4Ñ Ø#/¡?ˆD�N‰N˜4Ó ò /ùò#
ùò
s   Â*GÃGÄGÄ6GÚreturnc                 ó\   • [        U R                  5      R                  " U R                  6   g)zy
Helper function to run shape propagation on module. Can be overridden by
subclasses for custom shape propagation logic.
N)r   rD   Ú	propagaterE   )r8   s    r#   r[   Ú_MinimizerBase.run_shape_prop¤   s!   € ô
 	�$—+‘+Ó×(Ò(¨$×*;Ñ*;Ò<r"   ÚmodÚinputsÚ
report_idxc                 ó   • [        S5      e)zb
Run `mod` with `inputs` and generate output. The output will be compared with
output of run_b().
zrun_a() is not implemented.©ÚRuntimeError©r8   rj   rk   rl   s       r#   Úrun_aÚ_MinimizerBase.run_a«   ó   € ô Ð8Ó9Ð9r"   c                 ó   • [        S5      e)zb
Run `mod` with `inputs` and generate output. The output will be compared with
output of run_a().
zrun_b() is not implemented.rn   rp   s       r#   Úrun_bÚ_MinimizerBase.run_b´   rs   r"   Úa_resultÚb_resultÚ	submodulec                 ó   • [        S UR                  R                   5       5      n[        UR                  S   [
        R                  R                  5      (       aK  XR                  UR                  S   R                  '   X R                  UR                  S   R                  '   g[        UR                  S   5       H;  u  pVX   U R                  UR                  '   X%   U R                  UR                  '   M=     g)a‚  
Store the outputs of self.run_a() and self.run_b() into self.a_outputs and
self.b_outputs, so that we can use them when execute preceding nodes that
use those outputs as inputs.

Args:
    a_result: Output of self.run_a(). Could be a tensor or tensors.
    b_result: Output of self.run_b(). Could be a tensor or tensors.
    submodule: The module that generates a_result and b_result.
c              3   óH   #   • U  H  oR                   S :X  d  M  Uv •  M     g7f)ÚoutputN)rZ   )Ú.0r`   s     r#   Ú	<genexpr>Ú0_MinimizerBase._store_outputs.<locals>.<genexpr>Í   s   é € ð 
Ú2�T·g±gÀÑ6I�D‰DÒ2ùs   ‚"™	"r   N)ÚnextrX   rY   rM   ÚargsrN   rO   ÚNoderS   r]   rT   r_   )r8   rw   rx   ry   Úoutput_noderc   Úargs          r#   Ú_store_outputsÚ_MinimizerBase._store_outputs½   sÇ   € ô  ñ 
Ø&Ÿ_™_×2Ò2ó
ó 
ˆô
 �k×&Ñ& qÑ)¬5¯8©8¯=©=×9Ñ9Ø7?�N‰N˜;×+Ñ+¨AÑ.×3Ñ3Ñ4Ø7?�N‰N˜;×+Ñ+¨AÑ.×3Ñ3Ò4ô $ K×$4Ñ$4°QÑ$7Ö8‘�Ø+3©;�—‘˜sŸx™xÑ(Ø+3©;�—‘˜sŸx™xÓ(ò 9r"   Úmain_moduleÚsubmod_pathc                 óÖ  ^
• / m
/ n[        X5      nUR                  R                   Vs/ s H   oUR                  S:X  d  M  UR                  PM"     nn[        U5      U R                  R                  5       ::  aF  U H?  nT
R                  U R                  U   5        UR                  U R                  U   5        MA     O„U R                  R                  (       a  [        SU S35        S[        R                  R                  S[         4U
4S jjnUR#                  U5      n	U" U R$                  6   U	R'                  5         T
nU R                  R                  (       d  T
T
4$ T
U4$ s  snf )a  
Try get submodule inputs from stored outputs. If not found then use
torch_glow.get_submod_inputs to get the inputs.

If accumulate_error is False, use a_input for run_a() and run_b()
otherwise use a_input for run_a and b_input for run_b.

Args:
    main_module: Top-levlel fx module.
    submod_path: Path to the submodule we want to run and compare results.

Returns:
    a_input: List of tensor(s) that will be used by run_a() as submodule inputs.
    b_input: List of tensor(s) that will be used by run_b() as submodule inputs.
rK   z)Can't find previous stored outputs named Ú!r8   rk   c                 ó
   >• Umg ©Nr   )r8   rk   Úa_inputs     €r#   Ú
get_inputsÚ5_MinimizerBase._get_submod_inputs.<locals>.get_inputsÿ   s   ø€ à ‘r"   )ÚgetattrrX   rY   rZ   r]   ÚsetrS   ÚkeysÚappendrT   rG   r,   ÚprintrN   ÚnnÚModuler   Úregister_forward_pre_hookrE   Úremove)r8   r‡   rˆ   Úb_inputry   r`   rb   r]   rŽ   Úhandler�   s             @r#   Ú_get_submod_inputsÚ!_MinimizerBase._get_submod_inputsÛ   s1  ø€ ð$ ˆØˆÜ˜KÓ5ˆ	à"+§/¡/×"7Ò"7ó
Ú"7˜$¿7¹7ÀmÑ;S‹IˆD�IŒIÑ"7ð 	ð 
ô ˆ|Ó §¡× 3Ñ 3Ó 5Ó5Û$�Ø—‘˜tŸ~™~¨dÑ3Ô4Ø—‘˜tŸ~™~¨dÑ3Ö4ò %ð �}‰}×-×-ÜÐAÀ,ÀÈqÐQÔRð!¤§¡§¡ð !¼#÷ !ð
 ×8Ñ8¸ÓDˆFÙ˜×*Ñ*Ñ+Ø�M‰MŒOàˆGà�}‰}×-×-Ø˜GÐ#Ð#à˜ÐÐùò;
s   ©E&Á E&Úselected_nodesc                 óü   • U R                   R                  R                   HX  nUR                  [        ;  a  M  X!;   a	  SUl        M'  [        S UR                   5       5      (       a	  SUl        MQ  SUl        MZ     g)a/  
Tag selected nodes with tag "minimize". Nodes with the same tags will
be split to the same submodule afterwards.

Args:
    selected_nodes: Nodes that we want to minimize. We will tag those nodes
        with "minimize", all preceding nodes with "main_0" and all following
        nodes with "main_1".
Úminimizec              3   ól   #   • U  H*  nUR                   [        ;   d  M  UR                  S ;   v •  M,     g7f)>   Úmain_1rŸ   N)rZ   r   Útag)r}   Úns     r#   r~   Ú,_MinimizerBase._tag_nodes.<locals>.<genexpr>  s0   é € ð â-�AØ—4‘4Ô,Ñ,ó 0�—‘Ð/Ö/Ú-ùs   ‚4ž4r¡   Úmain_0N)rD   rX   rY   rZ   r   r¢   ÚanyÚall_input_nodes)r8   r�   r`   s      r#   Ú
_tag_nodesÚ_MinimizerBase._tag_nodes  sk   € ð —K‘K×%Ñ%×+Ô+ˆDØ�w‰wÔ/Ó/ÙàÓ%Ø%�–Üñ à×-Ò-ó÷ ñ ð
 $�–à#�–ò ,r"   rY   c                 óô   • U R                  U5        [        U R                  / SQ5      nSnUR                  5        H#  u  pESU;  a  M  US:X  a  UnM  [	        SU 35      e   US:X  a  [	        SU 35      eX#4$ )a3  
Split self.module so that one submodule consists of `nodes` and only `nodes`.

Args:
    nodes: Nodes that we want to include in the minimize submodule.

Returns:
    split_module (torch.fx.GraphModule): the module after split.
    submodule_name (str): the name of the submodule that consists of `nodes`.
)r¥   rŸ   r¡   Ú rŸ   z0Expected only one minimize submodule with nodes z,Minimize submodule was not found with nodes )r¨   r   rD   Únamed_childrenr   )r8   rY   Úsplit_moduleÚsubmodule_nameÚ
child_nameÚ_s         r#   Ú_build_submoduleÚ_MinimizerBase._build_submodule(  sš   € ð 	�‰˜Ôô % T§[¡[Ò2RÓSˆð !ˆØ)×8Ñ8Ö:‰MˆJà Ó+Ùà Ó#Ø!+’ä2ØFÀuÀgÐNóð ñ ;ð ˜RÓÜ.Ø>¸u¸gÐFóð ð Ð+Ð+r"   r­   Úsubmod_nameÚoutput_namesc                 óp  • [        X5      nU R                  X5      u  pg[        U R                  5      S:X  a"  U R                  R	                  / 5        SU l        U R                  US:¼  a  UOU R
                  S-
     nUR	                  S5        U(       aê  U R                  R                  (       dÏ  / n	UR                  R                   HQ  n
U
R                  S:X  a  UR                  R                  U
5        U
R                  U;   d  M@  U	R	                  U
5        MS     UR                  R                  [        U	5      S:X  a  U	S   O
[        U	5      5        UR                  R                  5         UR!                  5         UR                  R                   H,  n
U
R                  S:X  d  M  [#        U
R$                  S 5      nM.      U R'                  XVU5      nU R)                  XWU5      nU R+                  XÍU5        UnUc  W Vs/ s H  n[1        U5      PM     nnU R3                  XÍU5      u  nnUU R4                  W'   UR	                  S	U 35        U(       dœ  UR	                  S
U 35        U R6                  (       ai  [9        U[        5      (       a  US   n[9        U[        5      (       a  [1        US   5      nU R7                  UUUS-   5        U R7                  UUUS-   5        [;        S
U 35      eg! [,         a-  nUR	                  SU SU 35        [/        SU SU 35      eSnAff = fs  snf )ae  
Run the submodule in `split_module` that has name `submod_name`
using `self.run_a` and `self.run_b` and compare their results.

Args:
    split_module: Main module that contains the minimize submodule.
    submod_name: Name of the minimize submodule.
    output_names: Names of the node we want to output. If None, we
        will use the original output.
r   r
   zRun and compare ...r|   c                 ó   • U R                   $ rŒ   )r]   )Úxs    r#   Ú<lambda>Ú1_MinimizerBase._run_and_compare.<locals>.<lambda>{  s   € ¸!¿&º&r"   zException raised when running r4   NzNumerical accuracy = zResult mismatch for éÿÿÿÿÚ_cpuÚ_acc)r�   r›   r^   rV   r“   rW   rG   r1   rX   rY   rZ   Ú
erase_noder]   r|   ÚtupleÚlintÚ	recompiler	   r�   rq   ru   r…   Ú	Exceptionr   r@   rF   rU   rH   rM   r   )r8   r­   r³   r´   rl   ry   r�   r™   ÚreportÚoutput_nodesr`   Ú
result_keyrw   rx   ÚeÚnamesr;   Únumeric_resultÚbool_results                      r#   Ú_run_and_compareÚ_MinimizerBase._run_and_compareN  sÝ  € ô" ˜LÓ6ˆ	Ø×2Ñ2°<ÓMÑˆäˆt�|‰|Ó Ó!Ø�L‰L×Ñ Ô#ØˆDŒNà—‘¨J¸!«O™jÀÇÁÐRSÑASÑTˆØ�‰Ð+Ô,æ §¡× 9× 9Ø%'ˆLØ!Ÿ™×-Ô-�Ø—7‘7˜hÓ&Ø—O‘O×.Ñ.¨tÔ4à—9‘9 Õ,Ø ×'Ñ'¨Ö-ñ .ð �O‰O×"Ñ"Ü#& |Ó#4¸Ó#9�˜Q’¼uÀ\Ó?Rôð �O‰O× Ñ Ô"Ø×ÑÔ!ð —O‘O×)Ô)ˆDØ�w‰w˜(Õ"Ü$ T§Y¡YÑ0@ÓA’
ñ *ð	Ø—z‘z )°jÓAˆHØ—z‘z )°jÓAˆHØ×Ñ °IÔ>ð $ˆØÑÙ%/Ó0¢Z ”S˜–V¡ZˆEÐ0à&*§o¡o°hÈ%Ó&PÑ#ˆ˜à#1ˆ�‰�ZÑ Ø�‰Ð-¨nÐ-=Ð>Ô?ÞØ�M‰MÐ0°°Ð=Ô>Ø×#×#Ü˜j¬%×0Ñ0à!+¨B¡�Jô ˜j¬%×0Ñ0ä!$ Z°¡]Ó!3�Jà×$Ñ$ØØà Ñ'ô	ð ×$Ñ$ØØà Ñ'ô	ô 4Ð6JÈ:È,Ð4WÓXÐXð3 øô ó 	Ø�M‰MÐ:¸;¸-ÀrÈ!ÈÐMÔNÜ,Ø0°°¸RÀ¸sÐCóð ûð	üò 1s   Ç6K9 ÈL3Ë9
L0Ì(L+Ì+L0Ú	all_nodesÚ	start_idxÚend_idxc                 óÂ  • [        5       nXU n/ nU R                  bA  U R                  XRU5        [        U5      S:X  a   S/nU R                  R	                  U5        U$ US   R
                  nUS   R
                  nU =R                  S-  sl        U R                  R	                  U5        UR	                  SU R                   35        UR	                  SU SU SUS-
   SU S	[        U5       3
5        [        U5      n	 U R                  U	5      u  p«U R                  X«U/5        UR	                  S
5        U R                  U5        [        5       $ ! [        [        4 aù    [        U5      S:X  a*  UR	                  SU	 S35        U R                  U5        U	s $ UR	                  S5        U R                  U5        [        U5      S-  nU R                  XX,-   5      n[        U5      S:w  a  U R                  R                  (       d  Us $ U R                  XU-   U5      n[        U5      S:X  a%  UR	                  SU 35        U R                  U5        Us $ f = f)z)
Recursive binary search implementation.
r   úAll nodes are excluded by userrº   r
   zBinary search iteration úFrom node index Ú:ú to ú&. Size of the interested node list is úNo discrepancy found.zcThis is the last node in the sub-module. Search in the current branch is successful with culprit = Ú.úMProceed to split and lower the halves of the current sub-module individually.é   zaFurther split and lowering found no errors. Unable to minimize the submodule with list of nodes: )r‘   rI   r^   rV   r“   r]   rW   r±   rÉ   Úprint_reportr   r   Ú_binary_search_implrG   r/   )r8   rË   rÌ   rÍ   ÚculpritsrY   rÂ   Úfirst_node_nameÚoutput_node_nameÚ	cur_nodesr­   r³   Úmids                r#   rÙ   Ú"_MinimizerBase._binary_search_impl«  s^  € ô  ›EˆØ#¨gÐ6ˆàˆØ×ÑÑ(Ø×Ñ˜e°Ô8Ü�5‹z˜Q‹Ø:Ð;�Ø—‘×#Ñ# FÔ+Ø�à ™(Ÿ-™-ˆØ  ™9Ÿ>™>ÐØ�Š˜!Ñ�Ø�‰×Ñ˜FÔ#Ø�‰Ð0°·±Ð0@ÐAÔBØ�‰Ø˜y˜k¨¨?Ð*;¸4ÀÈ!Á¸}ÈAÐN^ÐM_ð `3Ü36°u³:°,ð@ô	
ô ! ›Zˆ	ð&	Ø(,×(=Ñ(=¸iÓ(HÑ%ˆLØ×!Ñ! ,Ð>NÐ=OÔPðD �M‰MÐ1Ô2Ø×Ñ˜fÔ%Ü“5ˆLøôE +Ô,MÐNó 	Ü�5‹z˜Q‹Ø—‘ðQØQZÐP[Ð[\ð^ôð ×!Ñ! &Ô)Ø Ò à�M‰Mð+ôð ×Ñ˜fÔ%ä�e“* ‘/ˆCØ×/Ñ/°	ÀiÁoÓVˆHä�8‹} Ó!¨$¯-©-×*@×*@Ø’à×/Ñ/°	Às¹?ÈGÓTˆHä�8‹} Ó!Ø—‘ðLØLQÈ7ðTôð ×!Ñ! &Ô)àŠOð=	ús!   Ä&E ÅAIÆA0IÈAIÉIc                 ó:   • U R                  US[        U5      5      $ )z'
Binary search on `nodes` for culprit.
r   )rÙ   r^   )r8   rY   s     r#   Ú_binary_traverseÚ_MinimizerBase._binary_traverseï  s   € ð ×'Ñ'¨¨q´#°e³*Ó=Ð=r"   c                 ó´  • [        5       nU GHy  n/ nU R                  R                  U5        U =R                  S-  sl        UR                  SU R                   S35        UR                  SUR                   35        [
        R                  SUR                  5        U/nU R                  bs  U R                  USS5        [        U5      S:X  aQ  UR                  SUR                   35        U R                  U5        U R                  R                  (       d  Us  $ GM  U1nX0R                  ;   a  U R                  U   n U R                  U5      u  pxU R                  XxUR                  /5        U R                  U5        GM|     U$ ! [         a\    UR!                  U5        UR                  S	U 35        U R                  U5        U R                  R                  (       d  Us s  $  GMå  ["         a\    UR%                  U5        UR                  S
U 35        U R                  U5        U R                  R                  (       d  Us s  $  GMI  f = f)zH
Traverse `nodes` one by one and determine if any of them is a culprit.
r
   zSequential traverse iteration rÕ   zVisit node: zVisit node: %srº   r   zUser exclusion : ú"Found culprit from numeric error: úFound culprit from run error: )r‘   rV   r“   rW   r]   Ú_LOGGERÚinforI   r^   rØ   rG   r/   r\   r±   rÉ   r   Úaddr   Úupdate)	r8   rY   rÚ   r`   rÂ   Ú	node_listrÝ   r­   r³   s	            r#   Ú_sequential_traverseÚ#_MinimizerBase._sequential_traverseõ  sñ  € ô  ›EˆäˆDØ "ˆFØ�L‰L×Ñ Ô'Ø�NŠN˜aÑ�NØ�M‰MÐ:¸4¿>¹>Ð:JÈ!ÐLÔMØ�M‰M˜L¨¯©¨Ð4Ô5ä�L‰LÐ)¨4¯9©9Ô5Ø#' &ˆIØ× Ñ Ñ,Ø×!Ñ! )¨R°Ô4Ü�y“> QÓ&Ø—M‘MÐ$5°d·i±i°[Ð"AÔBØ×%Ñ% fÔ-ØŸ=™=×1×1Ø'šâ à"& ˆIà—|‘|Ó#Ø ŸL™L¨Ñ.�	ð$Ø,0×,AÑ,AÀ)Ó,LÑ)�Ø×%Ñ% lÀ$Ç)Á)ÀÔMØ×!Ñ! &×)ñ7 ðR ˆøô 5ó $Ø—‘˜TÔ"Ø—‘Ð BÀ4À&ÐIÔJØ×!Ñ! &Ô)Ø—}‘}×-×-Ø#”Oó .ä-ó $Ø—‘ 	Ô*Ø—‘Ð >¸t¸fÐEÔFØ×!Ñ! &Ô)Ø—}‘}×-×-Ø#”Oó .ð	$ús   ÅAFÆAIÇ2AIÉIÚfind_last_nodec                 ó   • / nX#-   S-  nU(       a  USUS-    OXS nU R                   (       a  U R                  USS5        [        U5      nUS   R                  n	US   R                  n
U(       a  U
OU	nU =R                  S-  sl        U R                  R                  U5        UR                  SSU R                   3/5        UR                  SU(       a  S	OS
 S3SU SX   R                   SU SX   R                   S3	SU	 SU
 3SU 3SX2-
  S-    3/5        [        U R                  5      S-
  n U R                  U5      u  pÞU R                  XÞU
/U5        UR                  SU SX   R                   S35        X&s=:X  a  U:X  ah  O  OeUS:X  a  U(       a  U[        U5      S-
  :X  a7  U(       a0  UR                  SU(       a  S	OS
 S35        U R                  U5        gX$(       a  S-   $ S-   $ UR                  S5        U R                  U5        U(       a  U R                  XS-   X45      $ U R                  XXd5      $ ! [        [        4 a·    UR                  SU	 SU
 S35        X&s=:X  a  U:X  a>  O  O;UR                  SSU SX   R                   S3/5        U R                  U5        Us $ UR                  S5        U R                  U5        U(       a  U R                  XXd5      s $ U R                  XS-   X45      s $ f = f)z¬
Recursive block search implementation.
find_last_node: If True, search for the last node which result in numerics difference
if False: find first node in sorted node list
r×   Nr
   rº   r   z==============================zBlock search iteration zSearch for ÚlastÚfirstz node in culpritsrÐ   rÑ   rÒ   z. zSubgraph constructed by zTargeting node: z$Size of the interested node list is z&Culprits not found from node start to rÕ   zAt z node, no culprits found.rÖ   zCulprits found from node z)This is the last node in the sub-module. z6Search in the current branch is successful with node :z, node name: )rI   r‘   r]   rW   rV   r“   Úextendr^   r±   rÉ   rØ   Ú_block_traverse_implr   r   )r8   rY   rÌ   rÍ   rí   rÂ   rÞ   Úcur_nodes_listrÝ   rÛ   Úlast_node_nameÚtarget_node_namerl   r­   r³   s                  r#   rò   Ú#_MinimizerBase._block_traverse_impl&  s_  € ð ˆàÑ" qÑ(ˆÞ7E 5¨¨3°©7Ñ#3È5ÐQUÈ;ˆà××Ø×Ñ˜n¨b°"Ô5ä˜Ó'ˆ	à(¨Ñ+×0Ñ0ˆØ'¨Ñ+×0Ñ0ˆÞ-;™>ÀÐà�Š˜!Ñ�Ø�‰×Ñ˜FÔ#Ø�‰àØ)¨$¯.©.Ð)9Ð:ðô	
ð 	�‰à®™f¸GÐDÐDUÐVØ" 9 +¨Q¨uÑ/?×/DÑ/DÐ.EÀTÈ'ÈÐRSÐTYÑTb×TgÑTgÐShÐhjÐkØ*¨?Ð*;¸4ÀÐ?OÐPØ"Ð#3Ð"4Ð5Ø6°wÑ7JÈQÑ7NÐ6OÐPðô	
ô ˜Ÿ™Ó&¨Ñ*ˆ
ð?	XØ(,×(=Ñ(=¸iÓ(HÑ%ˆLØ×!Ñ!Ø¨NÐ+;¸Zôð@ �M‰MØ8¸¸¸Q¸u¹z¿¹Ð>OÈqÐQôð Õ* 7Ö*à “N®>Ø¤ U£¨a¡Ó/¶Nà—M‘MØ®™f¸GÐDÐD]Ð^ôð ×%Ñ% fÔ-Øð !­ AÑ@Ð@¸RÑ@Ð@à�M‰Mð+ôð ×Ñ˜fÔ%æØ×0Ñ0Ø ™7 Góð ð ×0Ñ0°À3ÓWÐWøôu 2Ô3MÐNó 	Ø�M‰MØ+¨OÐ+<¸DÀÐ@PÐPQÐRôð Õ* 7Ö*Ø—‘àCØPØ$˜+ ]°5Ñ3C×3HÑ3HÐ2IÈÐKðôð ×!Ñ! &Ô)Ø Ò à�M‰Mð+ôð ×Ñ˜fÔ%æØ×0Ñ0°À3ÓWÒWà×0Ñ0Ø ™7 Góò ð3	ús   Ä7'I ÉA0LÊ8;LË5LÌLc                 ó¨  • [        5       nUS   R                  nUS   R                  nSU SU 3/nUR                  S5        U R                  R                  U5        Sn[	        U5      S-
  nUn	Un
USL nU(       d  U(       a’  UR                  S5        U R                  U5        U R                  XUS	5      n
U
c$  UR                  S
5        U R                  U5        U$ UR                  SSU
 SX   R                   3/5        U R                  U5        U(       d  U(       d¿  S/nU R                  U5        U R                  USUS-    Xz=(       d    US5      n	U	c$  UR                  S
5        U R                  U5        U$ UR                  S5        U R                  R                  U5        UR                  SSU	 SX   R                   3/5        U R                  U5        [        [        U	5      [        [        U
5      píUR                  XUS-    5        SX    SX    S3/nU R                  R                  U5        U R                  U5        U$ )a˜  
Traverse topologically sorted node list
Find minimum block (start_idx, end_idx) which contains the culprit
1st pass: search for end_idx by finding the last node in culprit block
where Numerical accuracy (0, end_idx) > threshold
2nd pass: search for start_idx by finding the first node in culprit block
where Numerical accuracy (start_idx, end_idx) < threshold
Form minimum block by (start_idx - 1, end_idx)
r   rº   zBlock search from rÒ   z2**************************************************r
   Nz(Start searching for last node in culpritTzNo culprits foundzFinish Pass 1zFind end_idx = rÑ   z)Start searching for first node in culpritFzFinish Pass 2zFind start_idx = z'Finish searching, found minimum block (Ú,rL   )r‘   r]   r“   rV   r^   rØ   rò   rñ   r   Úintré   )r8   rY   rí   rÚ   rÛ   rô   Úlast_node_reportrÌ   rÍ   Úfinal_start_idxÚfinal_end_idxÚrun_bothÚfirst_node_reportÚrange_startÚ	range_endÚresult_reports                   r#   Ú_block_traverseÚ_MinimizerBase._block_traverse�  sq  € ô  ›EˆØ ™(Ÿ-™-ˆØ˜r™Ÿ™ˆØ0°Ð0AÀÀnÐEUÐVÐWÐØ×Ñ Ô)Ø�‰×ÑÐ,Ô-àˆ	Ü�e“*˜q‘.ˆà)2ˆØ'.ˆà! TÐ)ˆö –~Ø×#Ñ#Ð$NÔOØ×ÑÐ.Ô/Ø ×5Ñ5°eÈÐQUÓVˆMàÑ$Ø ×'Ñ'Ð(;Ô<Ø×!Ñ!Ð"2Ô3Ø�à×#Ñ#à#Ø% m _°A°eÑ6J×6OÑ6OÐ5PÐQðôð ×ÑÐ.Ô/ö ž>Ø!LÐ MÐØ×ÑÐ/Ô0Ø"×7Ñ7Ø�a˜' A™+Ð&¨	×3KÀGÈUóˆOð Ñ&Ø ×'Ñ'Ð(;Ô<Ø×!Ñ!Ð"2Ô3Ø�à×$Ñ$ XÔ.Ø�L‰L×ÑÐ 1Ô2Ø×$Ñ$à#Ø'¨Ð'8¸¸%Ñ:P×:UÑ:UÐ9VÐWðôð ×ÑÐ/Ô0ô "&¤c¨?Ó!;¼TÄ#À}Ó=U�YØ�‰˜¨I¸©MÐ:Ô;à5°eÑ6HÐ5IÈÈ5ÑK[ÐJ\Ð\]Ð^ð
ˆð 	�‰×Ñ˜MÔ*Ø×Ñ˜-Ô(Øˆr"   c                 ó  • [        5       nU R                  b  U R                  USS5        [        U5      S:X  a   S/nU R                  R	                  U5        U$ US   R
                  nUS   R
                  nSU SU 3/n[        U5      n U R                  U5      u  pxU R                  XxU/5        U R                  U5        U$ ! [        [        4 a*    UR	                  SU 35        U R                  U5        Us $ f = f)z<
run user defined `nodes` and determine if it is a culprit.
rº   r   rÏ   zDefined graph from rÒ   úFound culprit )r‘   rI   r^   rV   r“   r]   r±   rÉ   rØ   r   r   )	r8   rY   rÚ   rÂ   rÛ   rÜ   rÝ   r­   r³   s	            r#   Ú_defined_traverseÚ _MinimizerBase._defined_traverseß  s  € ô  ›EˆØ×ÑÑ(Ø×Ñ˜e R¨Ô,Üˆu‹:˜‹?Ø6Ð7ˆFØ�L‰L×Ñ Ô'ØˆOà ™(Ÿ-™-ˆØ  ™9Ÿ>™>ÐØ'¨Ð'8¸Ð=MÐ<NÐOÐPˆÜ  ›Zˆ	ð	Ø(,×(=Ñ(=¸iÓ(HÑ%ˆLØ×!Ñ! ,Ð>NÐ=OÔPØ×Ñ˜fÔ%ð ˆøô 2Ô3MÐNó 	Ø�M‰M˜N¨9¨+Ð6Ô7Ø×Ñ˜fÔ%ØŠOð	ús   Â7C Ã7D Ã?D c                 ó.  • [        5       n[        5       nU R                  R                  (       a  [        S5        U$ U GH  n/ nU R                  R                  U5        U =R                  S-  sl        UR                  SU R                   S35        UR                  U5        UR                  nUb  [        U[        5      (       a  US   nUb  [        U[        5      (       d  [        SU 35      eUR                  SU 35         U R                  U5      u  pxU R                  XxU/5        U R                  U5        GM     U$ ! [         ["        4 a=    UR                  U5        UR                  SU 35        U R                  U5        Us s  $ f = f)	Nz9'Find All' mode is not supported in accumulate traversal.r
   zAccumulate traverse iteration rÕ   r   zminimize: node_name: z
Add node: r  )r‘   rG   r/   r”   rV   r“   rW   rè   r]   rM   r¾   r@   rQ   r±   rÉ   rØ   r   r   )	r8   rY   rÚ   Únodes_to_runr`   rÂ   Ú	node_namer­   r³   s	            r#   Ú_accumulate_traverseÚ#_MinimizerBase._accumulate_traverseú  si  € Ü›EˆÜ #£ˆð �=‰=×!×!ÜÐMÔNØˆOäˆDØ "ˆFØ�L‰L×Ñ Ô'Ø�NŠN˜aÑ�NØ�M‰MÐ:¸4¿>¹>Ð:JÈ!ÐLÔMà×Ñ˜TÔ"àŸ	™	ˆIØÑ$¬°I¼u×)EÑ)EØ% a™L�	ØÑ ¬
°9¼c×(BÑ(BÜ$Ð'<¸Y¸KÐ%HÓIÐIà�M‰M˜J y kÐ2Ô3ð Ø,0×,AÑ,AÀ,Ó,OÑ)�Ø×%Ñ% lÀ)ÀÔMØ×!Ñ! &×)ñ' ð4 ˆøô 6Ô7QÐRó  Ø—‘˜TÔ"Ø—‘ ¨t¨fÐ5Ô6Ø×!Ñ! &Ô)Ø”ð	 ús   Ä	7EÅAFÆFc           
      ó¢  • [        5       nXU n[        U5      nU R                  b  U R                  XRU5        [        U5      nO8U H2  nXpR                  ;   d  M  UR                  U R                  U   5        M4     / nU R                  R                  U5        U =R                  S-  sl        UR                  SU R                   S35        UR                  SU SUS-
   S[        U5       35         U R                  U5      u  pšU R                  Xš/ 5        UR                  S5        U R                  U5        [        5       $ ! [         a;    UR                  U5        UR                  SU 35        U R                  U5        Us $ [         a;    UR                  U5        UR                  S	U 35        U R                  U5        Us $ f = f)
ú/
Skip certain nodes in graph based on settings
r
   z Nodes block rÕ   rÐ   rÒ   rÓ   rÔ   rä   rå   )r‘   rI   r\   ré   rV   r“   rW   r^   r±   rÉ   rØ   r   r   )r8   rË   rÌ   rÍ   rÚ   rY   rÝ   r`   rÂ   r­   r³   s              r#   Ú_skip_traverse_implÚ"_MinimizerBase._skip_traverse_impl   s«  € ô  ›EˆØ#¨gÐ6ˆÜ  ›Zˆ	Ø×ÑÑ(Ø×Ñ˜e°Ô8Ü˜E›
‰Iã�ØŸ<™<Õ'Ø×$Ñ$ T§\¡\°$Ñ%7Ö8ñ ð ˆØ�‰×Ñ˜FÔ#Ø�Š˜!Ñ�Ø�‰˜ d§n¡nÐ%5°QÐ7Ô8Ø�‰Ø˜y˜k¨¨g¸©k¨]ð ;3Ü36°u³:°,ð@ô	
ð
	Ø(,×(=Ñ(=¸iÓ(HÑ%ˆLØ×!Ñ! ,¸RÔ@ð �M‰MÐ1Ô2Ø×Ñ˜fÔ%Ü“5ˆLøô 1ó 	Ø�O‰O˜IÔ&Ø�M‰MÐ>¸y¸kÐJÔKØ×Ñ˜fÔ%ØŠOÜ)ó 	Ø�O‰O˜IÔ&Ø�M‰MÐ:¸9¸+ÐFÔGØ×Ñ˜fÔ%ØŠOð		ús   Ã5%E ÅAGÆ
AGÇGÚ
skip_nodesc                 ó   • Sn[        U5      nSn[        5       nXT:  a_  X   nUR                  U;   a  XS:”  a  U R                  XU5      nUS-   nO"XTS-
  :X  a  X5::  a  U R                  XUS-   5      nUS-  nXT:  a  M_  U$ )r  r   r
   )r^   r‘   r]   r  )r8   rË   r  rÌ   Ú	num_nodesÚidxrÚ   r`   s           r#   Ú_skip_traverseÚ_MinimizerBase._skip_traverseK  s“   € ð ˆ	Ü˜	“Nˆ	ØˆÜ“5ˆØ‹oØ‘>ˆDØ�y‰y˜JÓ&Ø“?Ø#×7Ñ7¸	ÈcÓR�HØ !™G‘	Ø A™Ó%¨)Ó*:Ø×3Ñ3°IÈ#ÐPQÉ'ÓR�Ø�1‰HˆCð �oð ˆr"   ÚstartÚendc                 ó  • / nUSL nU R                   R                  R                   HV  nUR                  [        ;  a  M  UR
                  U:X  a  SnU(       a  UR                  U5        UR
                  U:X  d  MU    U$    U$ )zr
Collect nodes in the model that between nodes with name of `start` and `end`.
These two nodes are also included.
NT)rD   rX   rY   rZ   r   r]   r“   )r8   r  r  rY   Úadd_noder`   s         r#   Ú_collect_nodesÚ_MinimizerBase._collect_nodes_  sw   € ð
 ˆØ˜D�=ˆà—K‘K×%Ñ%×+Ô+ˆDØ�w‰wÔ/Ó/Ùà�y‰y˜EÓ!Ø�æØ—‘˜TÔ"à�y‰y˜CÕØàˆñ ,ð ˆr"   c                 óÂ  • U R                  X5      n[        U5      nU H2  nXPR                  ;   d  M  UR                  U R                  U   5        M4     / nU R                  R
                  (       a  U Vs/ s H  oUR                  PM     nn U R                  U5      u  pxU R                  XxU5        gs  snf ! [        [        4 a  n	[        U	5         Sn	A	gSn	A	ff = f)a  
Run part of the model from `start` node to `end` node. If `start` is None
then we start from the beginning of the model. If `end` is None then we
stop at the end of the model.

Args:
    start: The name of the node which is the first node of the submodule
        we want to run. If set to None, then we'll start with the first
        node of the model.
    end: The name of the node which is the last node of the submodule we
        want to run. If set to None, we'll end with the last node of the
        model.
N)r  r‘   r\   ré   rG   r0   r]   r±   rÉ   r   r   r”   )
r8   r  r  rY   rÝ   r`   r´   r­   r³   rÅ   s
             r#   Ú	run_nodesÚ_MinimizerBase.run_nodesv  sÄ   € ð ×#Ñ# EÓ/ˆÜ˜“Jˆ	ãˆDØ—|‘|Õ#Ø× Ñ  §¡¨dÑ!3Ö4ñ ð ˆØ�=‰=×,×,Ù27Ó8²%¨$ŸIœI±%ˆLÐ8ð	Ø(,×(=Ñ(=¸iÓ(HÑ%ˆLØ×!Ñ! ,¸\ÕJùò	 9øô 'Ü-ð
ó 	ô �!�H‰Hûð		ús   Á6B4Â%B9 Â9CÃ	CÃCrÂ   c                 ó„   • [        [        U5      5       H(  nUS:”  a  [        SX   -   5        M  [        X   5        M*     g )Nr   z . )Úranger^   r”   )r8   rÂ   rc   s      r#   rØ   Ú_MinimizerBase.print_report˜  s5   € Ü”s˜6“{Ö#ˆAØ�1‹uÜ�e˜f™iÑ'Ö(ä�f‘iÖ ò	 $r"   c                 óL   • U R                    H  nU R                  U5        M     g rŒ   )rV   rØ   )r8   rÂ   s     r#   Úprint_reportsÚ_MinimizerBase.print_reportsŸ  s   € Ø—l”lˆFØ×Ñ˜fÖ%ò #r"   c                 óò  • [        U R                  5        [        U R                  R                  5        U R	                  X5      nU R                  R
                  S:X  a  U R                  U5      $ U R                  R
                  S:X  a  U R                  U5      $ U R                  R
                  S:X  a  U R                  U5      $ U R                  R
                  S:X  a  Uc  [        S5      eU R                  XS5      $ U R                  R
                  S:X  a  U R                  U5      $ U R                  R
                  S:X  a  U R                  XT5      $ [        SU R                  R
                   S	35      e)
aê  
Minimizing the model from node with name `start` to node with name `end` base
on self.settings. Find culprits that causes FxNetMinimizerRunFuncError or
FxNetMinimizerResultMismatchError errors.

Args:
    start: The name of the node where we want to start minimizing. If set
        to None, then we'll start with the first node of the model.
    end: The name of the node where we want to terminate minimizing. If
        set to None, we'll end with the last node of the model.
    skip_nodes: The names of nodes where we want to skip during minimizing.
        It'll create subgraphs without these skip nodes under the hood.
        Only applicable in mode "skip".
    find_last_node: True if only last_node of a culprits is needed in mode "block".
        False if only the first_node of a culprits is needed.
        Only applicable in mode "block".

Returns:
    nodes: A list of nodes that causes FxNetMinimizerRunFuncError or
        FxNetMinimizerResultMismatchError errors during minimizing.
r-   ÚbinaryÚ
accumulateÚskipz<'skip_nodes' can't be None when 'traverse_method' is 'skip'.ÚdefinedÚblockzUnknown traverse method rŠ   )r”   rG   rD   rX   r  r.   rë   rá   r  ro   r  r  r  )r8   r  r  r  rí   rY   s         r#   rŸ   Ú_MinimizerBase.minimize£  s=  € ô: 	ˆd�m‰mÔÜˆd�k‰k×ÑÔ à×#Ñ# EÓ/ˆà�=‰=×(Ñ(¨LÓ8Ø×,Ñ,¨UÓ3Ð3à�=‰=×(Ñ(¨HÓ4Ø×(Ñ(¨Ó/Ð/à�=‰=×(Ñ(¨LÓ8Ø×,Ñ,¨UÓ3Ð3à�=‰=×(Ñ(¨FÓ2ØÑ!Ü"ØRóð ð ×&Ñ& uÓ9Ð9à�=‰=×(Ñ(¨IÓ5Ø×)Ñ)¨%Ó0Ð0à�=‰=×(Ñ(¨GÓ3Ø×'Ñ'¨Ó>Ð>äÐ5°d·m±m×6SÑ6SÐ5TÐTUÐVÓWÐWr"   )rS   rT   rF   rI   r\   rW   rD   rH   rV   rU   rE   rG   )NN)rf   N)rº   )NNNN).r   r   r   r   r    rN   rO   rP   r   r   r   r   r¾   Úfloatr>   r*   r   r@   r   rù   rd   r[   rq   ru   r…   r›   r   r¨   r±   rÉ   rÙ   rá   rë   rò   r  r  r  r  Úlistr  r  r  rØ   r$  rŸ   r!   r   r"   r#   rB   rB   Z   sÅ  † ñð0 ØGKñ93à—‘×$Ñ$ð93ð ð93ð Ø˜o¨uÐ5°u¸UÀD¸[Ñ7IÐIñ
ð	93ð (ð93ð "Ø�g˜uŸx™x×3Ñ3°SÐ9¸4Ð?Ñ@ñ
ð93ð ˜x¨°3¸Ð(<¸dÐ(BÑCÑDõ93ôv=ð MOñ:Ø—8‘8×'Ñ'ð:Ø18ð:ØFIð:à	õ:ð MOñ:Ø—8‘8×'Ñ'ð:Ø18ð:ØFIð:à	õ:ð7à!ð7ð "ð7ð —8‘8×'Ñ'ô	7ð<2 Ø Ÿ8™8×/Ñ/ð2 Ø>Að2 à	ˆw˜ÐÑ	 ô2 ðh$¨ô $ð2$, gð $,°%¸¿¹×8LÑ8LÈcÐ8QÑ2Rô $,ðV ñ[Yà—h‘h×*Ñ*ð[Yð ð[Yð ð	[Yð
 õ[YðzBØ!ðBØ.1ðBØ<?ðBà	ôBðH> hð >°7ô >ð/¨(ð /°wô /ðbhXØðhXØ*-ðhXØ8;ðhXØMQðhXà	�#‰ôhXðTMØðMØ/7¸©~ðMà	ôMð^ xð °Gô ð6$¨(ð $°wô $ðL)Ø!ð)Ø.1ð)Ø<?ð)à	ô)ðV¨ð ¸dð Àwô ð( H¨S¡Mð ¸À¹ð È(ô ñ. ˜x¨™}ð  ¸(À3¹-õ  ðD! 4¨¡9ô !ò&ð  $Ø!Ø%)Ø)-ñ8Xà˜‰}ð8Xð �c‰]ð8Xð ˜T‘Nð	8Xð
 ! ™ð8Xð 
÷8Xð 8Xr"   rB   )%ÚloggingÚcollections.abcr   Údataclassesr   Útypingr   r   r   rN   Útorch.fxÚtorch.fx._compatibilityr   Útorch.fx.noder	   Ú
shape_propr   Úsplit_utilsr   Útools_commonr   r   r   r   r   r   r   Ú__all__Ú	getLoggerr   ræ   rÁ   r   r   r   r*   rB   r   r"   r#   Ú<module>r;     sÖ   ðã Ý $Ý !ß &Ñ &ã Û Ý 1Ý !å !Ý &÷÷ ñ ò€ð ×
Ò
˜HÓ
%€ñ  eÑ,ô 9ó ó -ðñ  eÑ,ô ó ó -ðñ  eÑ,ô¨	ó ó -ðð ÷ð ó ð÷DAXò AXr"   