Ë
    g^(hƒZ  ã                  ó¬  — U d Z ddlm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
mZmZmZmZ ddlmZ ddlZddlmZmZ ddlmZmZmZmZ dd	lmZmZ dd
lmZmZm Z m!Z!m"Z" ddl#m$Z$ ddl%m&Z& ddl'm(Z( er$ddl)m*Z* ddl+m,Z, ddl-m.Z. ddl/m0Z0 ddl1m2Z2 ddl3m4Z4  ejj                  e6«      Z7ejp                   G d„ d«      «       Z9e:Z;de<d<   d(d„Z=d)d„Z>d*d„Z?	 	 	 	 	 	 	 	 	 	 d+d„Z@	 	 	 	 	 	 	 	 d,d„ZA G d„ d «      ZB G d!„ d"eB«      ZCejp                   G d#„ de9«      «       ZDejp                   G d$„ d%e9«      «       ZEejp                   G d&„ d'e9«      «       ZFy)-aÞ  
This provides an abstract class which parametrizes over an "output code" concept
for Inductor.  Intuitively, this represents the compiled callable which Inductor
produces which you can call to get optimized code.  However, this callable
has some other capabilities:

- It is serializable, so you can save/load this product from disk without
  having to do compilation again.

- (When using remote cache) it is addressable, so you can save just a key
  which you can use to load this product from remote cache later.

This class is abstract because we have several different implementations of
serialized format:

- Python wrapper (the default)

- AOTInductor (this produces ABI stable binaries which work across PyTorch
  versions)

é    )ÚannotationsN)ÚPath)ÚAnyÚCallableÚOptionalÚTYPE_CHECKINGÚUnion)Ú	TypeAlias)ÚcountersÚget_runtime_metrics_context)ÚBoxedDeviceIndexÚCudagraphCachedInfoÚget_placeholder_infoÚ#log_cudagraph_skip_and_bump_counter)Úhas_frozen_paramsÚis_frozen_param)Úalign_inputs_from_check_idxsÚ	BoxedBoolÚ	InputTypeÚoutput_nodeÚ"set_tracing_context_output_strides)Ú
OrderedSeté   )Úconfig)ÚAutotuneCacheBundler)ÚCounter)ÚSequence)Úmetrics)ÚGraphLowering)Ú_CompileFxKwargs)ÚTritonKernelArtifactsc                  óš   — e Zd ZU  ej                  dd¬«      Zded<    ej                  dd¬«      Zded<   dd„Z	 	 	 	 	 	 	 	 dd	„Z	dd
„Z
y)Ú
OutputCodeNF)ÚdefaultÚinitúOptional[str]Ú_fx_graph_cache_keyzOptional[int]Ú_time_taken_nsc                ó*   — t        t        | «      «      ‚©N©ÚNotImplementedErrorÚtype©ÚselfÚinputss     úY/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/torch/_inductor/output_code.pyÚ__call__zOutputCode.__call__N   ó   € Ü!¤$ t£*Ó-Ð-ó    c                ó*   — t        t        | «      «      ‚r*   r+   ©r/   Úexample_inputsÚ
cudagraphsÚ	constantss       r1   Úpost_compilezOutputCode.post_compileQ   s   € ô "¤$ t£*Ó-Ð-r4   c                ó*   — t        t        | «      «      ‚r*   r+   ©r/   Útriton_bundles     r1   Úset_triton_bundlezOutputCode.set_triton_bundleZ   r3   r4   ©r0   zSequence[Any]Úreturnr   ©r7   úSequence[InputType]r8   r   r9   ÚCompiledFxGraphConstantsr@   ÚNone©r=   r   r@   rD   )Ú__name__Ú
__module__Ú__qualname__ÚdataclassesÚfieldr'   Ú__annotations__r(   r2   r:   r>   © r4   r1   r#   r#   D   sn   … ð
 *;¨×):Ñ):À4ÈeÔ)TÐ˜ÓTð %6 K×$5Ñ$5¸dÈÔ$O€N�MÓOó.ð.à+ð.ð ð.ð ,ð	.ð
 
ó.ô.r4   r#   r
   Ú_StrideExprStrc                óÜ   — t        | t        j                  «      sy t        | j                  «      D �cg c].  }| j                  |«      dk(  sŒ| j                  |«      dk7  sŒ-|‘Œ0 c}S c c}w ©Nr   r   )Ú
isinstanceÚtorchÚTensorÚrangeÚndimÚstrideÚsize)ÚtÚis     r1   Úget_expanded_dimsrY   e   sL   € Ü�aœŸ™Ô&ØÜ˜QŸV™V“}ÖL�!¨¯©°«°qÓ(8¸Q¿V¹VÀA»YÈ!»^ŠAÒLÐLùÒLs   ³A)ÁA)Á"A)c                ól   — |D ].  }t         j                  j                  j                  | |dd«      } Œ0 | S rO   )rQ   ÚopsÚatenÚslice)rW   Úexpanded_dimsÚexpanded_dims      r1   Úindex_expanded_dimsr`   k   s4   € Ø%ò 8ˆÜ�I‰I�N‰N× Ñ   L°!°QÓ7‰ð8à€Hr4   c                ó  — t         j                  ryt        | t        | «      «      j	                  «       } t        j                  | «      dk7  r­| j                  «       }| j                  }t        t        t        |«      «      «      }t        t        ||«      «      D ��cg c]  \  }}|‘Œ	 }}}t        t        |«      «      D ]6  }|dk(  rdn
|||dz
        }|dk(  rdn
|||dz
        }|||      ||z  k  sŒ6 y yc c}}w )NTr   r   F)r   Ú*always_complex_memory_overlap_TESTING_ONLYr`   rY   ÚsqueezerQ   Ú_debug_has_internal_overlaprU   ÚshapeÚlistrS   ÚlenÚsortedÚzip)	rW   ÚstridesÚsizesÚindicesÚ_ÚxrX   Úprev_strideÚ	prev_sizes	            r1   Úcomplex_memory_overlaprq   q   sø   € Ü×8Ò8Øô 	˜AÔ0°Ó3Ó4×<Ñ<Ó>€AÜ×(Ñ(¨Ó+¨qÒ0Ø—(‘(“*ˆØ—‘ˆÜ”uœS ›\Ó*Ó+ˆÜ!'¬¨G°WÓ(=Ó!>×?™˜˜A’1Ð?ˆÑ?Ü”s˜7“|Ó$ò 	ˆAØ  Ašv™!¨7°7¸1¸q¹5±>Ñ+BˆKØ !šV™¨¨w°q¸1±u©~Ñ)>ˆIØ�w˜q‘zÑ" [°9Ñ%<Ó<Ùð		ð
 ùó @s   ÂC;ÚCompiledFxGraphc                ó¨  ‡‡— |j                   €J ‚|j                  €J ‚|j                  }|j                  }|j                  }|j                  d   }|j                  d   }|�s|j                  }	|	d   }
|j
                  }|j                  }t        j                  j                  s-| D ](  }t        |t        j                  «      sŒt        |«       Œ* |�1|s/|s-|j                  t        t!        |j"                  «      «      «       ddlm} |j                   }|€J ‚ |||
xs dt        t!        |j"                  «      «      |||t)        |j+                  «       «      |t)        |j,                  «      ¬«	      |_         yt/        j0                  |«       |rt        j                  j                  re|€J ‚|j2                  €J ‚|j                   Št        j4                  j                  j7                  |j2                  d	¬
«      Š‰€J ‚dˆˆfd„}||_         d|j8                  v r1|j:                  rt=        |j:                  «       yt=        d|› �«       yy)z¡
    Checks for any reasons not to run cudagraphs and then
    runs it on compiled_graph.
    Mutates the `compiled_graph.current_callable` and `cudagraphs`
    NÚis_inferenceÚis_backwardÚstatic_input_idxsr   )ÚcudagraphifyrL   )rv   Údevice_indexÚstack_tracesru   rt   r9   ÚplaceholdersÚmutated_input_idxsF)Úcreate_if_none_existsc                ó4   •— ‰j                  «         ‰| «      S r*   )Úset_to_running_backward)Ú
new_inputsÚcompiled_graph_callableÚmanagers    €€r1   Úcompiled_artifactz1cudagraph_post_compile.<locals>.compiled_artifactÎ   s   ø€ Ø×/Ñ/Ô1Ù.¨zÓ:Ð:r4   Úcudaúskipping cudagraphs due to )r   z	list[Any]r@   zCallable[..., Any])Úcurrent_callableÚcudagraph_infoÚcudagraph_fail_reasonsÚboxed_forward_device_indexÚ	fx_kwargsrz   ry   r   ÚtritonÚcudagraph_treesrP   rQ   ÚSymIntÚintÚsetÚnextÚiterÚdevice_idxsÚ
compile_fxrw   ÚtupleÚvaluesr{   r   ÚdisableÚvalueÚ	_inductorÚget_managerÚdevice_typesÚdisabled_cudagraphs_reasonr   )r7   Úcompiled_graphr8   r9   Úcached_infor‡   rˆ   rt   ru   r‰   rv   rz   ry   rW   rw   r…   r‚   r€   r�   s                    @@r1   Úcudagraph_post_compiler�   ‡   sC  ù€ ð ×*Ñ*Ð6Ð6Ð6Ø×(Ñ(Ð4Ð4Ð4Ø ×/Ñ/€KØ(×?Ñ?ÐØ!/×!JÑ!JÐØ!×+Ñ+¨NÑ;€LØ ×*Ñ*¨=Ñ9€Kâ!Ø"×,Ñ,ˆ	Ø%Ð&9Ñ:Ðà"×/Ñ/ˆØ"×/Ñ/ˆÜ�}‰}×,Ò,à#ò �Ü˜a¤§¡Õ.Ü˜•Fðð
 'Ð2Ù Ùà&×*Ñ*¬4´°^×5OÑ5OÓ0PÓ+QÔRå,à)×:Ñ:ÐØÐ+Ð+Ð+Ù*6ØØ/Ò5°2Üœd >×#=Ñ#=Ó>Ó?Ø%Ø#Ø%Ü˜I×,Ñ,Ó.Ó/Ø%Ü$ ^×%FÑ%FÓGô
+
ˆÕ'ô 	×Ñ˜*Ô%ñ
 œ6Ÿ=™=×8Ò8Ø-Ð9Ð9Ð9Ø-×3Ñ3Ð?Ð?Ð?Ø&4×&EÑ&EÐ#ä—o‘o×5Ñ5×AÑAØ*×0Ñ0Èð Bó ˆGð Ð&Ð&Ð&ö;ð /@ˆNÔ+à�^×0Ñ0Ñ0ð ×8Ò8Ü3Ø"×=Ñ=õô 4Ø1Ð2HÐ1IÐJõð 1r4   c                ó~   — | s;|j                   €J ‚t        |j                   |«      }||j                   ur||_         yyy)zÃ
    Realigns input strides from inputs_to_check if
    we didn't end up running cudagraphs. Mutates
    `compiled_graph.current_callable` if cudagraphs
    was run. Otherwise, does nothing.
    N)r…   r   )Úran_cudagraphsr›   Úinputs_to_checkÚnew_callables       r1   Úmaybe_realign_inputsr¢   á   sP   € ñ Ø×.Ñ.Ð:Ð:Ð:Ü3Ø×+Ñ+¨_ó
ˆð ˜~×>Ñ>Ñ>Ø.:ˆNÕ+ð ?ð r4   c                  ó   — e Zd ZdZdd„Zy)rC   a\  Wrapper class that unwraps constants from a compiled fx graph. This
    version of the class only supports directly grabbing the saved constants off of
    a CompiledFxGraph.

    With freezing, FxGraphCache doesn't store the constants of the input
    GraphModule it gets from AOTAutograd. Instead, it saves just the **names**
    of those constants, and grabs the constant values directly from the graph module
    passed in at runtime.

    Thing is, we don't always *have* the graph module available at runtime, hence
    the existence of this class and its CompiledFxGraphConstantsWithGm counterpart.

    To support freezing, FXGraphCache gets passed a CompiledFxGraphConstantsWithGm during
    post compile. Otherwise, CompiledFxGraphConstants supports the basic case of loading
    the value of constants directly off of the original saved object.
    c                ó6   — |j                   €J ‚|j                   S r*   )r9   )r/   Úgs     r1   ÚunwrapzCompiledFxGraphConstants.unwrap  s   € Ø�{‰{Ð&Ð&Ð&Ø�{‰{Ðr4   N©r¥   rr   r@   údict[str, torch.Tensor])rF   rG   rH   Ú__doc__r¦   rL   r4   r1   rC   rC   õ   s   „ ñô"r4   rC   c                  ó    — e Zd ZdZdd„Zdd„Zy)ÚCompiledFxGraphConstantsWithGma/  
    This version of CompiledFxGraphConstants, instead of grabbing constants
    directly saved on CompiledFxGraphs, will just grab their names. Then, it takes
    a second GraphModule to grab the corresponding constant values out of.

    This is necessary for supporting freezing in FxGraphCache.
    c                ó   — || _         y r*   ©Úgm)r/   r®   s     r1   Ú__init__z'CompiledFxGraphConstantsWithGm.__init__  s	   € Øˆ�r4   c           	     ó¼   — |j                   j                  «       D ��ci c]  \  }}|t        | j                  |«      “Œ }}}|j                  xs i }i |¥|¥S c c}}w r*   )Úfrozen_param_namesÚitemsÚgetattrr®   r9   )r/   r¥   ÚnameÚ	orig_nameÚfrozen_paramsr9   s         r1   r¦   z%CompiledFxGraphConstantsWithGm.unwrap  si   € ð $%×#7Ñ#7×#=Ñ#=Ó#?÷
á��ið ”'˜$Ÿ'™' 9Ó-Ñ-ð
ˆñ 
ð —K‘KÒ% 2ˆ	Ø-�)Ð-˜}Ð-Ð-ùó
s   ž!AN)r®   útorch.fx.GraphModuler@   rD   r§   )rF   rG   rH   r©   r¯   r¦   rL   r4   r1   r«   r«     s   „ ñóô.r4   r«   c                  ó”  — e Zd ZU dZded<   ded<    ej                  d¬«      Zded<   d	ed
<   ded<   ded<   ded<   ded<   ded<   ded<   ded<   ded<   ded<   ded<   ded<   ded<   d ed!<   d"ed#<   d$ed%<   d&ed'<   d(Zd)ed*<   d(Z	d+ed,<   	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d3d-„Z
d4d.„Z	 	 	 	 	 	 	 	 d5d/„Zd6d0„Zd7d1„Zd8d2„Zy()9rr   zr
    Class holding a compiled FX graph. This is the object serialized on disk
    to support FxGraph caching.
    úOptional[Callable[..., Any]]r…   ÚstrÚ	cache_keyF)ÚreprÚsource_codezOptional[list[tuple[int, str]]]Úcache_linemapzOrderedSet[str]r™   zOrderedSet[int]r‘   Úmutated_inputsr{   z!Optional[dict[str, torch.Tensor]]r9   zdict[str, str]r±   z dict[str, torch._C.ScriptObject]Útorchbind_constantsz4Optional[list[Optional[tuple[_StrideExprStr, ...]]]]Úoutput_stridesr&   rš   úmetrics.CachedMetricsDeltasÚmetrics_deltasúCounter[str]Úcounter_deltasÚguards_exprzOptional[CudagraphCachedInfo]r†   r    r‰   úSequence[int]r    úOptional[BoxedDeviceIndex]rˆ   NzOptional[bool]Ú_boxed_callz%Optional[list[TritonKernelArtifacts]]Ú_triton_bundlec                ó  — || _         |j                  | _        |j                  r3t        |j                  «      5 }|j	                  «       | _        d d d «       |j                  | _        t        |j                  «      | _        t        |j                  «      | _	        t        |j                  «      | _
        t        |j                  «      | _        t        |«      s|j                  | _        i | _        ngi | _        i | _        |j                  j                  «       D ]<  \  }}t!        |«      r|j"                  |   | j                  |<   Œ.|| j                  |<   Œ> |j$                  | _        || _        || _        || _        || _        d | _        d | _        i | _        d| _        d | _        d }|�r™| j(                  rRd| j                  v rt9        d| j(                  › �«       nt:        d   dxx   dz  cc<   t=        j>                  |«       �n;tA        d„ |	D «       «      }tB        jD                  jF                  s3dd	l$m%}  ||| j                  | j                  |
«      }|d u}|r
|| _        nd }| d
f| dftM        d„ |	D «       «      dfg}tO        |«      }tQ        |jR                  «      dk(  sJ ‚|jR                  d   D �cg c]>  }tU        |tV        jX                  jZ                  j\                  «      r|j^                  nd ‘Œ@ }}|D ��cg c]
  \  }}|rŒ	|‘Œ }}}ta        tc        |jd                  «      «      }tg        |||«      }|| _        || _        || _        || _        d| _4        y # 1 sw Y   �Œ xY wc c}w c c}}w )NrL   rƒ   r„   ÚinductorÚcudagraph_skipsr   c              3  óf   K  — | ])  }t        |t        j                  «      rt        |«      –— Œ+ y ­wr*   )rP   rQ   rR   rq   ©Ú.0rW   s     r1   ú	<genexpr>z+CompiledFxGraph.__init__.<locals>.<genexpr>Œ  s+   è ø€ ò 4àÜ! !¤U§\¡\Ô2ô +¨1×-ñ4ùs   ‚/1r   )Ú3check_for_mutation_ignore_cuda_graph_managed_tensorzmutated inputszcomplex memory overlapc              3  óŽ   K  — | ]=  }t        |t        j                  t        j                  t        j                  f«      –— Œ? y ­wr*   )rP   rQ   rR   rŒ   Ú	GeneratorrÏ   s     r1   rÑ   z+CompiledFxGraph.__init__.<locals>.<genexpr>¬  s2   è ø€ ò à !ô ' q¬5¯<©<¼¿¹ÄuÇÁÐ*W×Xñùs   ‚AAznon-Tensor inputsT)5r…   r»   Ú
cache_pathÚopenÚreadr½   r¾   r   r™   r‘   r¿   r{   r   r9   r±   r²   r   Úallocated_constant_namerÀ   rÁ   rš   rÃ   rÅ   rÆ   r†   r‰   r    rˆ   r   r   r   r•   Úanyr   rŠ   Ú cudagraph_support_input_mutationÚtorch._inductor.cudagraph_utilsrÒ   Úallr   rg   ÚargsrP   rQ   ÚfxÚnodeÚNodeÚstack_tracer“   r   Úgraphr   rÉ   )r/   r…   râ   r®   rÁ   rš   rÃ   rÅ   r8   r7   rv   r‰   r    rˆ   ÚfÚkÚvr†   Úcomplex_memory_overlap_inputsrÒ   Úhas_mutation_strÚhas_mutationÚcudagraph_testsÚoutputÚargry   ÚbÚsr‡   rz   s                                 r1   r¯   zCompiledFxGraph.__init__F  su  € ð  !1ˆÔØŸ™ˆŒØ×ÒÜ�e×&Ñ&Ó'ð ,¨1Ø#$§6¡6£8�Ô ÷,à"×0Ñ0ˆÔä& u×'9Ñ'9Ó:ˆÔÜ% e×&7Ñ&7Ó8ˆÔÜ(¨×)=Ñ)=Ó>ˆÔÜ",¨U×-EÑ-EÓ"FˆÔô ! Ô$Ø"Ÿ_™_ˆDŒNØ&(ˆDÕ#àˆDŒNØ&(ˆDÔ#ØŸ™×-Ñ-Ó/ò *‘��1Ü" 1Ô%Ø16×1NÑ1NÈqÑ1Q�D×+Ñ+¨AÒ.à()�D—N‘N 1Ò%ð	*ð $)×#<Ñ#<ˆÔ Ø,ˆÔØ*DˆÔ'Ø,ˆÔØ,ˆÔØˆÔØ"ˆÔØˆŒØ!ˆÔØ*.ˆÔ'àˆÚà×.Ò.Ø˜T×.Ñ.Ñ.Ü7Ø5°d×6UÑ6UÐ5VÐWõô ˜ZÑ(Ð):Ó;¸qÑ@Ó;Ü×!Ñ! *Ö-ä03ñ 4à+ô4ó 1Ð-ô —}‘}×EÒEõñ
 LØØ ×/Ñ/Ø ×3Ñ3Ø-ó	ð %ð $4¸4Ð#?�Lá#Ø:J˜Õ7ð $(�Lð &Ð%Ð'7Ð8Ø6Ð6Ð8PÐQäñ à%3ôó ð ,ðð
#�ô % R›�ä˜6Ÿ;™;Ó'¨1Ò,Ð,Ð,ð  &Ÿ{™{¨1™~ö àô )3°3¼¿¹¿¹×8JÑ8JÔ(K�S—_’_ÐQUÑUð �ð  ð 9H×)Q±°°1Êqª!Ð)QÐ&Ñ)QÜ$Ô%9¸"¿(¹(Ó%CÓD�Ü!4Ø  ,Ð0Fó"�ð -ˆÔØ.ˆÔØ"ˆŒà*DˆÔ'ð  ˆÕ÷],ñ ,üòz ùó *Rs   ºM.ËAM;Ì
N ÌN Í.M8c                óü   — | j                   €J ‚	 | j                  |«      t        «       j                  «        t        j                  «        S # t        «       j                  «        t        j                  «        w xY wr*   )r…   r   Úfinishr   Úend_compiler.   s     r1   r2   zCompiledFxGraph.__call__É  sa   € Ø×$Ñ$Ð0Ð0Ð0ð	/Ø×(Ñ(¨Ó0ä'Ó)×0Ñ0Ô2Ü ×,Ñ,Õ.øô (Ó)×0Ñ0Ô2Ü ×,Ñ,Õ.ús   �A Á.A;c                óF  — t        || «       |rz| j                  rQd| j                  v rt        d| j                  › �«       nt        d   dxx   dz  cc<   t        j                  |«       nt        || ||j                  | «      «       | j                  }t        || |«       y)a—  
        Run a set of post processing steps after loading from the cache. These involve:
         - Setting the tracing context output strides
         - Running cudagraphs if enabled
         - Realigning inputs

        This runs whether or not we have a cache hit, and always runs directly after we get a CompiledFxGraph.
        The results of this function are *not* saved in the cache itself.
        rƒ   r„   rÌ   rÍ   r   N)r   rš   r™   r   r   r   r•   r�   r¦   r    r¢   )r/   r7   r8   r9   r    s        r1   r:   zCompiledFxGraph.post_compileÑ  s¨   € ô 	+¨>¸4Ô@áð ×.Ò.Ø˜T×.Ñ.Ñ.Ü7Ø5°d×6UÑ6UÐ5VÐWõô ˜ZÑ(Ð):Ó;¸qÑ@Ó;Ü×!Ñ! *Õ-ä&Ø"ØØØ×$Ñ$ TÓ*ô	ð ×.Ñ.ˆô 	ØØØõ	
r4   c                ó   — || _         y r*   )rÊ   r<   s     r1   r>   z!CompiledFxGraph.set_triton_bundleþ  s
   € Ø+ˆÕr4   c                ó   — d | _         y r*   )r…   ©r/   s    r1   Úprepare_for_serializationz)CompiledFxGraph.prepare_for_serialization  s   € ð
 !%ˆÕr4   c           	     óR  — ddl m}m} ddlm}m}m}m}  || j                  d«      d   }| j                  }	t        j                  j                  |«      sÆ|d   dxx   dz  cc<   t        t        j                  j                  |«      «      j                  d	d	¬
«        |«       }
t        j                  j!                  |
«      |	v rJ|
|	v rnEdt        j                  j!                  |
«      › d�}t#        j$                  |d|
› d�|	«      }	|	| _	         |||	d	¬«       	  |dd	¬«      5  |j'                  | j                  || j(                  |j+                  | «      «      j,                  | _        d d d «       |S # 1 sw Y   |S xY w# t0        $ r t2        j5                  d|«       ‚ w xY w)Nr   )r   Údynamo_timed)Úcpp_prefix_pathÚget_pathÚPyCodeCacheÚwrite_atomicÚpyé   rÌ   Úfxgraph_lookup_write_filer   T)ÚparentsÚexist_okz#include\s*"[^"]+ú"z
#include ")Ú	make_dirszPyCodeCache.load_by_key_path)Úlog_pt2_compile_eventzFailed to load artifact: %s)Útorch._dynamo.utilsr   r÷   Útorch._inductor.codecacherø   rù   rú   rû   r»   r½   ÚosÚpathÚexistsr   ÚdirnameÚmkdirÚbasenameÚreÚsubÚload_by_key_pathr¾   r¦   Úcallr…   ÚOSErrorÚlogÚerror)r/   r9   r   r÷   rø   rù   rú   rû   Úartifact_pathÚcodeÚcpp_ppÚpatterns               r1   Úafter_deserializationz%CompiledFxGraph.after_deserialization  s‰  € ß>÷	
ó 	
ñ ! §¡°Ó6°qÑ9ˆØ×ÑˆÜ�w‰w�~‰~˜mÔ,Ø�ZÑ Ð!<Ó=ÀÑBÓ=Ü”—‘—‘ Ó/Ó0×6Ñ6¸tÈdÐ6ÔSÙ$Ó&ˆFÜ�w‰w×Ñ Ó'¨4Ñ/Ø˜T‘>àð "3´2·7±7×3CÑ3CÀFÓ3KÐ2LÈAÐN�GÜŸ6™6 '¨Z¸°x¸qÐ+AÀ4ÓH�DØ'+�DÔ$á˜¨¸Õ=ð	ÙØ.Ø&*ôñ 	ð )4×(DÑ(DØ—N‘NØ!Ø×&Ñ&Ø×$Ñ$ TÓ*ó	)÷
 ‘$ð Ô%÷		ð Ð÷	ð Ðûô	 ò 	Ü�I‰IÐ3°]ÔCØð	ús+   Ä
F Ä'AE8Å.F Å8FÅ=F ÆF Æ!F&)r…   r¹   râ   r   r®   r·   rÁ   z*list[Optional[tuple[_StrideExprStr, ...]]]rš   r&   rÃ   rÂ   rÅ   rÄ   r8   r   r7   rB   rv   rÇ   r‰   r    r    rÇ   rˆ   rÈ   r@   rD   r?   rA   rE   ©r@   rD   )r9   rC   r@   rº   )rF   rG   rH   r©   rK   rI   rJ   r½   rÉ   rÊ   r¯   r2   r:   r>   rõ   r  rL   r4   r1   rr   rr   !  sˆ  … ñð
 3Ó2ØƒNØ(�{×(Ñ(¨eÔ4€K�Ó4Ø2Ó2Ø!Ó!Ø Ó Ø#Ó#Ø'Ó'Ø0Ó0Ø&Ó&Ø9Ó9ØHÓHØ -Ó-Ø/Ó/Ø Ó ð Óà1Ó1ØÓØ"Ó"Ø :Ó:à"&€K�Ó&Ø<@€NÐ9Ó@ðA à6ðA ð ðA ð !ð	A ð
 CðA ð %2ðA ð 4ðA ð %ðA ð ðA ð ,ðA ð )ðA ð $ðA ð 'ðA ð %?ðA ð 
óA óF/ð+
à+ð+
ð ð+
ð ,ð	+
ð
 
ó+
óZ,ó%ô,r4   c                  óD   — e Zd ZU dZded<   dd„Z	 	 	 	 	 	 	 	 d	d„Zd
d„Zy)ÚCompiledAOTIz3
    Class holding an AOTInductor compiled so.
    zUnion[str, list[str]]Úfilenamec                ó   — t        d«      ‚)NÚNYI)r,   r.   s     r1   r2   zCompiledAOTI.__call__?  s   € Ü! %Ó(Ð(r4   c                 ó   — y r*   rL   r6   s       r1   r:   zCompiledAOTI.post_compileB  ó   € ð 	r4   c                 ó   — y r*   rL   r<   s     r1   r>   zCompiledAOTI.set_triton_bundleJ  ó   € Ør4   Nr?   rA   rE   )rF   rG   rH   r©   rK   r2   r:   r>   rL   r4   r1   r  r  7  sD   … ñð $Ó#ó)ðà+ðð ðð ,ð	ð
 
óôr4   r  c                  óL   — e Zd ZU dZded<   dd„Z	 	 	 	 	 	 	 	 d	d„Zd
d„Zdd„Zy)ÚMockFXGraphCacheOutputNr   r®   c                ó   — d| _         y )NT)rÉ   rô   s    r1   Ú__post_init__z$MockFXGraphCacheOutput.__post_init__R  s
   € ØˆÕr4   c                 ó   — y r*   rL   r6   s       r1   r:   z#MockFXGraphCacheOutput.post_compileU  r  r4   c                ó$   — | j                  |«      S r*   r­   r.   s     r1   r2   zMockFXGraphCacheOutput.__call__]  s   € Ø�w‰w�v‹Ðr4   c                 ó   — y r*   rL   r<   s     r1   r>   z(MockFXGraphCacheOutput.set_triton_bundle`  r!  r4   r  rA   r?   rE   )	rF   rG   rH   r®   rK   r%  r:   r2   r>   rL   r4   r1   r#  r#  N  sE   … à€BˆƒNó ðà+ðð ðð ,ð	ð
 
óóôr4   r#  )rW   útorch.Tensorr@   ú	list[int])rW   r)  r^   r*  r@   r)  )rW   r)  r@   Úbool)
r7   rB   r›   rr   r8   r   r9   r¨   r@   rD   )rŸ   r   r›   rr   r    rÇ   r@   rD   )Gr©   Ú
__future__r   rI   Úloggingr  r  Úpathlibr   Útypingr   r   r   r   r	   Útyping_extensionsr
   rQ   r  r   r   rÛ   r   r   r   r   Útorch._inductor.freezing_utilsr   r   Útorch._inductor.utilsr   r   r   r   r   Útorch.utils._ordered_setr   Ú r   Úruntime.autotune_cacher   Úcollectionsr   Úcollections.abcr   Útorch._inductorr   Útorch._inductor.graphr   r’   r    Útriton_bundlerr!   Ú	getLoggerrF   r  Ú	dataclassr#   rº   rM   rK   rY   r`   rq   r�   r¢   rC   r«   rr   r  r#  rL   r4   r1   ú<module>r=     s—  ðòõ, #ã Û Û 	Û 	Ý ß @Õ @Ý 'ã ß E÷ó ÷ N÷õ õ 0å Ý 8ñ Ý#Ý(å'Ý3å,Ý5à€g×Ñ˜Ó!€ð ×Ñ÷.ð .ó ð.ð2  €�	Ó óMóóð,WØ'ðWà#ðWð ðWð 'ð	Wð
 
óWðt;Øð;à#ð;ð #ð;ð 
ó	;÷(ñ ô..Ð%=ô .ð* ×ÑôR�jó Ró ðRðj ×Ñô�:ó ó ðð, ×Ñô˜Zó ó ñr4   