Ë
    g^(hé�  ã                   ó\  — U d Z ddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlmZ ddlmZ ddlmZ ddlmZmZmZmZ ddlmZ ddlZddlmZ ddlmZ ddlmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/ dd	l0m1Z1 dd
l2m3Z3m4Z4m5Z5 ddl6m7Z7 ddl8m9Z9 ddl:m;Z; ddl<m=Z=m>Z> ddl?m@Z@ ddlAmBZB erddlCmDZDmEZE ddlFmGZG  ej�                  eI«      ZJ ed«      ZKeKjc                  «       ZLdddeMddfd„ZNd„ ZOddddœd„ZPddddddddœd „ZQdd!œd"„ZRdeMfd#„ZS	 	 	 	 	 d6deMfd$„ZTd7d%„ZU	 d7ddd&œd'„ZV ej®                  e!d(¬)«      ZXd*„ ZYeU ej®                  eVd(d(¬&«      eVd+œZZe[eMeej¸                  ege]f   f   e^d,<   d-„ Z_d.„ Z`d/„ Zad0„ Zbd1„ Zcdd2ddddd3œd4ee]eMf   fd5„Zdy)8a€  
Utilities for reproducing and debugging issues in PyTorch's Dynamo AOT compilation.

This module provides tools and infrastructure for:
1. Generating minimal reproducible test cases ("repros") from failing compilations
2. Analyzing accuracy issues between eager and compiled execution
3. Minifying large models/inputs to isolate problematic patterns
4. Debugging compiler errors and accuracy divergences

The main components include:
- Repro generation: Creates standalone Python files that reproduce compiler issues
- Minification: Reduces large graphs to minimal failing examples
- Accuracy analysis: Compares compiled vs eager execution, with fp64 reference
- Debug tools: Dumps graph state, tracks intermediates, analyzes divergences

This is primarily used by PyTorch developers and researchers to debug issues in
the Dynamo AOT compilation pipeline, particularly for the Inductor backend.
é    N)ÚSequence)Úimport_module)ÚTemporaryFile)ÚAnyÚCallableÚTYPE_CHECKINGÚUnion)ÚUnpack)Ú_cuda_system_info_commentÚAccuracyErrorÚbackend_accuracy_failsÚBuckTargetWriterÚcast_to_fp64Ú
extra_depsÚextra_importsÚgenerate_config_stringÚgenerate_env_vars_stringÚhelper_for_dump_minifyÚInputReaderÚInputWriterÚMAX_CONSTANT_NUMEL_INLINEÚminifier_dirÚNNModuleToStringÚNopInputReaderÚsame_two_models)Ú	is_fbcode)Úclone_inputsÚcountersÚsame)Ú
OutputCode)ÚFakeScriptObject)Úmake_fx)Úfx_placeholder_targetsÚhas_free_symbols)Útqdmé   )Úconfig)Ú_CompileFxCallableÚ_CompileFxKwargs)Ú	InputTypeztorch._inductor.configÚunconfigured_compiler_fnr(   Úcompiler_nameÚreturnc           	      ó¬   ‡ ‡— t        j                  ‰ «      dt        j                  j                  dt
        d   dt        d   dt        fˆˆ fd„«       }|S )a]  
    Minifier for Fx Graph modules after Aot Autograd has finished. We wrap both
    forward and backward call separately with the backend compiler_fn - like
    inductor or nvfuser. Intercepting after Aot Autograd presents neat
    abstraction, where all the params are lifted as graph inputs, making it easy
    to save the graph as a string.
    ÚgmÚexample_inputsr*   Úkwargsr)   r-   c                 óª  •‡ ‡‡‡‡	‡
‡— ddl mŠ t        j                  ‰fi |¤Ž}ddlm}  |«       Št        j                  ‰ j                  «      Št        j                  dv sJ ‚	  |‰ ‰«      Š	d	t&        d
   dt(        dt*        fˆ	ˆ
fd„}ˆˆˆˆ ˆˆ	ˆfd„Š
t        j                  dk(  r|}d|_        |S ‰	S # t        $ r“ t        j                  dk(  r~t        j                  dk(  r"t        t        j                  ‰ ‰«      ‰‰«       n4t        j                  dk(  r!t!        t        j                  ‰ ‰«      ‰‰«       t"        j%                  d«       ‚ w xY w)Nr   )ÚFakeTensorMode)Úget_aot_graph_name)ÚdynamoÚaotNr6   é   r&   ÚCompilerErrorÚreal_inputsr*   Ú_kwargsr-   c                 óÎ   •— |rJ ‚t         j                  dk7  rt        ‰t        «      rJ ‚ ‰| «      S t        j                  d ¬«      5   ‰| «      cd d d «       S # 1 sw Y   y xY w)Nr6   )Úrepro_after)r'   r<   Ú
isinstanceÚstrÚpatch)r9   r:   Úinner_compiled_fnÚinner_debug_fns     €€ú[/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/torch/_dynamo/repro/after_aot.pyÚdeferred_for_real_inputszLwrap_compiler_debug.<locals>.debug_wrapper.<locals>.deferred_for_real_inputs’   s`   ø€ ñ Ð�;Ü×!Ñ! UÒ*Ü%Ð&7¼Ô=Ð=Ð=Ù(¨Ó5Ð5Ü—‘¨$Ô/ñ 3Ù% kÓ2÷3÷ 3ò 3ús   Á	AÁA$c                 ó  •—  ‰«       }| D �cg c]/  }t        |t        j                  «      r|j                  |«      n|‘Œ1 }}t        j
                  dk(  r!t        t        j                  ‰
‰«      | ‰«       t        j
                  dk(  r¢‰dk7  rt        d«      ‚t        ‰
‰| dt        j                  ¬«       }|rit        j                  d‰«       t        t        j                  ‰
‰«      | ‰› d�«       t        t        j                  ‰
‰«      | ‰› d�«       t        d	«      ‚ ‰| «      S 	  ‰| «      }‰	D ]J  }t        |t        j                  «      sŒ|j                   sŒ+t        j"                  j%                  «         |S  |S c c}w # t&        $ rk t        j
                  d
k(  r"t        t        j                  ‰
‰«      |‰«       ‚ t        j
                  dk(  r!t        t        j                  ‰
‰«      |‰«       ‚ w xY w)ai  
            Aot Autograd fw_compiler and bw_compiler can have fake tensors. So,
            example_inputs can be fake tensors. We can call compiler_fn (which is
            inductor or nvfuser) with fake tensors but the actually compiled_fn
            should be called with real tensors. Therefore, the actual invocation
            is deferred.
            é   é   Úinductorz4Accuracy minification is supported for inductor onlyT©Úonly_fwdÚignore_non_fpz-Accuracy failed for the AOT Autograd graph %sÚ	_accuracyúBad accuracy detectedr7   r&   )r=   ÚtorchÚTensorÚfrom_tensorr'   Úrepro_levelÚdump_to_minifyÚfxÚGraphModuleÚNotImplementedErrorr   Úrepro_ignore_non_fpÚlogÚwarningÚdump_compiler_graph_stater   Úis_cudaÚcudaÚsynchronizeÚ	Exception)r9   Ú	fake_modeÚxÚcopy_tensor_attrsÚfailedÚoutÚargr3   r,   r0   r/   Ú
graph_namer@   Ú
orig_graphs          €€€€€€€rB   rA   zBwrap_compiler_debug.<locals>.debug_wrapper.<locals>.inner_debug_fnŸ   s  ø€ ñ 'Ó(ˆIð %ö!àô -7°q¼%¿,¹,Ô,G�	×%Ñ% aÔ(ÈQÑNð!Ðð !ô ×!Ñ! QÒ&äÜ—N‘N 2 zÓ2°KÀôô ×!Ñ! QÒ&Ø  JÒ.Ü-ØNóð ô -ØØ%ØØ!Ü"(×"<Ñ"<ôð �ñ Ü—K‘KØGÈôô .ÜŸ™ r¨:Ó6Ø#Ø(˜/¨Ð3ôô
 #ÜŸ™ r¨:Ó6Ø#Ø(˜/¨Ð3ôô
 (Ð(?Ó@Ð@ñ -¨[Ó9Ð9ðá+¨KÓ8�Cà-ò "˜Ü% c¬5¯<©<Õ8¸S¿[»[Ü!ŸJ™J×2Ñ2Ô4Ø!Ø�Jð	"ð �Jùòe!øôf !ò Ü×)Ñ)¨QÒ.Ü1ÜŸN™N¨2¨zÓ:Ø-Ø)ôð ô  ×+Ñ+¨qÒ0Ü&ÜŸN™N¨2¨zÓ:Ø-Ø)ôð
 ðús$   �4FÄ-'F ÅF Å" F ÆF ÆA4G?T)Útorch._subclassesr3   Ú	functoolsÚpartialÚtorch._functorch.aot_autogradr4   ÚcopyÚdeepcopyÚgraphr'   r<   r\   rP   rX   rR   rS   rQ   rV   Úerrorr   Úobjectr   Ú_boxed_call)r/   r0   r1   Úcompiler_fnr4   rC   Úcompiled_fnr3   rc   r@   rA   rd   r,   r+   s   ``     @@@@@€€rB   Údebug_wrapperz*wrap_compiler_debug.<locals>.debug_wrapperg   sG  ÿ€ õ 	5ä×'Ñ'Ð(@ÑKÀFÑKˆåDá'Ó)ˆ
ô —]‘] 2§8¡8Ó,ˆ
Ü×!Ñ!Ð%<Ñ<Ð<Ð<ð	ñ !,¨B°Ó ?Ðð,	3Ü! +Ñ.ð	3Ü;Að	3äö	3÷L	ò L	ô\ ×Ñ Ò&Ø2ˆKØ&*ˆKÔ#ØÐà$Ð$øôk ò 	ô ×!Ñ! UÒ*Ü×%Ñ%¨Ò*Ü-ÜŸ™ r¨:Ó6Ø&Ø%õô
 ×'Ñ'¨1Ò,Ü"ÜŸ™ r¨:Ó6Ø&Ø%ôô
 —	‘	˜/Ô*Øð#	ús   Á&	B6 Â6BE)rf   ÚwrapsrM   rR   rS   r   r
   r    )r+   r,   rq   s   `` rB   Úwrap_compiler_debugrs   [   si   ù€ ô ‡_�_Ð-Ó.ðJ%Ü�H‰H× Ñ ðJ%ä  Ñ-ðJ%ô Ð+Ñ,ðJ%ô 
õ	J%ó /ðJ%ðX Ðó    c                  óš   — t         r@dj                  t        D � cg c]  } d| › d�‘Œ
 c} «      }t        |«      dkD  rd|z   }d|› d�S yc c} w )Nú
z	        "z",r   a'  """
To run this script in fbcode:
- Create a directory (//scripts/{your_unixname}/repro)
- Put this file in scripts/{your_unixname}/repro/fx_graph_runnable.py
- Add a TARGETS file that looks like the following
- `buck2 run //scripts/{your_unixname}/repro:repro`

NOTE: you may need additional deps to actually be able to run the script.
```
# Contents of TARGETS file
load("@fbcode_macros//build_defs:python_binary.bzl", "python_binary")

python_binary(
    name = "repro",
    main_src = "fx_graph_runnable.py",
    deps = [
        "//caffe2:torch",z
    ],
)
```
"""
Ú )r   Újoinr   Úlen)ÚdepÚextra_deps_formatteds     rB   Úmaybe_fbcode_instructionsr|   ü   si   € ÝØ#Ÿy™yÌÖ)TÀ#¨I°c°U¸"Ò*=Ò)TÓUÐÜÐ#Ó$ qÒ(Ø#'Ð*>Ñ#>Ð ðð" /Ð/ð 0ð#ð 	ð0 ùò7 *Us   šAF©Ústable_outputÚsave_dirÚstable_hashc                óÀ  — t        j                  dt        |¬«      › dt        |¬«      › dt        › dt        «       › d�	«      }|s¤|dt        j                  j                  › d�z  }t        t        j                  d«      r!|d	t        j                  j                  › d�z  }t        t        j                  d
«      r!|dt        j                  j                  › d�z  }|t        «       z  }|t        j                  | «      z  }d„ }t        ||¬«      }t!        t#        | «      |«      D ]‹  \  }}	t%        |	t&        t        j(                  f«      r|j+                  ||	«       Œ9t%        |	t        j,                  «      r|j/                  ||	«       Œf|	€|j1                  |«       Œz|j3                  ||	«       Œ� |dj5                  |j7                  «       «      dz   z  }|dz  }|S )Nrv   )r~   z°
import torch
from torch import tensor, device
import torch.fx as fx
from torch._dynamo.testing import rand_strided
from math import inf
import torch._inductor.inductor_prims

z!

isolate_fails_code_str = None

z

z	
        z# torch version: rZ   z# torch cuda version: Úgit_versionz# torch git version: z


c                 ó&   — t        d„ | D «       «      S )Nc              3   ó€   K  — | ]6  }t        |t        j                  «      r|j                  j                  n|–— Œ8 y ­w©N)r=   rM   ÚSymIntÚnodeÚhint)Ú.0Úis     rB   ú	<genexpr>zIgenerate_compiler_repro_string.<locals>.hint_if_symint.<locals>.<genexpr>>  s*   è ø€ ÒRÈ1¤J¨q´%·,±,Ô$?�Q—V‘V—[’[ÀQÓFÑRùs   ‚<>)Útuple)r^   s    rB   Úhint_if_symintz6generate_compiler_repro_string.<locals>.hint_if_symint=  s   € ÜÑRÐPQÔRÓRÐRrt   ©r€   zmod = Repro()
)ÚtextwrapÚdedentr   r   r   r|   rM   ÚversionÚ__version__ÚhasattrrZ   r‚   r   r   Úconvertr   Úzipr#   r=   Úintr†   ÚsymintrN   ÚtensorÚconstÚunsupportedrx   Úlines)
r/   Úargsr~   r   r€   Ú	model_strr�   ÚwriterÚplaceholderrb   s
             rB   Úgenerate_compiler_repro_stringr      sÀ  € ô —‘ðÜ¨Ô6Ð 7ð 8ô  mÔ4Ð 5ð 6ô €ð äÓÐ ð 	ð	ó€Iñ& ØÐ(¬¯©×)BÑ)BÐ(CÀ2ÐFÑFˆ	Ü”5—=‘= &Ô)ØÐ1´%·-±-×2DÑ2DÐ1EÀRÐHÑHˆIÜ”5—=‘= -Ô0ØÐ0´·±×1JÑ1JÐ0KÈ6ÐRÑRˆIØÔ.Ó0Ñ0ˆ	àÔ!×)Ñ)¨"Ó-Ñ-€IòSô ˜¨{Ô;€FÜÔ 6°rÓ :¸DÓAò 1Ñˆ�SÜ�cœC¤§¡Ð.Ô/Ø�M‰M˜+ sÕ+Ü˜œUŸ\™\Ô*à�M‰M˜+ sÕ+Øˆ[Ø�L‰L˜Õ%ð ×Ñ˜{¨CÕ0ð1ð �—‘˜6Ÿ<™<›>Ó*¨TÑ1Ñ1€IàÐ"Ñ"€IØÐrt   Úrun)r~   r   ÚcommandÚaccuracyÚtracing_modeÚ	check_strr€   c                ód  — t        d„ |D «       «      r| j                  d«       y | j                  t        |||||
¬«      «       |€d|v }|€d}t        d„ |D «       «      rd}| j                  d«       | j                  d	«       | j                  d
|›d|›d|›d|›d|	›d|›d|›d|›d|	›d�«       y )Nc              3   óŒ   K  — | ]<  }t        |t        j                  j                  j                  j
                  «      –— Œ> y ­wr…   )r=   rM   rR   ÚexperimentalÚ_backward_stateÚBackwardState)r‰   rb   s     rB   r‹   z#save_graph_repro.<locals>.<genexpr>b  s5   è ø€ ò àô 	�3œŸ™×-Ñ-×=Ñ=×KÑK×Lñùs   ‚AAzGRepro is not generated due to existence of BackwardState in graph inputr}   rK   Úrealc              3   óT   K  — | ]   }t        |t        «      rŒt        |«      –— Œ" y ­wr…   )r=   r!   r$   )r‰   Úas     rB   r‹   z#save_graph_repro.<locals>.<genexpr>x  s%   è ø€ ò 
Ø$%´ZÀÔCSÕ5TÔ˜Q×ñ
ùs   ‚(˜(Úsymboliczif __name__ == '__main__':
z8    from torch._dynamo.repro.after_aot import run_repro
zE    with torch.no_grad():
        run_repro(mod, load_args, accuracy=z
, command=z, save_dir=z, tracing_mode=z, check_str=z_)
        # To run it separately, do 
        # mod, args = run_repro(mod, load_args, accuracy=z, command='get_args', save_dir=z)
        # mod(*args))ÚanyÚwriter    )Úfdr/   rœ   r,   r~   r   r¢   r£   r¤   r¥   r€   s              rB   Úsave_graph_repror²   T  s  € ô ñ àôô ð 	�‰ØUô	
ð 	à‡H�HÜ&ØØØ'ØØ#ô	
ôð ÐØ -Ð/ˆØÐØˆÜñ 
Ø)-ô
ô 
ð &ˆLØ‡H�HÐ+Ô,Ø‡H�HÐHÔIØ‡H�Hð6Ø6>°\ÀÈGÈ;ð WØ�<˜¨|Ð.>¸lÈ9È-ð XDàDLÀ<ð PØ�<˜¨|Ð.>¸lÈ9È-ð Xð	 õrt   )r£   c          	      óX  — t         j                  j                  t        «       d«      }t         j                  j	                  |«      st        j
                  |d¬«       t         j                  j                  |t        | j                  j                  «      › d�«      }t        j                  dt        | j                  j                  «      |«       t        |d«      5 }t        || ||||¬«       d d d «       t        j                  «       }t         j                  j                  |d«      }	 t        j                  ||«       t        j                  d	|«       t         rt#        |«      j%                  «        y y # 1 sw Y   Œ‹xY w# t&        $ r t        j                  d
|«       Y y w xY w)NÚcheckpointsT©Úexist_okú.pyz&Writing checkpoint with %s nodes to %sÚw)r   r£   zrepro.pyz(Copying repro file for convenience to %szNo write permissions for %s)ÚosÚpathrx   r   ÚexistsÚmakedirsry   rk   ÚnodesrV   rW   Úopenr²   ÚgetcwdÚshutilÚcopyfileÚuse_buckr   r°   ÚOSError)	r/   rœ   r,   r£   ÚsubdirÚ	file_namer±   ÚcurdirÚ
repro_paths	            rB   rX   rX   ‰  s2  € Ü�W‰W�\‰\œ,›.¨-Ó8€FÜ�7‰7�>‰>˜&Ô!Ü
�‰�F TÕ*Ü—‘—‘˜V¬¨B¯H©H¯N©NÓ(;Ð'<¸CÐ%@ÓA€IÜ‡K�KØ0´#°b·h±h·n±nÓ2EÀyôô 
ˆi˜Ó	ð 
 ÜØ��D˜-°&À8õ	
÷
ô �Y‰Y‹[€FÜ—‘—‘˜f jÓ1€Jð?Ü�‰˜	 :Ô.Ü�‰Ð>À
ÔKÝÜ˜YÓ'×-Ñ-Õ/ð ÷
ð 
ûô ò ?Ü�‰Ð1°:Ö>ð?ús   ÃE;Ä.AF Å;FÆF)Æ(F)c                 ó:  — t        j                  «       }t        j                  j	                  t        «       d«      }t        j                  j                  |«      st        j                  |d¬«       t        || |||d¬«       t        |j                  «       «      S )Nr´   Trµ   Úminify)r   r¢   )ÚioÚStringIOr¹   rº   rx   r   r»   r¼   r²   r   Úgetvalue)r/   rœ   r,   ra   rÄ   s        rB   rQ   rQ   ¥  sd   € Ü
�+‰+‹-€Cä�W‰W�\‰\œ,›.¨-Ó8€FÜ�7‰7�>‰>˜&Ô!Ü
�‰�F TÕ*Ü�S˜"˜d M¸FÈHÕUÜ! #§,¡,£.Ó1Ð1rt   c                 ón  — |€i }t         j                  j                  t        j                  «       d«      }t         j                  j	                  |«      st        j
                  |d¬«       t         j                  j                  |t        t        j                  «       «      d d › d�«      }	t        |	d«      5 }
t        |
| |||d|||¬«	       d d d «       t         j                  j                  «       }i |¥|¥}t        «       t        «       }}t        rt        |	«      j!                  d	¬
«      }nd|	g}t#        j$                  |||||¬«      }|j'                  «        |j)                  d«       |j)                  d«       t+        t-        j.                  |j1                  «       j3                  d«      d¬«      t4        j6                  ¬«       t+        t-        j.                  |j1                  «       j3                  d«      d¬«      t4        j8                  ¬«       |j:                  dk7  S # 1 sw Y   �Œ]xY w)NÚisolateTrµ   é   r·   r¸   úminifier-query)r   r¢   r£   r¤   r¥   F)Ú	print_msgÚpython)ÚcwdÚstdoutÚstderrÚenvr   zutf-8z>>  )Úprefix)Úfile)r¹   rº   rx   r¿   r»   r¼   r>   ÚuuidÚuuid4r¾   r²   Úenvironri   r   rÂ   r   r°   Ú
subprocessÚPopenÚwaitÚseekÚprintr�   ÚindentÚreadÚdecodeÚsysrÔ   rÕ   Ú
returncode)Úfx_grœ   r,   rÖ   r   r£   r¤   r¥   rÄ   rÅ   r±   Únew_envrÔ   rÕ   ÚcmdÚps                   rB   Úisolate_failsrê   ¯  s¹  € ð €{ØˆÜ�W‰W�\‰\œ"Ÿ)™)›+ yÓ1€FÜ�7‰7�>‰>˜&Ô!Ü
�‰�F TÕ*Ü—‘—‘˜V¬¬D¯J©J«LÓ(9¸"¸1Ð(=Ð'>¸cÐ%BÓC€IÜ	ˆi˜Ó	ð 
 ÜØØØØØØ$ØØ%Øõ
	
÷
ô �j‰j�o‰oÓ€GØ �Ð ˜CÐ €GÜ"“_¤m£oˆF€FåÜ˜yÓ)×/Ñ/¸%Ð/Ó@‰à˜Ð#ˆä×ÑØØØØØô	€Að ‡F�F„Hà
‡K�K�„NØ
‡K�K�„NÜ	Ü�‰˜Ÿ™›×,Ñ,¨WÓ5¸fÔEÌCÏJÉJõô 
Ü�‰˜Ÿ™›×,Ñ,¨WÓ5¸fÔEÌCÏJÉJõð �<‰<˜1ÑÐ÷S
ñ 
ús   Â:H*È*H4c                 óè  ‡	— dŠ	|D ]-  }t        |t        j                  «      sŒ|j                  sŒ+dŠ	 n ˆ	fd„}ddlm} 	  | |Ž }t        |t        t        f«      sJ ‚t        d„ |D «       «      rJ ‚	  |«        	  || |«      }t        |t        «      rJ ‚ ||«        |«        y# t        $ r Y yw xY w# t        $ r2}|�|t        |«      vrY d }~yt        t        |«      «       Y d }~yd }~ww xY w)NFTc                  óH   •— ‰ rt         j                  j                  «        y y r…   )rM   rZ   r[   )Úhas_cudas   €rB   Úsynczinductor_fails.<locals>.sync÷  s   ø€ Ùä�J‰J×"Ñ"Õ$ð rt   r   ©Úcompile_fx_innerc              3   óH   K  — | ]  }t        |t        t        f«      –— Œ y ­wr…   )r=   rŒ   Úlist)r‰   r^   s     rB   r‹   z!inductor_fails.<locals>.<genexpr>  s   è ø€ ÒD¸”z !¤e¬T ]×3ÑDùs   ‚ ")r=   rM   rN   rY   Útorch._inductor.compile_fxrð   rŒ   rò   r¯   r\   r>   Úreprrà   )
ræ   rœ   r¥   rb   rî   rð   ÚresultÚcompile_modÚerí   s
            @rB   Úinductor_failsrø   ð  s÷   ø€ Ø€HØò ˆÜ�cœ5Ÿ<™<Õ(¨S¯[«[ØˆHÙðô
%õ
 <ðÙ�t�ˆÜ˜&¤5¬$ -Ô0Ð0Ð0ÜÑD¸VÔDÔDÐDÐDÐDñ 	„Fð	Ù& t¨TÓ2ˆÜ˜k¬3Ô/Ð/Ð/Ù�DÔÙŒð øô ò Ùðûô ò ØÐ  Y´d¸1³gÑ%=ÜÜŒd�1‹gŒÜûð	ús0   Á1B' Á<*B6 Â'	B3Â2B3Â6	C1Â?C,ÃC,Ã,C1©Úrequire_fp64rJ   c                ó.   — ddl m} t        | ||||¬«      S )Nr   rï   rù   )ró   rð   Úbackend_aot_accuracy_fails)ræ   rœ   r¥   rú   rJ   rð   s         rB   Úinductor_accuracy_failsrý     s#   € õ <ä%ØØØØ!Ø#ôð rt   T)rI   c                 ó²  — t        |j                  «       «      rJ ‚|j                  «       D ]3  \  }}|j                  «       t        kD  sŒt
        j                  d|«       Œ5 t        |d«      st
        j                  d«       n/|j                  dkD  r t
        j                  d|j                  «       t        «       } ||«       t        d|j                  ¬«      5 }t        | j                  |¬«      } ||«       |j                  }d d d «        t        || j                   ¬	«      Ž }d
t"        j$                  j&                  _        ||fS # 1 sw Y   ŒFxY w)Nz¥Constant %s was not serialized, generated random data instead. If you think this is affecting you, please comment on https://github.com/pytorch/pytorch/issues/100468Ú_versionzzload_args does not have a _version attribute, please file a bug to PyTorch and describe how you generate this repro scriptr   z¾load_args is version %s, but this version of PyTorch only supports version 0.  We will try to run it anyway but there may be an incompatibility; if so, try upgrading your version of PyTorch.zLoading inputs©ÚdescÚtotal)r   Úpbar)r¤   T)r¯   Únamed_parametersÚnamed_buffersÚnumelr   rV   rW   r“   rÿ   r   r%   r  r   r   rœ   r"   r¤   rM   Ú	_inductorr'   Úgenerate_intermediate_hooks)	ÚoptionsÚmodÚ	load_argsÚnÚbÚ
nop_readerr  Úinput_readerrœ   s	            rB   Úrepro_commonr  *  s;  € ä�3×'Ñ'Ó)Ô*Ð*Ð*Ø×!Ñ!Ó#ò ‰ˆˆ1Ø�7‰7‹9Ô0Ó0Ü�K‰KðCð õ	ðô �9˜jÔ)Ü�‰ð>õ	
ð
 ×Ñ Ò!Ü�K‰Kð@ð ×"Ñ"ô	ô  Ó!€JÙˆjÔä	Ð#¨:×+;Ñ+;Ô	<ð !ÀÜ"¨G×,<Ñ,<À4ÔHˆÙ�,ÔØ× Ñ ˆ÷!ð :Œ'�# G×$8Ñ$8Ô
9¸4Ð
@€Cà9=„E‡O�O×ÑÔ6à�ˆ9Ð÷!ð !ús   Ã,EÅE)rw   r£   Ústrict_accuracyÚACCURACY_FAILSc                 óð   — t        | ||«      \  }}t        j                  t        | j                     | j
                  ¬«      } |||«      rt        j                  d«       y t        j                  d«       y )N©r¥   r7   r   )r  rf   rg   r  r£   r¥   rä   Úexit)r	  r
  r  rœ   Úfail_fns        rB   Úrepro_minifier_queryr  b  s]   € Ü˜W c¨9Ó5�I€CˆÜ×ÑÜ�w×'Ñ'Ñ(Ø×#Ñ#ô€Gñ ˆs�DÔÜ�‰��ä�‰��rt   c                 ój  — ddl m} t        | ||«      \  }}| j                  dk7  rdnd}t        j
                  j                  «       dk\  rdnd}dt        |«      i}| j                  r>t        j                  t        ||| j                  | j                  | j                  ¬	«      }nt        | j                     } |||t        j                  || j                  ¬
«      t        j                  t         |¬«      | j                  | j"                  | j$                  | j&                  | j(                  ¬«	       y )Nr   )Úminifierrw   Úinductor_accuracyrG   r&   r7   ÚCUDA_VISIBLE_DEVICES)rÖ   r,   r   r£   r¤   r  )r,   )Úmodule_failsÚ
dump_stater   Úoffload_to_diskÚskip_offloadÚskip_sanityÚmax_granularity)Úfunctorch.compiler  r  r£   rM   rZ   Údevice_countr>   rÎ   rf   rg   rê   r   r¤   r  r¥   rX   r  Úskip_saving_eager_intermediatesr   r!  )	r	  r
  r  r  rœ   r,   Úfavored_deviceÚenv_variablesr  s	            rB   Úrepro_minifyr'  n  s  € Ý*ä˜W c¨9Ó5�I€CˆØ+2×+;Ñ+;¸rÒ+AÑ'Àz€MäŸ*™*×1Ñ1Ó3°qÒ8‘Q¸a€NØ+¬S°Ó-@ÐA€Mð ‡‚Ü ×(Ñ(ÜØØ'Ø×%Ñ%Ø×%Ñ%Ø ×-Ñ-ô
‰ô & g×&6Ñ&6Ñ7ˆáØØÜ×&Ñ& |¸w×?PÑ?PÔQÜ×$Ñ$Ü%°]ô
ð ×!Ñ!Ø×/Ñ/Ø×<Ñ<Ø×'Ñ'Ø×/Ñ/ört   c                 óv  ‡ ‡‡‡‡‡— ddl m} ddlm} t	        ‰ ||«      \  }}t        d¬«      5   |||«      }d d d «       t        d   d   }t        «       Šˆˆ ˆˆfd„}t        j                  j                  j                  ‰ j                  ‰ j                  ¬	«      Št        j                  j                  j                  ‰ j                  «      Št        |«      }	 ||«      5  t        d
|¬«      5 Št!        t"        «      rJ ‚ ||	«       |	rJ ‚	 d d d «       d d d «       d„ Šˆˆˆˆfd„}
‰ j$                  s?t        |«      }	 ||
«      5  t        d|¬«      5 Š |	«       |	rJ ‚	 d d d «       d d d «        G ˆˆˆfd„dt&        j(                  «      }‰ j*                  s]t-        t/        j0                  |«      t        |«      «      \  }}	t        d|¬«      5 Š ||d«      j3                  |	«       d d d «       |	rJ ‚ G ˆˆˆˆˆfd„dt&        j(                  «      }‰ j$                  s]t-        t/        j0                  |«      t        |«      «      \  }}	t        d|¬«      5 Š ||«      j3                  |	«       |	rJ ‚	 d d d «        G ˆˆˆfd„dt&        j(                  «      }t        d|¬«      5 Š ||«      j3                  |«       d d d «       |rJ ‚y # 1 sw Y   �ŒžxY w# 1 sw Y   �ŒÒxY w# 1 sw Y   �Œ×xY w# 1 sw Y   �Œ–xY w# 1 sw Y   �Œ›xY w# 1 sw Y   �Œ&xY w# 1 sw Y   Œ¦xY w# 1 sw Y   ŒhxY w)Nr   rï   )Úintermediate_hookÚ	Compiling)r  rG   Úintermediate_hooksc                 óÂ   •— ‰j                  | «       ‰j                  s0‰j                  t        j                  j                  d| «      |«       ‰j                  d«       y )NrG   r7   )ÚaddÚ"skip_saving_inductor_intermediatesÚwrite_tensorr¹   rº   rx   Úupdate)ÚnameÚvalÚknown_namesr	  r  rž   s     €€€€rB   Ú	save_hookz repro_analyze.<locals>.save_hook¥  sB   ø€ Ø�‰˜ÔØ×9Ò9Ø×Ñ¤§¡§¡¨Z¸Ó >ÀÔDØ�‰�A�rt   rŽ   zSaving inductor intermediatesr   c                 óÔ   — t        t        | «      «      D �cg c]  }| |   ||   k7  sŒ|‘Œ }}|D �cg c]  }| |   ||   f‘Œ }}|sy dj                  d„ |D «       «      S c c}w c c}w )Nz and c              3   ó0   K  — | ]  \  }}|› d |› �–— Œ y­w)z != N© )r‰   r­   r  s      rB   r‹   z8repro_analyze.<locals>.compare_tuples.<locals>.<genexpr>À  s   è ø€ ÒF±$°!°Q 1 # T¨!¨¤ÑFùs   ‚)Úrangery   rx   )Útuple1Útuple2rŠ   Údiff_indicesÚdiff_valuess        rB   Úcompare_tuplesz%repro_analyze.<locals>.compare_tuples¹  sq   € Ü#(¬¨V«Ó#5ÖP˜a¸À¹ÀfÈQÁiÓ9OšÐPˆÐPØ7CÖD°!˜˜q™	 6¨!¡9Ò-ÐDˆÐDáØà—<‘<ÑF¸+ÔFÓFÐFùò QùÚDs   —A ¨A ²A%c                 óî   •— ‰j                  |«      }‰j                  t        j                  j	                  d| «      «      } ‰||«      }|�‰j                  d| › d|› d�«       ‰j                  d«       y )NrG   zNONDETERMINISTIC INDUCTOR at ú (ú)r7   )Úcompute_tensor_metadataÚread_tensor_metadatar¹   rº   rx   r°   r0  )	r1  r2  ÚmetaÚmeta2Úreasonr=  r  Úreaderrž   s	        €€€€rB   Ú
check_hookz!repro_analyze.<locals>.check_hookÂ  sk   ø€ Ø×-Ñ-¨cÓ2ˆØ×+Ñ+¬B¯G©G¯L©L¸ÀTÓ,JÓKˆÙ  eÓ,ˆØÐØ�J‰JÐ6°t°f¸B¸v¸hÀaÐHÔIØ�‰�A�rt   zChecking inductor determinismc                   ó2   •‡ — e Zd Zdˆ fd„Zˆ ˆˆˆfd„Zˆ xZS )ú#repro_analyze.<locals>.WriterInterpc                 ó2   •— t         ‰| �  |«       || _        y r…   )ÚsuperÚ__init__rÄ   )Úselfr
  rÄ   Ú	__class__s      €rB   rL  z,repro_analyze.<locals>.WriterInterp.__init__Ô  s   ø€ Ü‰GÑ˜SÔ!Ø ˆD�Krt   c                 óÜ   •— t         ‰| �  |«      }|j                  }|‰v rK‰j                  d«       ‰j	                  t
        j                  j                  | j                  |«      |«       |S )Nr7   )	rK  Úrun_noder1  r0  r/  r¹   rº   rx   rÄ   )rM  r  Úrr1  rN  r3  r  rž   s       €€€€rB   rP  z,repro_analyze.<locals>.WriterInterp.run_nodeØ  sV   ø€ Ü‘Ñ  Ó#ˆAØ—6‘6ˆDØ�{Ñ"Ø—‘˜A”Ø×#Ñ#¤B§G¡G§L¡L°·±¸dÓ$CÀQÔGØˆHrt   )r-   N)Ú__name__Ú
__module__Ú__qualname__rL  rP  Ú__classcell__)rN  r3  r  rž   s   @€€€rB   ÚWriterInterprI  Ó  s   ù„ õ	!÷	ó 	rt   rV  zSaving float64 intermediatesÚfloat64c                   ó*   •‡ — e Zd Zˆ ˆˆˆˆˆfd„Zˆ xZS )ú(repro_analyze.<locals>.ExactReaderInterpc                 ó.  •— t         ‰| �  |«      }|j                  }|‰	v rt‰j                  |«      }‰j	                  t
        j                  j                  d|«      «      } ‰||«      }|�‰
j                  d|› d|› d�«       ‰
j                  d«       |S )NrW  zNONDETERMINISTIC FLOAT64 at r?  r@  r7   )
rK  rP  r1  rA  rB  r¹   rº   rx   r°   r0  )rM  r  rQ  r1  rC  rD  rE  rN  r=  r3  r  rF  rž   s          €€€€€€rB   rP  z1repro_analyze.<locals>.ExactReaderInterp.run_nodeé  s�   ø€ Ü‘Ñ  Ó#ˆAØ—6‘6ˆDØ�{Ñ"Ø×5Ñ5°aÓ8�Ø×3Ñ3´B·G±G·L±LÀÈDÓ4QÓR�Ù'¨¨eÓ4�ØÐ%Ø—J‘JÐ!=¸d¸VÀ2ÀfÀXÈQÐOÔPØ—‘˜A”ØˆHrt   ©rR  rS  rT  rP  rU  )rN  r=  r3  r  rF  rž   s   @€€€€€rB   ÚExactReaderInterprY  è  s   ù„ ÷
	õ 
	rt   r\  zChecking float64 determinismc                   ó&   •‡ — e Zd Zˆ ˆˆˆfd„Zˆ xZS )ú#repro_analyze.<locals>.ReaderInterpc                 ó¨  •‡‡— t         ‰| �  |«      }|j                  Š‰‰	v r¯‰j                  t        j
                  j                  d‰«      «      }‰j                  t        j
                  j                  d‰«      «      }dŠˆˆˆ
fd„}t        |||t        j                  j                  j                  d|¬«      s‰sJ ‚‰
j                  d«       |S )NrG   rW  Fc                 ó>   •— dŠ‰j                  d‰› d| |z  › �«       y )NTzDIVERGED at z: )r°   )Úmsgrœ   Úloggedr1  r  s     €€€rB   Ú	log_errorz?repro_analyze.<locals>.ReaderInterp.run_node.<locals>.log_error  s%   ø€ à!�FØ—J‘J ¨d¨V°2°c¸D±j°\ÐBÕCrt   T)ÚtolÚ	equal_nanrc  r7   )rK  rP  r1  Úread_tensorr¹   rº   rx   r   rM   Ú_dynamor'   Úrepro_tolerancer0  )rM  r  rQ  rG   rW  rc  rb  r1  rN  r3  r  rF  s         @@€€€€rB   rP  z,repro_analyze.<locals>.ReaderInterp.run_node   s±   ú€ Ü‘Ñ  Ó#ˆAØ—6‘6ˆDØ�{Ñ"Ø!×-Ñ-¬b¯g©g¯l©l¸:ÀtÓ.LÓM�Ø ×,Ñ,¬R¯W©W¯\©\¸)ÀTÓ-JÓK�Ø�öDô
 ØØØÜŸ™×,Ñ,×<Ñ<Ø"Ø'õñ "�M˜6Ø—‘˜A”ØˆHrt   r[  )rN  r3  r  rF  s   @€€€rB   ÚReaderInterpr^  ÿ  s   ù„ ÷	ó 	rt   ri  zChecking divergence)ró   rð   Útorch._inductor.hooksr)  r  r%   r   ÚsetrM   ÚutilsÚ_content_storeÚContentStoreWriterr   r€   ÚContentStoreReaderr   r=   r>   Úskip_check_deterministicrR   ÚInterpreterÚ!skip_saving_float64_intermediatesr   ri   rj   Ú	boxed_run)r	  r
  r  rð   r)  rœ   Úcompiledr  r4  Únew_argsrG  rV  Únew_modr\  ri  r=  r3  r  rF  rž   s   `              @@@@@rB   Úrepro_analyzerw  “  së  ý€ Ý;Ý7ä˜W c¨9Ó5�I€Cˆô 
�;Ô	ñ /Ù# C¨Ó.ˆ÷/ä�ZÑ Ð!5Ñ6€Eä“%€K÷ô �[‰[×'Ñ'×:Ñ:Ø×Ñ g×&9Ñ&9ð ;ó €Fô �[‰[×'Ñ'×:Ñ:¸7×;KÑ;KÓL€Fä˜DÓ!€Há˜)Ó$ñäÐ1¸Ô?ðàCGä˜h¬Ô,Ð,Ð,Ù�ÔÙÐˆ|�8÷÷ òG÷ð ×+Ò+Ü Ó%ˆá˜jÓ)ñ	 äÐ5¸UÔCð	 àGKá�XÔÙÐ�<�x÷	 ÷ 	 ÷ð ”r—~‘~ô ð ×4Ò4Ü(¬¯©°sÓ);¼\È$Ó=OÓPÑˆ�ÜÐ5¸UÔCð 	AÀtÙ˜ )Ó,×6Ñ6°xÔ@÷	AáÐˆ|÷ò œBŸN™Nô ð ×+Ò+Ü(¬¯©°sÓ);¼\È$Ó=OÓPÑˆ�ÜÐ5¸UÔCð 	 ÀtÙ˜gÓ&×0Ñ0°Ô:ÙÐ�<�x÷	 ÷ð ”r—~‘~ô ô4 
Ð(°Ô	6ð *¸$Ù�SÓ×#Ñ# DÔ)÷*á€Oˆ8ˆt÷y/ñ /ú÷$ñ ú÷ ñ ú÷6	 ñ 	 ú÷ 	 ñ 	 ú÷0	Añ 	Aú÷*	 ð 	 ú÷@*ð *úsw   ¯
KÃ$K/Ã2K"ÄK/ÅL	ÅK<Å(L	ÇLÉ!L#Ê0L/ËKË"K,	Ë'K/Ë/K9Ë<L	ÌL	Ì	LÌL Ì#L,Ì/L8c                 ó*   — t        | ||«      \  }}||fS r…   )r  )r	  r
  r  rœ   s       rB   Úrepro_get_argsry    s   € Ü˜W c¨9Ó5�I€CˆØ�ˆ9Ðrt   c                 ó‚  — ddl m} t        | ||«      \  }}ddlm}  |||«      }t        |t        «      rJ ‚| j                  dk7  r*t        |||dt        j                  ¬«      st        d«      ‚y d}|D ]-  }t        |t        j                  «      sŒ|j                  sŒ+d} n  |t        |«      «       |r |«        y y )	Nr   rï   )r[   rw   TrH   rL   F)ró   rð   r  Ú
torch.cudar[   r=   r>   r£   r   r'   rU   r   rM   rN   rY   rò   )	r	  r
  r  rð   rœ   r[   rt  Ú	need_syncrb   s	            rB   Ú	repro_runr}  #  sÃ   € Ý;ä˜W c¨9Ó5�I€Cˆå&á  TÓ*€HÜ˜(¤CÔ(Ð(Ð(à×Ñ˜2Òô ØØØØÜ ×4Ñ4õ
ô  Ð 7Ó8Ð8ð
ð ˆ	àò 	ˆCÜ˜#œuŸ|™|Õ,°·³Ø �	Ùð	ñ
 	”�d“ÔáÙ�Mð rt   rw   )r¢   r£   r   r¤   Ú
patch_coder¥   r£   c                óL  ‡‡‡— |D ]  }	t         j                  d|	«       Œ ‰du rdŠn‰du rdŠ|�t         j                  d«       t        j                  d|› d|› d	‰›d
‰›d‰›d|›d�t        j                  ¬«      }
ˆˆˆfd„}|
j                  ddd¬«      }|j                  dd¬«      } ||«       |j                  dd¬«      } ||«       |j                  dd¬«      } ||«       |j                  «       }|j                  dddd¬«       |j                  ddd d!¬"«       |j                  d#dd$¬%«       |j                  d&dd'¬%«       |j                  d(dd)¬%«       |j                  d*t        d d+¬,«       |j                  d-t        |d.¬,«       |j                  d/d0¬«      } ||«       |j                  d1dd2¬%«       |j                  d3dd4¬%«       |j                  d5dd6¬%«       |j                  d7dd8¬%«       |j                  d9«      } ||«       |j                  d-t        |d.¬,«       d }t        t        j                  «      d:k  r|gt        j                  d:d  ¢}|
j                  |«      }t        t         t"        t$        t&        d;œ} ||j(                     || |«      S )<NzPUnrecognized kwarg %s; perhaps this repro was made on a newer version of PyTorchTr£   Frw   zHpatch_code no longer works on this version of PyTorch, silently ignoringzˆAn after_aot repro script, typically triggering a bug in PyTorch Inductor.
When run with no arguments, this script defaults to running 'z8'.
Extra flags may be available; to find out more, try 'zr --help'.
There are also alternate subcommands available, see below.

default settings on this script:
  accuracy=z
  tracing_mode=z
  save_dir=z
  check_str=rv   )ÚdescriptionÚformatter_classc                 óB  •— | j                  «       }|j                  dddd‰d¬«       |j                  ddd‰d¬	«       |j                  d
ddd‰d¬«       | j                  dt        ‰dd¬«       | j                  dddd d¬«       | j                  dt        d‰d¬«       y )Nz--no-accuracyr£   Ústore_constrw   z>do not test accuracy, just run the module and see if it errors)ÚdestÚactionr™   ÚdefaultÚhelpz
--accuracyaÿ  test if the RMSE between the compiled module and the fp64 reference is greater
than eager and the fp64 reference. This is usually more reliable than the
standard allclose test, as we expect numeric differences from compiling, often
improving accuracy over eager.  RMSE test allows for compiled module to
diverge greatly from eager, as long as this divergence moves it closer to the
'true' mathematical value of the network.  Caveats: (1) double precision can
still suffer from rounding error, so it is not a perfect reference (see for
example 'Herbie: Automatically Improving Floating Point Accuracy') for
approaches that detect the necessary working precision and compute it in
arbitrary precision floating point; unfortunately, this is not practical for
tensor computation; (2) if there are not enough samples in the output being
compared, we may get unlucky and have an unlucky greater RMSE than eager; this
could be overcome by applying a more rigorous statistical test at some
p-value, which we leave for future work.
)r…  r™   r†  r‡  z--strict-accuracyr  aœ  by default, when doing accuracy minification we will reject reductions which
change the divergence from a floating point divergence to a integral/boolean
divergence.  This is because some operations like ReLU involve temporarily
sharp boundaries that smooth out again afterwards; without requiring
divergence on floating point, the minifier will often fixate on divergent
boolean tensor even though this is not the true source of the divergence.
However, rejecting these reductions makes it more difficult for the minifier
to make process.  Using this option will let the minifier progress for ALL
divergences--you just might not end up with a useful repro in the end.z
--save-dirÚDIRz!directory where saved inputs live)Útyper†  Úmetavarr‡  z--no-save-dirr   z(don't use any directory for saved inputs)r„  r…  r™   r‡  z--tracing-modez{real,fake,symbolic}z>how to trace the repro module into a GraphModule with metadata)r‰  rŠ  r†  r‡  )Úadd_mutually_exclusive_groupÚadd_argumentr>   )ÚparserÚaccuracy_groupr£   r   r¤   s     €€€rB   Úcommon_flagszrun_repro.<locals>.common_flagss  sò   ø€ Ø×<Ñ<Ó>ˆØ×#Ñ#ØØØ ØØØQð 	$ô 	
ð 	×#Ñ#ØØ ØØðð 	$ô 	
ð, 	×#Ñ#ØØØ Ø#Øð	Jð 	$ô 	
ð$ 	×ÑØÜØØØ4ð 	ô 	
ð 	×ÑØØØ ØØ;ð 	ô 	
ð 	×ÑØÜØ*Ø ØQð 	õ 	
rt   r¢   z{run,minify,analyze})r„  rŠ  Úrequiredr¡   zjust run the repro)r‡  rÉ   zrun the minifier on the reproÚget_argszget the argsz	--isolateÚ
store_truez9run in separate processes to avoid interference (default))r…  r†  r‡  z--no-isolaterÎ   Ústore_falsez3speed up by running all compilation in same process)r„  r…  r‡  z!--skip-saving-eager-intermediatesz+skip saving eager intermediates on --minify)r…  r‡  z--offload-to-diskzYduring minification, offload delta debugging intermediates to disk.  Use if you're OOMingz--skip-sanityz@skip sanity check at beginning of minification on original graphz--max-granularityz;start at this granularity and work down; must be power of 2)r‰  r†  r‡  z--check-strzBrequire minified program to fail with error containing this stringÚanalyzez&run the accuracy analyzer on the reproz$--skip-saving-inductor-intermediatesz/skip saving inductor intermediates on --analyzez#--skip-saving-float64-intermediatesz!skip saving float64 intermediatesz--skip-check-deterministicz/skip checking that the network is deterministicz--stable-hashz>use SHA-1 checksum instead of fast (but possibly unsound) hashrÐ   r7   )rÉ   r”  rÐ   r¡   r‘  )rV   rW   ÚargparseÚArgumentParserÚRawTextHelpFormatterÚadd_subparsersÚ
add_parserr‹  rŒ  r–   r>   ry   rä   ÚargvÚ
parse_argsr'  rw  r  r}  ry  r¢   )r
  r  r¢   r£   r   r¤   r~  r¥   r1   Úkr�  r�  Ú
subparsersÚ
parser_runÚparser_minifyÚparser_get_argsÚparser_minify_isolateÚparser_analyzeÚparser_minifier_queryrœ   r	  ÚCOMMAND_FNSs      ```                rB   Ú	run_repror¥  G  s„  ú€ ð ò 
ˆÜ�‰Ø^Øõ	
ð
ð �4ÑØ‰Ø	�UÑ	ØˆàÐÜ�‰ØVô	
ô ×$Ñ$ð>à>E¸Yð G6Ø6=°Yð ?ð €+ð Ø€/ð Ø€+ð Ø€,ð ðô !×5Ñ5ô€Fö F
ðP ×&Ñ&ØÐ 6Àð 'ó €Jð ×&Ñ&ØØ!ð 'ó €Jñ �Ôà×)Ñ)ØÐ6ð *ó €Mñ �ÔØ ×+Ñ+¨J¸^Ð+ÓL€OÙ�Ô!Ø)×FÑFÓHÐØ×&Ñ&ØØØØHð	 'ô ð ×&Ñ&ØØØØBð	 'ô ð ×ÑØ+ØØ:ð ô ð ×ÑØØØhð ô ð
 ×ÑØØØOð ô ð
 ×ÑØÜØØJð	 ô ð ×ÑØÜØØQð	 ô ð  ×*Ñ*ØÐ@ð +ó €Nñ �Ô Ø×ÑØ.ØØ>ð  ô ð
 ×ÑØ-ØØ0ð  ô ð
 ×ÑØ$ØØ>ð  ô ð
 ×ÑØØØMð  ô ð '×1Ñ1ØóÐñ Ð&Ô'Ø×&Ñ&ØÜØØQð	 'ô ð €DÜ
Œ3�8‰8ƒ}˜ÒØÐ'œ#Ÿ(™( 1 2˜,Ð'ˆà×Ñ Ó%€GäÜ Ü.ÜÜ"ñ€Kð (ˆ;�w—‘Ñ'¨°°iÓ@Ð@rt   )NNNNNr…   )eÚ__doc__r•  ri   rf   rÊ   Úloggingr¹   rÀ   rÜ   rä   r�   rÙ   Úcollections.abcr   Ú	importlibr   Útempfiler   Útypingr   r   r   r	   Útyping_extensionsr
   rM   Útorch.fxrR   Útorch.nnÚnnÚtorch._dynamo.debug_utilsr   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   Útorch._dynamo.trace_rulesr   Útorch._dynamo.utilsr   r   r   Útorch._inductor.output_coder    Ú"torch._library.fake_class_registryr!   Ú"torch.fx.experimental.proxy_tensorr"   Ú%torch.fx.experimental.symbolic_shapesr#   r$   Ú	torch.hubr%   rw   r'   ró   r(   r)   Útorch._inductor.utilsr*   Ú	getLoggerrR  rV   Úinductor_configrÂ   r>   rs   r|   r    r²   rX   rQ   rê   rø   rý   rg   rü   r  r  ÚdictÚModuleÚboolÚ__annotations__r  r'  rw  ry  r}  r¥  r7  rt   rB   ú<module>r¿     s  ðòó& Û Û Û 	Û Û 	Û Û Û 
Û Û Ý $Ý #Ý "ß 6Ó 6Ý $ã Ý Ý ÷÷ ÷ ÷ õ õ& 0ß <Ñ <Ý 2Ý ?Ý 6÷õ å ñ ßOÝ/ð €g×Ñ˜Ó!€ñ  Ð 8Ó9€Ø×$Ñ$Ó&€ðYØ2ðYàðYð óYòBðB  %¨tÀô5ð| ØØØØØØô2ðj DHô ?ð82¨Có 2ð 	ØØØØñ9ð ó9óB!ðJ ðØ05ÀUôð /˜Y×.Ñ.Ð/EÐPTÔUÐ ò(ðX 	ð
 "�	×!Ñ!Ø¨dÀ$ôð /ñ
?€��S˜( B§I¡I¨sÐ#3°TÐ#9Ñ:Ð:Ñ;ó 
ò	ò"òJHòVò
 ðP Ø!#ØØØØò_Að
 �D˜#�IÑô_Art   