+
    &j                     8   R t ^ RIt^ RIt^ RIt^ RIHt ^ RIHtHt ^ RI	H
t ^ RIHtHtHtHtHt ^RIHt ^RIHtHtHt ]'       d   ^RIHt ]P4                  ]P6                  ]P8                  ]P:                  ]P6                  ]P6                  ]P:                  ]P:                  ]P<                  ]P<                  ]P>                  ]P>                  ]P@                  ]P@                  ]PB                  ]PB                  ]PD                  ]PD                  ]PF                  ]PF                  /
t$]P4                  ]P<                  ]P8                  ]P>                  ]P<                  ]P<                  ]P>                  ]P>                  ]P6                  ]P<                  ]P:                  ]P>                  ]P@                  ]P@                  ]PB                  ]PB                  ]PD                  ]PD                  ]PF                  ]PF                  /
t%]P4                  ]P@                  ]P8                  ]PB                  ]P<                  ]P@                  ]P>                  ]PB                  ]P6                  ]P@                  ]P:                  ]PB                  ]P@                  ]P@                  ]PB                  ]PB                  ]PD                  ]PD                  ]PF                  ]PF                  /
t&]P4                  ]PD                  ]P8                  ]PF                  ]P6                  ]PD                  ]P:                  ]PF                  ]PD                  ]PD                  ]PF                  ]PF                  ]P<                  ]PD                  ]P>                  ]PF                  ]P@                  ]PD                  ]PB                  ]PF                  /
t'R	 R
 lt(R R lt)RR R llt*]! RR7       ! R R]4      4       t+]! RR7       ! R R]4      4       t,]! RR7       ! R R]4      4       t-]! RR7       ! R R]4      4       t.]! RR7       ! R R]4      4       t/]! RR7       ! R R]4      4       t0]! RR7       ! R R]4      4       t1]! RR7       ! R  R!]14      4       t2]! RR7       ! R" R#]4      4       t3]! RR7       ! R$ R%]34      4       t4]! RR7       ! R& R']4      4       t5]! RR7       ! R( R)]4      4       t6]! RR7       ! R* R+]4      4       t7]! RR7       ! R, R-]4      4       t8]! RR7       ! R. R/]4      4       t9]! RR7       ! R0 R1]4      4       t:]! RR7       ! R2 R3]4      4       t;]! RR7       ! R4 R5]34      4       t<]! RR7       ! R6 R7]34      4       t=]! RR7       ! R8 R9]4      4       t>]! RR7       ! R: R;]4      4       t? ! R< R=]P                  4      tA]! RR7       ! R> R?]4      4       tB]! RR7       ! R@ RA]4      4       tC]! RR7       ! RB RC]4      4       tD]! RR7       ! RD RE]4      4       tE]! RR7       ! RF RG]4      4       tF]! RR7       ! RH RI]4      4       tG]! RR7       ! RJ RK]4      4       tH ! RL RM]4      tI]! RR7       ! RN RO]4      4       tJ]! RR7       ! RP RQ]4      4       tK]! RR7       ! RR RS]4      4       tL]! RR7       ! RT RU]4      4       tM]! RR7       ! RV RW]4      4       tN]! RR7       ! RX RY]4      4       tO]! RR7       ! RZ R[]K4      4       tP]! RR7       ! R\ R]]K4      4       tQ]! RR7       ! R^ R_]4      4       tR]! RR7       ! R` Ra]4      4       tS]! RR7       ! Rb Rc]4      4       tT]! RR7       ! Rd Re]4      4       tU]! RR7       ! Rf Rg]4      4       tV]! RR7       ! Rh Ri]V4      4       tW]! RR7       ! Rj Rk]W4      4       tX]! RR7       ! Rl Rm]V4      4       tY]! RR7       ! Rn Ro]4      4       tZ]! RR7       ! Rp Rq]4      4       t[]! RR7       ! Rr Rs]4      4       t\]! RR7       ! Rt Ru]4      4       t]]! RR7       ! Rv Rw]4      4       t^]! RR7       ! Rx Ry]4      4       t_]! RR7       ! Rz R{]4      4       t`]! RR7       ! R| R}]4      4       ta]! RR7       ! R~ R]4      4       tb]! RR7       ! R R]4      4       tc]! RR7       ! R R]4      4       td]P                  RR/R R ll4       tf]P                  RR/R R ll4       tg]P                  R R l4       th]P                  R R l4       ti]P                  R R l4       tj]P                  R R l4       tk]P                  R R l4       tl]P                  R R l4       tm]P                  R R l4       tn]P                  R R l4       to]P                  R R l4       tp]P                  R R l4       tq]P                  R R l4       tr]P                  R R l4       tsR# )a  
This module provides Source classes that track the origins of values in PyTorch Dynamo.
Sources represent where values come from (e.g. local variables, globals, attributes) and
are used for guard generation and code reconstruction during compilation.

The module includes specialized sources for:
- Local variables and synthetic locals
- Global variables and constants
- Object attributes and method calls
- NN module specialization (specialized vs unspecialized)
- Random values and tensor properties
- Default argument handling
- FSDP (Fully Sharded Data Parallel) modules

Sources play a key role in Dynamo's guard system by tracking value origins for
guard generation, and in code reconstruction by providing methods to rebuild
the code needed to recreate values.
N)Callable)AnyTYPE_CHECKING)device)ChainedSourcedataclass_with_cached_hashGuardGuardSourceSource)utils)create_binary_subscrcreate_build_tuplecreate_call_function)	PyCodegenc                0    V ^8  d   QhR\         R\        /#    sourcereturnr
   bool)formats   "l/Users/jameslopez/projects/CWCArchive/cwc-podcast/.venv/lib/python3.14/site-packages/torch/_dynamo/source.py__annotate__r   m   s     	 	v 	$ 	    c                     \        V \        4      '       d   R #  V P                  \        P                  8X  d   R #  R#   \
         d     R# i ; iTF)
isinstanceConstantSourceguard_sourcer	   CONSTANTNotImplementedErrorr   s   &r   is_constant_sourcer#   m   sO    &.))+"6"66 7
   s   > AAc                >    V ^8  d   QhR\         R,          R\        /# r   r   Nr   r
   str)r   s   "r   r   r   y   s     & &6D= &S &r   c                 L    V f   R#  V P                   #   \         d     R# i ; i)Nz<unknown source>)namer!   r"   s   &r   _get_source_debug_namer*   y   s+    ~!	&;;" 	&%	&s    ##Fc                <    V ^8  d   QhR\         R\        R\        /# )r   s
apply_reprr   )r   r   r'   )r   s   "r   r   r      s!     3 3 3 3# 3r   c                    V'       d   \        V 4      p M\        V 4      p V P                  RR4      P                  RR4      # )a	  
Escapes curly brackets for format strings.
e.g. "frozenset({0})" becomes "frozenset({{0}})".
This is used by _name_template for example, because it's
expected to return a format string, but we may wish to include
strings that should not be accidentally formatted.
{z{{}z}})reprr'   replace)r,   r-   s   &&r   _esc_strr3      s7     GF99S$''T22r   T)frozenc                      a  ] tR t^t o RtRtRtV 3R lR lt]V 3R lR l4       t	]
P                  V 3R lR l4       tV 3R	 ltR
tV tR# )LocalSourceFNc                "   < V ^8  d   QhRRRR/# r   codegenr   r   N )r   __classdict__s   "r   r   LocalSource.__annotate__   s     H H; H4 Hr   c                    V P                   '       d   VP                  V P                  4       R # VP                  VP	                  V P                  4      4       R # N)is_derefed_cell_contents
load_deref
local_nameappend_outputcreate_loadselfr9   s   &&r   reconstructLocalSource.reconstruct   s=    (((t/!!'"5"5doo"FGr   c                    < V ^8  d   QhRS[ /# r   r   r	   )r   r;   s   "r   r   r<      s     ! !k !r   c                "    \         P                  # r>   )r	   LOCALrE   s   &r   r   LocalSource.guard_source   s       r   c                    < V ^8  d   QhRS[ /# rI   r'   )r   r;   s   "r   r   r<           B B Br   c                8    R \        V P                  RR7       R2# )zL[Tr-   ]r3   rA   rM   s   &r   _name_templateLocalSource._name_template   s    HT__>?qAAr   c                h   < V ^8  d   Qh/ S[ ;R&   S[;R&   S[S[ ,          R,          ;R&   S[;R&   # )r   rA   is_inputNdynamismr?   )r'   r   	frozenset)r   r;   s   "r   r   r<      s?     O 
   nt#*  #* r   r:   )__name__
__module____qualname____firstlineno__rY   rZ   r?   rF   propertyr   	functoolscached_propertyrV   __annotate_func____static_attributes____classdictcell__r;   s   @r   r6   r6      s^     
 H '+H
 &+H H ! ! B B7  r   r6   c                   v   a  ] tR t^t o V 3R lR lt]V 3R lR l4       t]V 3R lR l4       tV 3R ltRt	V t
R	# )
TempLocalSourcec                "   < V ^8  d   QhRRRR/# r8   r:   )r   r;   s   "r   r   TempLocalSource.__annotate__        D D; D4 Dr   c                Z    VP                  VP                  V P                  4      4       R # r>   rB   rC   rA   rD   s   &&r   rF   TempLocalSource.reconstruct       g11$//BCr   c                    < V ^8  d   QhRS[ /# rI   rJ   )r   r;   s   "r   r   rj      s     & &k &r   c                "    \         P                  # r>   )r	   
TEMP_LOCALrM   s   &r   r   TempLocalSource.guard_source   s    %%%r   c                    < V ^8  d   QhRS[ /# rI   rP   )r   r;   s   "r   r   rj           
 
 
r   c                    \        R 4      h)zhCannot create guard on TempLocalSource - this is an internal Dynamo bug. Please file an issue on GitHub.r!   rM   s   &r   rV   TempLocalSource._name_template   s    !v
 	
r   c                &   < V ^8  d   Qh/ S[ ;R&   # r   rA   rP   )r   r;   s   "r   r   rj      s      O r   r:   N)r\   r]   r^   r_   rF   r`   r   rV   rc   rd   re   rf   s   @r   rh   rh      s@     
D D & & 
 
  r   rh   c                      a  ] tR t^t o V 3R lR lt]V 3R lR l4       t]P                  V 3R lR l4       t	V 3R lt
RtV tR	# )
SyntheticLocalSourcec                "   < V ^8  d   QhRRRR/# r8   r:   )r   r;   s   "r   r   !SyntheticLocalSource.__annotate__   rk   r   c                Z    VP                  VP                  V P                  4      4       R # r>   rm   rD   s   &&r   rF    SyntheticLocalSource.reconstruct   ro   r   c                    < V ^8  d   QhRS[ /# rI   rJ   )r   r;   s   "r   r   r~      s     + +k +r   c                "    \         P                  # r>   )r	   SYNTHETIC_LOCALrM   s   &r   r   !SyntheticLocalSource.guard_source   s    ***r   c                    < V ^8  d   QhRS[ /# rI   rP   )r   r;   s   "r   r   r~      s     P P Pr   c                8    R \        V P                  RR7       R2# )zSYNTHETIC_LOCAL[TrS   rT   rU   rM   s   &r   rV   #SyntheticLocalSource._name_template   s    !(4??t"L!MQOOr   c                &   < V ^8  d   Qh/ S[ ;R&   # rz   rP   )r   r;   s   "r   r   r~      s     O r   r:   Nr\   r]   r^   r_   rF   r`   r   ra   rb   rV   rc   rd   re   rf   s   @r   r|   r|      sH     D D + + P P  r   r|   c                      a  ] tR t^t o ]V 3R lR l4       tV 3R lR lt]P                  V 3R lR l4       t	V 3R lt
RtV tR	# )
RandomValueSourcec                    < V ^8  d   QhRS[ /# rI   rJ   )r   r;   s   "r   r   RandomValueSource.__annotate__   s     ( (k (r   c                "    \         P                  # r>   )r	   RANDOM_VALUErM   s   &r   r   RandomValueSource.guard_source   s    '''r   c                "   < V ^8  d   QhRRRR/# r8   r:   )r   r;   s   "r   r   r      s     6 6; 64 6r   c                   VP                  VP                  VP                  P                  P                  4      4       VP                  VP                  V P                  4      4       VP                  \        4       4       R # r>   )rB   rC   txoutputrandom_values_varcreate_load_constrandom_call_indexr   rD   s   &&r   rF   RandomValueSource.reconstruct   s\    g11'**2C2C2U2UVWg778N8NOP245r   c                    < V ^8  d   QhRS[ /# rI   rP   )r   r;   s   "r   r   r      rQ   r   c                2    R \        V P                  4       2# )random_value_)r3   r   rM   s   &r   rV    RandomValueSource._name_template   s    x(>(>?@AAr   c                &   < V ^8  d   Qh/ S[ ;R&   # )r   r   int)r   r;   s   "r   r   r      s      r   r:   N)r\   r]   r^   r_   r`   r   rF   ra   rb   rV   rc   rd   re   rf   s   @r   r   r      sF      ( (6 6
 B B  r   r   c                      a  ] tR t^t o V 3R lR lt]V 3R lR l4       t]P                  V 3R lR l4       t	V 3R lt
RtV tR	# )
GlobalSourcec                "   < V ^8  d   QhRRRR/# r8   r:   )r   r;   s   "r   r   GlobalSource.__annotate__   s     V V; V4 Vr   c                ^    VP                  VP                  V P                  R R7      4       R# )TaddNrB   create_load_globalglobal_namerD   s   &&r   rF   GlobalSource.reconstruct   s&    g889I9It8TUr   c                    < V ^8  d   QhRS[ /# rI   rJ   )r   r;   s   "r   r   r           " "k "r   c                "    \         P                  # r>   r	   GLOBALrM   s   &r   r   GlobalSource.guard_source       !!!r   c                    < V ^8  d   QhRS[ /# rI   rP   )r   r;   s   "r   r   r      s     C C Cr   c                8    R \        V P                  RR7       R2# )G[TrS   rT   r3   r   rM   s   &r   rV   GlobalSource._name_template   s    HT--$?@BBr   c                &   < V ^8  d   Qh/ S[ ;R&   # r   r   rP   )r   r;   s   "r   r   r            r   r:   Nr   rf   s   @r   r   r      sH     V V " " C C  r   r   c                      a  ] tR t^t o V 3R lR lt]V 3R lR l4       t]P                  V 3R lR l4       t	V 3R lt
RtV tR	# )
GlobalWeakRefSourcec                "   < V ^8  d   QhRRRR/# r8   r:   )r   r;   s   "r   r    GlobalWeakRefSource.__annotate__        > >; >4 >r   c                l   a a SP                  VV 3R  l4       SP                  \        ^ R4      4       R# )c                  \   < S P                  S P                  SP                  R R7      4      # )Tr   r   r9   rE   s   r   <lambda>1GlobalWeakRefSource.reconstruct.<locals>.<lambda>   s)    G))**4+;+;*Fr   FNadd_push_nullextend_outputr   rD   s   ffr   rF   GlobalWeakRefSource.reconstruct   s.    	

 	21e<=r   c                    < V ^8  d   QhRS[ /# rI   rJ   )r   r;   s   "r   r   r     r   r   c                "    \         P                  # r>   r   rM   s   &r   r    GlobalWeakRefSource.guard_source  r   r   c                    < V ^8  d   QhRS[ /# rI   rP   )r   r;   s   "r   r   r     s     E E Er   c                8    R \        V P                  RR7       R2# )r   TrS   z]()r   rM   s   &r   rV   "GlobalWeakRefSource._name_template  s    HT--$?@DDr   c                &   < V ^8  d   Qh/ S[ ;R&   # r   rP   )r   r;   s   "r   r   r      r   r   r:   Nr   rf   s   @r   r   r      sF     > > " " E E#  r   r   c                   N   a  ] tR tRt o V 3R lR lt]V 3R lR l4       tRtV tR# )WeakRefCallSourcei  c                "   < V ^8  d   QhRRRR/# r8   r:   )r   r;   s   "r   r   WeakRefCallSource.__annotate__  s     > >; >4 >r   c                l   a a SP                  VV 3R  l4       SP                  \        ^ R4      4       R# )c                  (   < S ! SP                   4      # r>   baser   s   r   r   /WeakRefCallSource.reconstruct.<locals>.<lambda>  s    gdii&8r   FNr   rD   s   ffr   rF   WeakRefCallSource.reconstruct  s(    8921e<=r   c                    < V ^8  d   QhRS[ /# rI   rP   )r   r;   s   "r   r   r     s       r   c                    R # )z{0}()r:   rM   s   &r   rV    WeakRefCallSource._name_template  s    r   r:   N	r\   r]   r^   r_   rF   r`   rV   rd   re   rf   s   @r   r   r     s#     > >  r   r   c                       ] tR tRtRtR# )CallFunctionNoArgsSourcei  r:   Nr\   r]   r^   r_   rd   r:   r   r   r   r         r   r   c                      a  ] tR tRt o V 3R lR ltV 3R lR lt]P                  V 3R lR l4       tV 3R lt	R	t
V tR
# )
AttrSourcei  c                   < V ^8  d   QhRR/# r   r   Nr:   )r   r;   s   "r   r   AttrSource.__annotate__  s     
 
t 
r   c                    V P                   '       g   Q R 4       hRV P                  9  g   Q RV P                  : R24       hR# )z9Can't construct an AttrSource without a valid base source.z,AttrSource member must not contain '.', got =. Use OutputGraph.get_chained_attr_source() for dotted paths.Nr   memberrM   s   &r   __post_init__AttrSource.__post_init__  sG    yyyUUUy$++% 	
:4;;/ JJ J	
%r   c                "   < V ^8  d   QhRRRR/# r8   r:   )r   r;   s   "r   r   r   &       F F; F4 Fr   c                ~    V! V P                   4       VP                  VP                  V P                  4      4       R # r>   r   r   create_load_attrsr   rD   s   &&r   rF   AttrSource.reconstruct&  +    		g77DEr   c                    < V ^8  d   QhRS[ /# rI   rP   )r   r;   s   "r   r   r   +  s     0 0 0r   c                    V P                   P                  4       '       g   R \        V P                   RR7       R2# R\        V P                   4       2# )zgetattr({0}, TrS   ){0}.)r   isidentifierr3   rM   s   &r   rV   AttrSource._name_template*  sG    {{''))$Xdkkd%K$LANN-.//r   c                &   < V ^8  d   Qh/ S[ ;R&   # r   r   rP   )r   r;   s   "r   r   r          K r   r:   Nr\   r]   r^   r_   r   rF   ra   rb   rV   rc   rd   re   rf   s   @r   r   r     s<     
 
F F 0 0!  r   r   c                   h   a  ] tR tRt o Rt]P                  ! RR7      tV 3R lR ltV 3R lt	Rt
V tR	# )
CellContentsSourcei1  z
Source for closure cell contents that also stores the freevar name.
This allows guard failure messages to show which variable the closure cell refers to.
 )defaultc                   < V ^8  d   QhRR/# r   r:   )r   r;   s   "r   r   CellContentsSource.__annotate__:  s     
 
t 
r   c                h    V P                   '       g   Q R 4       hV P                  R8X  g   Q R4       hR# )z@Can't construct a CellContentsSource without a valid base sourcecell_contentsz8CellContentsSource should only be used for cell_contentsNr   rM   s   &r   r    CellContentsSource.__post_init__:  s8    yyy 	
N	
y {{o- 	
F	
-r   c                &   < V ^8  d   Qh/ S[ ;R&   # )r   freevar_namerP   )r   r;   s   "r   r   r  1  s      5 r   r:   N)r\   r]   r^   r_   __doc__dataclassesfieldr  r   rc   rd   re   rf   s   @r   r   r   1  s-     
 $))"5L
 
  r   r   c                      a  ] tR tRt o V 3R lR ltV 3R lR lt]P                  V 3R lR l4       tV 3R lt	R	t
V tR
# )GenericAttrSourceiC  c                   < V ^8  d   QhRR/# r   r:   )r   r;   s   "r   r   GenericAttrSource.__annotate__G  s     
 
t 
r   c                    V P                   '       g   Q R 4       hRV P                  9  g   Q RV P                  : R24       hR# )z?Can't construct a GenericAttrSource without a valid base sourcer   z3GenericAttrSource member must not contain '.', got r   Nr   rM   s   &r   r   GenericAttrSource.__post_init__G  sM    yyy 	
M	
y $++% 	
A$++ QJ J	
%r   c                "   < V ^8  d   QhRRRR/# r8   r:   )r   r;   s   "r   r   r  P  r   r   c                ~    V! V P                   4       VP                  VP                  V P                  4      4       R # r>   r   rD   s   &&r   rF   GenericAttrSource.reconstructP  r   r   c                    < V ^8  d   QhRS[ /# rI   rP   )r   r;   s   "r   r   r  U  ru   r   c                8    R \        V P                  RR7       R2# )zobject.__getattribute__({0}, TrS   r   r3   r   rM   s   &r   rV    GenericAttrSource._name_templateT  s"     .ht{{t.T-UUVW	
r   c                &   < V ^8  d   Qh/ S[ ;R&   # r   rP   )r   r;   s   "r   r   r  C  r   r   r:   Nr   rf   s   @r   r  r  C  s<     
 
F F 
 
%  r   r  c                   N   a  ] tR tRt o V 3R lR lt]V 3R lR l4       tRtV tR# )TypeDictSourcei\  c                "   < V ^8  d   QhRRRR/# r8   r:   )r   r;   s   "r   r   TypeDictSource.__annotate__^       E E; E4 Er   c                j    V! V P                   4       VP                  VP                  R 4      4       R# )__dict__Nr   r   r   rD   s   &&r   rF   TypeDictSource.reconstruct^  '    		g77
CDr   c                    < V ^8  d   QhRS[ /# rI   rP   )r   r;   s   "r   r   r  c  s     $ $ $r   c                    R # )zdict({0}.__dict__)r:   rM   s   &r   rV   TypeDictSource._name_templateb  s     $r   r:   Nr   rf   s   @r   r  r  \  s%     E E $ $r   r  c                   N   a  ] tR tRt o V 3R lR lt]V 3R lR l4       tRtV tR# )TypeMROSourceil  c                "   < V ^8  d   QhRRRR/# r8   r:   )r   r;   s   "r   r   TypeMROSource.__annotate__n       D D; D4 Dr   c                j    V! V P                   4       VP                  VP                  R 4      4       R# )__mro__Nr!  rD   s   &&r   rF   TypeMROSource.reconstructn  '    		g77	BCr   c                    < V ^8  d   QhRS[ /# rI   rP   )r   r;   s   "r   r   r*  s  s       r   c                    R # )z{0}.__mro__r:   rM   s   &r   rV   TypeMROSource._name_templater  s    r   r:   Nr   rf   s   @r   r(  r(  l  s%     D D  r   r(  c                   B   a  ] tR tRt o RtV 3R lR ltV 3R ltRtV tR# )LocalCellSourceiw  zw
Conceptually, this class is `LocalSource` for cell objects implicitly
generated by Python (e.g., captured variables).
c                "   < V ^8  d   QhRRRR/# r8   r:   )r   r;   s   "r   r   LocalCellSource.__annotate__  s     L L; L4 Lr   c                Z    VP                  VP                  V P                  4      4       R # r>   )rB   create_load_closurerA   rD   s   &&r   rF   LocalCellSource.reconstruct  s!     	g99$//JKr   c                &   < V ^8  d   Qh/ S[ ;R&   # rz   rP   )r   r;   s   "r   r   r6  w  s      O r   r:   N)	r\   r]   r^   r_   r	  rF   rc   rd   re   rf   s   @r   r4  r4  w  s     L L  r   r4  c                   N   a  ] tR tRt o V 3R lR lt]V 3R lR l4       tRtV tR# )
CodeSourcei  c                "   < V ^8  d   QhRRRR/# r8   r:   )r   r;   s   "r   r   CodeSource.__annotate__  r  r   c                j    V! V P                   4       VP                  VP                  R 4      4       R# )__code__Nr!  rD   s   &&r   rF   CodeSource.reconstruct  r#  r   c                    < V ^8  d   QhRS[ /# rI   rP   )r   r;   s   "r   r   r>    s       r   c                    R # )z{0}.__code__r:   rM   s   &r   rV   CodeSource._name_template  s    r   r:   Nr   rf   s   @r   r<  r<    s%     E E  r   r<  c                   N   a  ] tR tRt o V 3R lR lt]V 3R lR l4       tRtV tR# )ClosureSourcei  c                "   < V ^8  d   QhRRRR/# r8   r:   )r   r;   s   "r   r   ClosureSource.__annotate__  s     H H; H4 Hr   c                j    V! V P                   4       VP                  VP                  R 4      4       R# )__closure__Nr!  rD   s   &&r   rF   ClosureSource.reconstruct  s'    		g77FGr   c                    < V ^8  d   QhRS[ /# rI   rP   )r   r;   s   "r   r   rH    s     ! ! !r   c                    R # )z{0}.__closure__r:   rM   s   &r   rV   ClosureSource._name_template  s     r   r:   Nr   rf   s   @r   rF  rF    s%     H H ! !r   rF  c                   r   a  ] tR tRt o RtV 3R lR lt]P                  V 3R lR l4       tV 3R lt	Rt
V tR	# )

GradSourcei  gradc                "   < V ^8  d   QhRRRR/# r8   r:   )r   r;   s   "r   r   GradSource.__annotate__  r   r   c                ~    V! V P                   4       VP                  VP                  V P                  4      4       R # r>   r   rD   s   &&r   rF   GradSource.reconstruct  r   r   c                    < V ^8  d   QhRS[ /# rI   rP   )r   r;   s   "r   r   rS         0 0 0r   c                2    R \        V P                  4       2# )r   r  rM   s   &r   rV   GradSource._name_template  s    -.//r   c                &   < V ^8  d   Qh/ S[ ;R&   # r   rP   )r   r;   s   "r   r   rS    s      r   r:   N)r\   r]   r^   r_   r   rF   ra   rb   rV   rc   rd   re   rf   s   @r   rP  rP    s7     FF F 0 0  r   rP  c                   P   a  ] tR tRt o ]P
                  V 3R lR l4       tRtV tR# )ParamBufferSourcei  c                    < V ^8  d   QhRS[ /# rI   rJ   )r   r;   s   "r   r   ParamBufferSource.__annotate__       K Kk Kr   c                D    \         V P                  P                  ,          # r>   #_GUARD_SOURCE_SPECIALIZED_NN_MODULEr   r   rM   s   &r   r   ParamBufferSource.guard_source      24993I3IJJr   r:   N	r\   r]   r^   r_   ra   rb   r   rd   re   rf   s   @r   r\  r\    s     K Kr   r\  c                       ] tR tRtRtR# )UnspecializedParamBufferSourcei  r:   Nr   r:   r   r   rg  rg    r   r   rg  c                      a  ] tR tRt o Rt]V 3R lR l4       t]P                  V 3R lR l4       t	V 3R lR lt
V 3R	 lR
 ltV 3R ltRtV tR# )EphemeralSourcei  Nc                    < V ^8  d   QhRS[ /# rI   rJ   )r   r;   s   "r   r   EphemeralSource.__annotate__       % %k %r   c                "    \         P                  # r>   )r	   	EPHEMERALrM   s   &r   r   EphemeralSource.guard_source      $$$r   c                    < V ^8  d   QhRS[ /# rI   rP   )r   r;   s   "r   r   rk    s     . . .r   c                f    V P                   e   RV P                   ,           MRpR\        V4       R2# )Nz: r   z
<ephemeral>)descr3   )rE   rt  s   & r   rV   EphemeralSource._name_template  s/    #'99#8tdiibHTN+1--r   c                :   < V ^8  d   QhRS[ RS[3,          RS[/# )r   fn.r   )r   r   r   )r   r;   s   "r   r   rk    s$     " "Xc3h/ "E "r   c                    \         hr>   rw   rE   rw  s   &&r   
make_guardEphemeralSource.make_guard      !!r   c                    < V ^8  d   QhRS[ /# rI   r   )r   r;   s   "r   r   rk    s      d r   c                    R # Tr:   rM   s   &r   is_ephemeralEphemeralSource.is_ephemeral      r   c                4   < V ^8  d   Qh/ S[ R,          ;R&   # )r   Nrt  rP   )r   r;   s   "r   r   rk    s     
* r   r:   )r\   r]   r^   r_   rt  r`   r   ra   rb   rV   rz  r  rc   rd   re   rf   s   @r   ri  ri    sQ     D% % . ." " !  r   ri  c                   N   a  ] tR tRt o V 3R lR lt]V 3R lR l4       tRtV tR# )SkipGuardSourcei  c                "   < V ^8  d   QhRRRR/# r8   r:   )r   r;   s   "r   r   SkipGuardSource.__annotate__  s     ' '; '4 'r   c                <    V P                   P                  V4       R # r>   )r   rF   rD   s   &&r   rF   SkipGuardSource.reconstruct  s    		g&r   c                    < V ^8  d   QhRS[ /# rI   rP   )r   r;   s   "r   r   r           r   c                    R # z{0}r:   rM   s   &r   rV   SkipGuardSource._name_template      r   r:   Nr   rf   s   @r   r  r    s#     ' '  r   r  c                   >   a  ] tR tRt o ^ t^t^tV 3R lR ltRtV t	R# )TensorPropertyi  c                    < V ^8  d   QhRS[ /# rI   rP   )r   r;   s   "r   r   TensorProperty.__annotate__  s     @ @S @r   c                    V \         P                  J d   R # V \         P                  J d   R# V \         P                  J d   R# \	        R\        V 4       24      h)sizestridestorage_offset
unhandled )r  SIZESTRIDESTORAGE_OFFSETAssertionErrorr3   rM   s   &r   method_nameTensorProperty.method_name  sL    >&&&^***^222# :htn-=!>??r   r:   N)
r\   r]   r^   r_   r  r  r  r  rd   re   rf   s   @r   r  r    s      DFN@ @r   r  c                      a  ] tR tRt o RtV 3R lR ltV 3R lR lt]P                  V 3R lR l4       t	V 3R	 lt
R
tV tR# )TensorPropertySourcei  Nc                   < V ^8  d   QhRR/# r   r:   )r   r;   s   "r   r   !TensorPropertySource.__annotate__  s     ( (t (r   c                    V P                   f   Q hV P                  \        P                  J d   V P                  e   Q hR # V P                  f   Q hR # r>   )r   propr  r  idxrM   s   &r   r   "TensorPropertySource.__post_init__  sD    yy$$$9955588###88'''r   c                "   < V ^8  d   QhRRRR/# r8   r:   )r   r;   s   "r   r   r    s     
 
; 
4 
r   c                   a a SP                  VV 3R  l4       S! S P                  4       S P                  e+   SP                  SP	                  S P                  4      4       SP                  \        S P                  e   ^M^R4      4       R# )c                     < S P                  \        P                  R \        SP                  P                  4       4       24      # )call_)load_import_fromr   r\   r3   r  r  r   s   r   r   2TensorPropertySource.reconstruct.<locals>.<lambda>  s3    G,,%1F1F1H(I'J Kr   NF)r   r   r  rB   r   r   r   rD   s   ffr   rF    TensorPropertySource.reconstruct  sn    	

 			88!!'";";DHH"EF dhh&:5I	
r   c                    < V ^8  d   QhRS[ /# rI   rP   )r   r;   s   "r   r   r    s     	E 	E 	Er   c                   V P                   \        P                  J d   R \        V P                  4       R2# V P                   \        P
                  J d   R\        V P                  4       R2# V P                   \        P                  J d   V P                  e   Q hR# \        R\        V P                   4       24      h)z{0}.size()[rT   z{0}.stride()[z{0}.storage_offset()r  )r  r  r  r3   r  r  r  r  rM   s   &r   rV   #TensorPropertySource._name_template  s    99+++"8DHH#5"6a88YY.///$Xdhh%7$8::YY.77788###) :htyy.A-B!CDDr   c                @   < V ^8  d   Qh/ S[ ;R&   S[R,          ;R&   # )r   r  Nr  )r  r   )r   r;   s   "r   r   r    s!     
  
t r   r:   )r\   r]   r^   r_   r  r   rF   ra   rb   rV   rc   rd   re   rf   s   @r   r  r    sC      C( (
 
 	E 	E7  r   r  c                      a  ] tR tRt o V 3R lR ltV 3R lR lt]P                  V 3R lR l4       tV 3R lt	R	t
V tR
# )IndexedSourcei  c                   < V ^8  d   QhRR/# r   r:   )r   r;   s   "r   r   IndexedSource.__annotate__"       % %t %r   c                &    V P                   f   Q hR # r>   r   rM   s   &r   r   IndexedSource.__post_init__"      yy$$$r   c                "   < V ^8  d   QhRRRR/# r8   r:   )r   r;   s   "r   r   r  %       " "; "4 "r   c                    \         hr>   rw   rD   s   &&r   rF   IndexedSource.reconstruct%  r|  r   c                    < V ^8  d   QhRS[ /# rI   rP   )r   r;   s   "r   r   r  )  rW  r   c                4    R \        V P                  4       R2# )(z, {0}))r3   r  rM   s   &r   rV   IndexedSource._name_template(  s    8DHH%&h//r   c                &   < V ^8  d   Qh/ S[ ;R&   # )r   r  r   )r   r;   s   "r   r   r         	H r   r:   Nr   rf   s   @r   r  r    s:     % %" " 0 0  r   r  c                   `   a  ] tR tRt o V 3R lR ltV 3R lR lt]V 3R lR l4       tRtV t	R	# )
NegateSourcei-  c                   < V ^8  d   QhRR/# r   r:   )r   r;   s   "r   r   NegateSource.__annotate__/  r  r   c                &    V P                   f   Q hR # r>   r   rM   s   &r   r   NegateSource.__post_init__/  r  r   c                "   < V ^8  d   QhRRRR/# r8   r:   )r   r;   s   "r   r   r  2  r  r   c                    \         hr>   rw   rD   s   &&r   rF   NegateSource.reconstruct2  r|  r   c                    < V ^8  d   QhRS[ /# rI   rP   )r   r;   s   "r   r   r  6  s       r   c                    R # )z{0}.__neg__()r:   rM   s   &r   rV   NegateSource._name_template5  s     r   r:   N
r\   r]   r^   r_   r   rF   r`   rV   rd   re   rf   s   @r   r  r  -  s-     % %" "  r   r  c                   `   a  ] tR tRt o V 3R lR ltV 3R lR lt]V 3R lR l4       tRtV t	R	# )
ConvertIntSourcei;  c                   < V ^8  d   QhRR/# r   r:   )r   r;   s   "r   r   ConvertIntSource.__annotate__=  r  r   c                &    V P                   f   Q hR # r>   r   rM   s   &r   r   ConvertIntSource.__post_init__=  r  r   c                "   < V ^8  d   QhRRRR/# r8   r:   )r   r;   s   "r   r   r  @        ; 4 r   c                *    V! V P                   4       R # r>   r   rD   s   &&r   rF   ConvertIntSource.reconstruct@      		r   c                    < V ^8  d   QhRS[ /# rI   rP   )r   r;   s   "r   r   r  D  s     7 7 7r   c                    R # )z%cast_symbool_to_symint_guardless({0})r:   rM   s   &r   rV   ConvertIntSource._name_templateC  s    6r   r:   Nr  rf   s   @r   r  r  ;  s-     % %  7 7r   r  c                   l   a  ] tR tRt o V 3R lR ltV 3R lR lt]V 3R lR l4       tV 3R ltR	t	V t
R
# )DynamicScalarSourceiH  c                   < V ^8  d   QhRR/# r   r:   )r   r;   s   "r   r    DynamicScalarSource.__annotate__L  r  r   c                &    V P                   f   Q hR # r>   r   rM   s   &r   r   !DynamicScalarSource.__post_init__L  r  r   c                "   < V ^8  d   QhRRRR/# r8   r:   )r   r;   s   "r   r   r  O       > >; >4 >r   c                   a SP                  V3R  l4       S! V P                  4       SP                  \        ^R4      4       R# )c                  (   < S P                  R R4      # )builtinsr   r  r9   s   r   r   1DynamicScalarSource.reconstruct.<locals>.<lambda>T  s    g&>&>z5&Qr   FNr   r   r   r   rD   s   &fr   rF   DynamicScalarSource.reconstructO  s6    
 	QR		21e<=r   c                    < V ^8  d   QhRS[ /# rI   rP   )r   r;   s   "r   r   r  Y         r   c                    R # )zint({0})r:   rM   s   &r   rV   "DynamicScalarSource._name_templateX  s    r   c                &   < V ^8  d   Qh/ S[ ;R&   # )r   is_intr~  )r   r;   s   "r   r   r  H  s     L r   r:   N)r\   r]   r^   r_   r   rF   r`   rV   rc   rd   re   rf   s   @r   r  r  H  s4     % %> >  #  r   r  c                   `   a  ] tR tRt o V 3R lR ltV 3R lR lt]V 3R lR l4       tRtV t	R	# )
FlattenScriptObjectSourcei]  c                   < V ^8  d   QhRR/# r   r:   )r   r;   s   "r   r   &FlattenScriptObjectSource.__annotate___  r  r   c                &    V P                   f   Q hR # r>   r   rM   s   &r   r   'FlattenScriptObjectSource.__post_init___  r  r   c                "   < V ^8  d   QhRRRR/# r8   r:   )r   r;   s   "r   r   r  b  r  r   c                *    V! V P                   4       R # r>   r   rD   s   &&r   rF   %FlattenScriptObjectSource.reconstructb  r  r   c                    < V ^8  d   QhRS[ /# rI   rP   )r   r;   s   "r   r   r  f  s     ' ' 'r   c                    R # )z{0}.__obj_flatten__()r:   rM   s   &r   rV   (FlattenScriptObjectSource._name_templatee  s    &r   r:   Nr  rf   s   @r   r  r  ]  s-     % %  ' 'r   r  c                   `   a  ] tR tRt o V 3R lR ltV 3R lR lt]V 3R lR l4       tRtV t	R	# )
ScriptObjectQualifiedNameSourceij  c                   < V ^8  d   QhRR/# r   r:   )r   r;   s   "r   r   ,ScriptObjectQualifiedNameSource.__annotate__l  r  r   c                &    V P                   f   Q hR # r>   r   rM   s   &r   r   -ScriptObjectQualifiedNameSource.__post_init__l  r  r   c                "   < V ^8  d   QhRRRR/# r8   r:   )r   r;   s   "r   r   r  o  r  r   c                *    V! V P                   4       R # r>   r   rD   s   &&r   rF   +ScriptObjectQualifiedNameSource.reconstructo  r  r   c                    < V ^8  d   QhRS[ /# rI   rP   )r   r;   s   "r   r   r  s  s     . . .r   c                    R # )z{0}._type().qualified_name()r:   rM   s   &r   rV   .ScriptObjectQualifiedNameSource._name_templater  s    -r   r:   Nr  rf   s   @r   r  r  j  s-     % %  . .r   r  c                   N   a  ] tR tRt o V 3R lR lt]V 3R lR l4       tRtV tR# )AttrProxySourceiw  c                "   < V ^8  d   QhRRRR/# r8   r:   )r   r;   s   "r   r   AttrProxySource.__annotate__x  r  r   c                *    V! V P                   4       R # r>   r   rD   s   &&r   rF   AttrProxySource.reconstructx  r  r   c                    < V ^8  d   QhRS[ /# rI   rP   )r   r;   s   "r   r   r  |            r   c                    R # )z{0}.get_base()r:   rM   s   &r   rV   AttrProxySource._name_template{  s    r   r:   Nr   rf   s   @r   r  r  w  s#          r   r  c                      a  ] tR tRt o Rt]P                  ! RRRR7      t]P                  ! RRRR7      tV 3R lR ltV 3R lR lt	]
P                  V 3R lR	 l4       tV 3R
 ltRtV tR# )DefaultsSourcei  F)initr1   comparec                   < V ^8  d   QhRR/# r   r:   )r   r;   s   "r   r   DefaultsSource.__annotate__  s      t r   c           
     T   V P                   '       g   Q R 4       hV P                  '       d   \        V P                  \        4      '       g   Q h\
        P                  V RR4       \
        P                  V RR\        V P                  4       R\        V P                  4       R24       R
# \        V P                  \        4      '       g   Q h\
        P                  V RR4       \
        P                  V RR\        V P                  4       R\        V P                  4       R	24       R
# )z]Base must be a valid source in order to properly track and guard this Defaults to its origin.r  __kwdefaults___namer   z['z']__defaults__[rT   N)
r   is_kwr   idx_keyr'   object__setattr__r3   r  r   rM   s   &r   r   DefaultsSource.__post_init__  s    yyy 	
k	
y :::dllC0000tW.>?$**-.b$,,1G0HK dllC0000tWn=g(<'=Qx?U>VVWXr   c                "   < V ^8  d   QhRRRR/# r8   r:   )r   r;   s   "r   r   r    s     6 6; 64 6r   c                   V! V P                   4       VP                  VP                  V P                  4      4       VP	                  VP                  V P                  4      4       VP	                  \        4       4       R # r>   )r   r   r   r  rB   r   r$  r   rD   s   &&r   rF   DefaultsSource.reconstruct  sZ    		g77

CDg77EF245r   c                    < V ^8  d   QhRS[ /# rI   rP   )r   r;   s   "r   r   r    r  r   c                    V P                   # r>   )r   rM   s   &r   rV   DefaultsSource._name_template  s    zzr   c                Z   < V ^8  d   Qh/ S[ S[,          ;R&   S[;R&   S[;R&   S[;R&   # )r   r$  r#  r  r   )r   r'   r   )r   r;   s   "r   r   r    s;     3Y    I	 
 I r   r:   N)r\   r]   r^   r_   r#  r
  r  r   r   rF   ra   rb   rV   rc   rd   re   rf   s   @r   r  r    sj      E""E5IE""E5IE &6 6  C  r   r  c                      a a ] tR tRt oRtV3R lV 3R lltV3R lR ltV3R lR lt]P                  V3R	 lR
 l4       t
V3R ltRtVtV ;t# )GetItemSourcei  Fc                   < V ^8  d   QhRR/# r   r:   )r   r;   s   "r   r   GetItemSource.__annotate__  s     8 8t 8r   c                   < V P                   f   Q h\        V P                  \        4      '       d;   \        SV `  RV P                  P                  4       4       \        SV `  RR4       R # R # )Nindexindex_is_sliceT)r   r   r4  slicesuperr&  
__reduce__)rE   	__class__s   &r   r   GetItemSource.__post_init__  sU    yy$$$djj%((G)>)>)@AG 0$7 )r   c                "   < V ^8  d   QhRRRR/# r8   r:   )r   r;   s   "r   r   r2    s     6 6; 64 6r   c                2   V! V P                   4       V P                  '       d0   VP                  VP                  V P	                  4       4      4       M*VP                  VP                  V P
                  4      4       VP                  \        4       4       R # r>   )r   r5  rB   r   unpack_slicer4  r   rD   s   &&r   rF   GetItemSource.reconstruct  sk    		!!'";";D<M<M<O"PQ!!'";";DJJ"GH245r   c                    < V ^8  d   QhRS[ /# rI   )r6  )r   r;   s   "r   r   r2    s     ( (e (r   c                R    V P                   '       g   Q hV P                  w  rV! V!  # r>   )r5  r4  )rE   slice_class
slice_argss   &  r   r=  GetItemSource.unpack_slice  s+    """"""&**J''r   c                    < V ^8  d   QhRS[ /# rI   rP   )r   r;   s   "r   r   r2    s     E E Er   c                    \        V P                  \        4      '       d   Q hV P                  '       d    R \	        V P                  4       RR7       R2# R \	        V P                  RR7       R2# ){0}[TrS   rT   )r   r4  r
   r5  r3   r=  rM   s   &r   rV   GetItemSource._name_template  sb    
 djj&1111HT%6%6%8TJK1MMHTZZDAB!DDr   c                2   < V ^8  d   Qh/ S[ ;R&   S[;R&   # )r   r4  r5  )r   r   )r   r;   s   "r   r   r2    s     J    r   r:   )r\   r]   r^   r_   r5  r   rF   r=  ra   rb   rV   rc   rd   re   __classcell__)r9  r;   s   @@r   r0  r0    sM      !N8 86 6( (
 E E5  r   r0  c                      a  ] tR tRt o V 3R lR lt]P                  V 3R lR l4       tV 3R lR ltV 3R lt	R	t
V tR
# )ConstDictKeySourcei  c                "   < V ^8  d   QhRRRR/# r8   r:   )r   r;   s   "r   r   ConstDictKeySource.__annotate__  r   r   c                   a SP                  V3R  l4       S! V P                  4       SP                  SP                  V P                  4      4       SP                  \        ^R4      4       R# )c                  D   < S P                  \        P                  R 4      # )dict_keys_getitemr  r   r\   r  s   r   r   0ConstDictKeySource.reconstruct.<locals>.<lambda>  s    G,,U^^=PQr   FNr   r   rB   r   r4  r   r   rD   s   &fr   rF   ConstDictKeySource.reconstruct  sU    Q	
 			g77

CD21e<=r   c                    < V ^8  d   QhRS[ /# rI   rP   )r   r;   s   "r   r   rM    s     R R Rr   c                8    R \        V P                  RR7       R2# )zlist(dict.keys({0}))[TrS   rT   r3   r4  rM   s   &r   rV   !ConstDictKeySource._name_template  s     )$**)N(OqQQr   c                    < V ^8  d   QhRS[ /# rI   r~  )r   r;   s   "r   r   rM    s      T r   c                    R # r  r:   rM   s   &r   is_dict_keyConstDictKeySource.is_dict_key  r  r   c                &   < V ^8  d   Qh/ S[ ;R&   # r   r4  r   )r   r;   s   "r   r   rM         J r   r:   N)r\   r]   r^   r_   rF   ra   rb   rV   r[  rc   rd   re   rf   s   @r   rK  rK    s<     > > R R #  r   rK  c                      a  ] tR tRt o V 3R lR ltV 3R lR lt]P                  V 3R lR l4       tV 3R lR	 lt	V 3R
 lt
RtV tR# )NonSerializableSetGetItemSourcei  c                   < V ^8  d   QhRR/# r   r:   )r   r;   s   "r   r   ,NonSerializableSetGetItemSource.__annotate__  s     7 7t 7r   c                X    ^RI Hp VP                  V P                  4      '       g   Q hR#    )ConstantVariableN)	variablesrh  
is_literalr4  rE   rh  s   & r   r   -NonSerializableSetGetItemSource.__post_init__  s     /**4::6666r   c                "   < V ^8  d   QhRRRR/# r8   r:   )r   r;   s   "r   r   rd    r   r   c                   a SP                  V3R  l4       S! V P                  4       SP                  SP                  V P                  4      4       SP                  \        ^R4      4       R# )c                  D   < S P                  \        P                  R 4      # )set_getitemrQ  r  s   r   r   =NonSerializableSetGetItemSource.reconstruct.<locals>.<lambda>  s    G,,U^^]Kr   FNrS  rD   s   &fr   rF   +NonSerializableSetGetItemSource.reconstruct  sU    K	
 			g77

CD21e<=r   c                    < V ^8  d   QhRS[ /# rI   rP   )r   r;   s   "r   r   rd    s     G G Gr   c                8    R \        V P                  RR7       R2# )z
list({0})[TrS   rT   rW  rM   s   &r   rV   .NonSerializableSetGetItemSource._name_template  s     htzzdCDAFFr   c                    < V ^8  d   QhRS[ /# rI   r~  )r   r;   s   "r   r   rd    s      T r   c                    R # Fr:   rM   s   &r   r[  +NonSerializableSetGetItemSource.is_dict_key  s    r   c                &   < V ^8  d   Qh/ S[ ;R&   # r^  r   )r   r;   s   "r   r   rd    r`  r   r:   N)r\   r]   r^   r_   r   rF   ra   rb   rV   r[  rc   rd   re   rf   s   @r   rb  rb    sF     7 7
> > G G -  r   rb  c                      a  ] tR tRt o V 3R lR ltV 3R lR lt]P                  V 3R lR l4       tV 3R lt	R	t
V tR
# )DictGetItemSourcei  c                   < V ^8  d   QhRR/# r   r:   )r   r;   s   "r   r   DictGetItemSource.__annotate__       5 5t 5r   c                    ^RI Hp \        V P                  \        4      '       g&   VP                  V P                  4      '       g   Q hR# R# rf  ri  rh  r   r4  rK  rj  rk  s   & r   r   DictGetItemSource.__post_init__  C    /JJ*
 
((44	5 54
r   c                "   < V ^8  d   QhRRRR/# r8   r:   )r   r;   s   "r   r   r~    s     	6 	6; 	64 	6r   c                   V! V P                   4       \        V P                  \        4      '       d   V! V P                  4       M*VP	                  VP                  V P                  4      4       VP	                  \        4       4       R # r>   )r   r   r4  r
   rB   r   r   rD   s   &&r   rF   DictGetItemSource.reconstruct  s\    		 djj&))DJJ!!'";";DJJ"GH245r   c                    < V ^8  d   QhRS[ /# rI   rP   )r   r;   s   "r   r   r~         E E Er   c                    \        V P                  \        4      '       d$   R \        V P                  P                  4       R2# R \        V P                  RR7       R2# )rF  rT   TrS   r   r4  rK  r3   r)   rM   s   &r   rV    DictGetItemSource._name_template  sL    djj"455HTZZ__56a88HTZZDAB!DDr   c                &   < V ^8  d   Qh/ S[ ;R&   # r^  r_  )r   r;   s   "r   r   r~         
 J r   r:   Nr   rf   s   @r   r|  r|    s<     5 5	6 	6 E E5  r   r|  c                      a  ] tR tRt o V 3R lR ltV 3R lR lt]P                  V 3R lR l4       tV 3R lt	R	t
V tR
# )DictSubclassGetItemSourcei  c                   < V ^8  d   QhRR/# r   r:   )r   r;   s   "r   r   &DictSubclassGetItemSource.__annotate__$  r  r   c                    ^RI Hp \        V P                  \        4      '       g&   VP                  V P                  4      '       g   Q hR# R# rf  r  rk  s   & r   r   'DictSubclassGetItemSource.__post_init__$  r  r   c                "   < V ^8  d   QhRRRR/# r8   r:   )r   r;   s   "r   r   r  +  s     > >; >4 >r   c                F  a SP                  V3R  l4       S! V P                  4       \        V P                  \        4      '       d   S! V P                  4       M*SP                  SP                  V P                  4      4       SP                  \        ^R4      4       R# )c                  D   < S P                  \        P                  R 4      # )dict_getitemrQ  r  s   r   r   7DictSubclassGetItemSource.reconstruct.<locals>.<lambda>0      G,,U^^^Lr   FN)	r   r   r   r4  r
   rB   r   r   r   rD   s   &fr   rF   %DictSubclassGetItemSource.reconstruct+  sv     	L	

 			 djj&))DJJ!!'";";DJJ"GH21e<=r   c                    < V ^8  d   QhRS[ /# rI   rP   )r   r;   s   "r   r   r  ?  r  r   c                    \        V P                  \        4      '       d$   R \        V P                  P                  4       R2# R\        V P                  RR7       R2# )zdict.__getitem__({0}, r   rF  TrS   rT   r  rM   s   &r   rV   (DictSubclassGetItemSource._name_template>  sL    djj"455-htzz.G-HJJHTZZDAB!DDr   c                &   < V ^8  d   Qh/ S[ ;R&   # r^  r_  )r   r;   s   "r   r   r    r  r   r:   Nr   rf   s   @r   r  r    s=     5 5> >& E EE  r   r  c                   f   a  ] tR tRt o RtV 3R lR lt]P                  V 3R lR l4       tRt	V t
R# )	ListGetItemSourceiF  zQ
Same as GetItemSource with reconstruct and name overridden to be list specific.
c                "   < V ^8  d   QhRRRR/# r8   r:   )r   r;   s   "r   r   ListGetItemSource.__annotate__L  s     > >; >4 >r   c                  a SP                  V3R  l4       S! V P                  4       V P                  '       d   \        R4      hSP	                  SP                  V P                  4      4       SP                  \        ^R4      4       R# )c                  D   < S P                  \        P                  R 4      # )list_getitemrQ  r  s   r   r   /ListGetItemSource.reconstruct.<locals>.<lambda>R  r  r   >List[slice] is a temporary object and should not have a sourceFN)	r   r   r5  RuntimeErrorrB   r   r4  r   r   rD   s   &fr   rF   ListGetItemSource.reconstructL  sw    
 	L	

 			 P  !!'";";DJJ"GH21e<=r   c                    < V ^8  d   QhRS[ /# rI   rP   )r   r;   s   "r   r   r  c  s     
W 
W 
Wr   c                    \        V P                  \        4      '       d   Q hV P                  '       d   \	        R 4      hR\        V P                  RR7       R2# )r  zlist.__getitem__({0}, TrS   r   )r   r4  r
   r5  r  r3   rM   s   &r   rV    ListGetItemSource._name_templateb  sU    
 djj&1111P  .htzzd.S-TTUVVr   r:   N)r\   r]   r^   r_   r	  rF   ra   rb   rV   rd   re   rf   s   @r   r  r  F  s0     > >, 
W 
Wr   r  c                   b   a  ] tR tRt o V 3R lR lt]P                  V 3R lR l4       tRtV t	R# )TupleIteratorGetItemSourceip  c                "   < V ^8  d   QhRRRR/# r8   r:   )r   r;   s   "r   r   'TupleIteratorGetItemSource.__annotate__r  r   r   c                   a SP                  V3R  l4       S! V P                  4       SP                  SP                  V P                  4      4       SP                  \        ^R4      4       R# )c                  D   < S P                  \        P                  R 4      # )tuple_iterator_getitemrQ  r  s   r   r   8TupleIteratorGetItemSource.reconstruct.<locals>.<lambda>t  s    G,,U^^=UVr   FNrS  rD   s   &fr   rF   &TupleIteratorGetItemSource.reconstructr  sU    V	
 			g77

CD21e<=r   c                    < V ^8  d   QhRS[ /# rI   rP   )r   r;   s   "r   r   r  {  ru   r   c                8    R \        V P                  RR7       R2# )z___tuple_iterator_getitem({0}, TrS   r   rW  rM   s   &r   rV   )TupleIteratorGetItemSource._name_templatez  s#     0PT0U/VVWX	
r   r:   N)
r\   r]   r^   r_   rF   ra   rb   rV   rd   re   rf   s   @r   r  r  p  s)     > > 
 
r   r  c                   N   a  ] tR tRt o V 3R lR lt]V 3R lR l4       tRtV tR# )NamedTupleFieldsSourcei  c                "   < V ^8  d   QhRRRR/# r8   r:   )r   r;   s   "r   r   #NamedTupleFieldsSource.__annotate__  r+  r   c                j    V! V P                   4       VP                  VP                  R 4      4       R# )_fieldsNr!  rD   s   &&r   rF   "NamedTupleFieldsSource.reconstruct  r/  r   c                    < V ^8  d   QhRS[ /# rI   rP   )r   r;   s   "r   r   r    s     + + +r   c                    R # )z___namedtuple_fields({0})r:   rM   s   &r   rV   %NamedTupleFieldsSource._name_template  s    *r   r:   Nr   rf   s   @r   r  r    s%     D D + +r   r  c                   N   a  ] tR tRt o V 3R lR lt]V 3R lR l4       tRtV tR# )DataclassFieldsSourcei  c                "   < V ^8  d   QhRRRR/# r8   r:   )r   r;   s   "r   r   "DataclassFieldsSource.__annotate__  s     > >; >4 >r   c                   a SP                  V3R  l4       S! V P                  4       SP                  \        ^R4      4       R# )c                  D   < S P                  \        P                  R 4      # )dataclass_fieldsrQ  r  s   r   r   3DataclassFieldsSource.reconstruct.<locals>.<lambda>  s    G,,U^^=OPr   FNr  rD   s   &fr   rF   !DataclassFieldsSource.reconstruct  s8    P	
 			21e<=r   c                    < V ^8  d   QhRS[ /# rI   rP   )r   r;   s   "r   r   r    s     * * *r   c                    R # )z___dataclass_fields({0})r:   rM   s   &r   rV   $DataclassFieldsSource._name_template  s    )r   r:   Nr   rf   s   @r   r  r    s#     > > * *r   r  c                   `   a  ] tR tRt o V 3R lR ltV 3R lR lt]V 3R lR l4       tRtV t	R	# )

TypeSourcei  c                   < V ^8  d   QhRR/# r   r:   )r   r;   s   "r   r   TypeSource.__annotate__  r  r   c                &    V P                   f   Q hR # r>   r   rM   s   &r   r   TypeSource.__post_init__  r  r   c                "   < V ^8  d   QhRRRR/# r8   r:   )r   r;   s   "r   r   r         > >; >4 >r   c                   a SP                  V3R  l4       S! V P                  4       SP                  \        ^R4      4       R# )c                  (   < S P                  R R4      # )r  typer  r  s   r   r   (TypeSource.reconstruct.<locals>.<lambda>  s    g&>&>z6&Rr   FNr  rD   s   &fr   rF   TypeSource.reconstruct  s4    RS		21e<=r   c                    < V ^8  d   QhRS[ /# rI   rP   )r   r;   s   "r   r   r    s       r   c                    R # )z	type({0})r:   rM   s   &r   rV   TypeSource._name_template  s    r   r:   Nr  rf   s   @r   r  r    s-     % %> >
  r   r  c                   N   a  ] tR tRt o V 3R lR lt]V 3R lR l4       tRtV tR# )OptimizerSourcei  c                "   < V ^8  d   QhRRRR/# r8   r:   )r   r;   s   "r   r   OptimizerSource.__annotate__  r  r   c                *    V! V P                   4       R # r>   r   rD   s   &&r   rF   OptimizerSource.reconstruct  r  r   c                    < V ^8  d   QhRS[ /# rI   rP   )r   r;   s   "r   r   r    r  r   c                    R # r  r:   rM   s   &r   rV   OptimizerSource._name_template  r  r   r:   Nr   rf   s   @r   r  r    s#        r   r  c                   ~   a  ] tR tRt o V 3R lR lt]P                  V 3R lR l4       t]V 3R lR l4       t	Rt
V tR	# )
NNModuleSourcei  c                "   < V ^8  d   QhRRRR/# r8   r:   )r   r;   s   "r   r   NNModuleSource.__annotate__  r  r   c                *    V! V P                   4       R # r>   r   rD   s   &&r   rF   NNModuleSource.reconstruct  r  r   c                    < V ^8  d   QhRS[ /# rI   rJ   )r   r;   s   "r   r   r    r_  r   c                D    \         V P                  P                  ,          # r>   ra  rM   s   &r   r   NNModuleSource.guard_source  rd  r   c                    < V ^8  d   QhRS[ /# rI   rP   )r   r;   s   "r   r   r    r  r   c                    R # r  r:   rM   s   &r   rV   NNModuleSource._name_template  r  r   r:   N)r\   r]   r^   r_   rF   ra   rb   r   r`   rV   rd   re   rf   s   @r   r  r    s?       K K  r   r  c                   P   a  ] tR tRt o ]P
                  V 3R lR l4       tRtV tR# )UnspecializedNNModuleSourcei  c                    < V ^8  d   QhRS[ /# rI   rJ   )r   r;   s   "r   r   (UnspecializedNNModuleSource.__annotate__  s     M Mk Mr   c                D    \         V P                  P                  ,          # r>   )%_GUARD_SOURCE_UNSPECIALIZED_NN_MODULEr   r   rM   s   &r   r   (UnspecializedNNModuleSource.guard_source  s    4TYY5K5KLLr   r:   Nre  rf   s   @r   r  r    s     M Mr   r  c                   P   a  ] tR tRt o ]P
                  V 3R lR l4       tRtV tR# )"UnspecializedBuiltinNNModuleSourcei  c                    < V ^8  d   QhRS[ /# rI   rJ   )r   r;   s   "r   r   /UnspecializedBuiltinNNModuleSource.__annotate__  s     U Uk Ur   c                D    \         V P                  P                  ,          # r>   )-_GUARD_SOURCE_UNSPECIALIZED_BUILTIN_NN_MODULEr   r   rM   s   &r   r   /UnspecializedBuiltinNNModuleSource.guard_source  s    <TYY=S=STTr   r:   Nre  rf   s   @r   r  r    s     U Ur   r  c                   P   a  ] tR tRt o ]P
                  V 3R lR l4       tRtV tR# )FSDPNNModuleSourcei  c                    < V ^8  d   QhRS[ /# rI   rJ   )r   r;   s   "r   r   FSDPNNModuleSource.__annotate__  s     A Ak Ar   c                D    \         V P                  P                  ,          # r>   )_GUARD_SOURCE_FSDP_MODULEr   r   rM   s   &r   r   FSDPNNModuleSource.guard_source  s    ()?)?@@r   r:   Nre  rf   s   @r   r  r    s     A Ar   r  c                   X   a  ] tR tRt o ]V 3R lR l4       t]V 3R lR l4       tRtV tR# )GlobalStateSourcei  c                    < V ^8  d   QhRS[ /# rI   rP   )r   r;   s   "r   r   GlobalStateSource.__annotate__         r   c                    R # r   r:   rM   s   &r   rV    GlobalStateSource._name_template      r   c                    < V ^8  d   QhRS[ /# rI   rJ   )r   r;   s   "r   r   r    r   r   c                "    \         P                  # r>   r   rM   s   &r   r   GlobalStateSource.guard_source  r   r   r:   N	r\   r]   r^   r_   r`   rV   r   rd   re   rf   s   @r   r
  r
    s+       " "r   r
  c                      a  ] tR tRt o RtV 3R lR lt]P                  V 3R lR l4       tV 3R lR lt	]
V 3R	 lR
 l4       tV 3R ltRtV tR# )ImportSourcei  zPoints to an imported module - used instead of GlobalSource
in case the user has overridden the module name in their local namespacec                   < V ^8  d   QhRR/# r   r:   )r   r;   s   "r   r   ImportSource.__annotate__  s     > >t >r   c                X    ^RI HpHp V! V P                  VP                  4      4       R# )rg  )GuardBuilderinstall_guardN)guardsr  r  rz  ID_MATCH)rE   r  r  s   &  r   r   ImportSource.__post_init__  s    7dool&;&;<=r   c                    < V ^8  d   QhRS[ /# rI   rP   )r   r;   s   "r   r   r    s     3 3 3r   c                "    R V P                    R2# )z__import__('z'))module_namerM   s   &r   rV   ImportSource._name_template  s    d../r22r   c                "   < V ^8  d   QhRRRR/# r8   r:   )r   r;   s   "r   r   r    s     
 
; 
4 
r   c                    VP                  VP                  ^ 4      \        ^ 4      VP                  V P                  4      .4       R# )    N)r   r   r   create_import_namer"  rD   s   &&r   rF   ImportSource.reconstruct  s?    ))!,"1%**4+;+;<	
r   c                    < V ^8  d   QhRS[ /# rI   rJ   )r   r;   s   "r   r   r    r   r   c                "    \         P                  # r>   r   rM   s   &r   r   ImportSource.guard_source  r   r   c                &   < V ^8  d   Qh/ S[ ;R&   # )r   r"  rP   )r   r;   s   "r   r   r    s     
  r   r:   N)r\   r]   r^   r_   r	  r   ra   rb   rV   rF   r`   r   rc   rd   re   rf   s   @r   r  r    sT     P
> >
 3 3
 
 " "5  r   r  c                      a  ] tR tRt o ]P
                  V 3R lR l4       tV 3R lR ltV 3R lR lt]	V 3R lR	 l4       t
V 3R
 ltRtV tR# )TorchFunctionModeStackSourcei  c                    < V ^8  d   QhRS[ /# rI   rP   )r   r;   s   "r   r   )TorchFunctionModeStackSource.__annotate__  s     U U Ur   c                <    R \        V P                  4       4       R2# )z$___get_torch_function_mode_stack_at(r   )r3   
_get_indexrM   s   &r   rV   +TorchFunctionModeStackSource._name_template  s    5ht?P6Q5RRSTTr   c                    < V ^8  d   QhRS[ /# rI   r   )r   r;   s   "r   r   r0    s     G GC Gr   c                D    ^RI Hp VP                  V P                  4      # )rg  )TorchFunctionModeStackVariable)variables.torch_functionr6  get_mode_indexind)rE   r6  s   & r   r2  'TorchFunctionModeStackSource._get_index  s    L-<<TXXFFr   c                "   < V ^8  d   QhRRRR/# r8   r:   )r   r;   s   "r   r   r0    r  r   c                   a SP                  V3R  l4       SP                  SP                  V P                  4       4      .4       SP                  \	        ^R4      4       R# )c                  D   < S P                  \        P                  R 4      # ) get_torch_function_mode_stack_atrQ  r  s   r   r   :TorchFunctionModeStackSource.reconstruct.<locals>.<lambda>  s    G,, Br   FN)r   r   r   r2  r   rD   s   &fr   rF   (TorchFunctionModeStackSource.reconstruct  sQ    	

 	w889JKLM21e<=r   c                    < V ^8  d   QhRS[ /# rI   rJ   )r   r;   s   "r   r   r0    r   r   c                "    \         P                  # r>   r   rM   s   &r   r   )TorchFunctionModeStackSource.guard_source  r   r   c                &   < V ^8  d   Qh/ S[ ;R&   # )r   r9  r   )r   r;   s   "r   r   r0    r  r   r:   N)r\   r]   r^   r_   ra   rb   rV   r2  rF   r`   r   rc   rd   re   rf   s   @r   r.  r.    sR      U UG G
> > " "/  r   r.  c                      a  ] tR tRt o V 3R lR lt]V 3R lR l4       t]P                  V 3R lR l4       t	V 3R lR	 lt
V 3R
 ltRtV tR# )r   i  c                "   < V ^8  d   QhRRRR/# r8   r:   )r   r;   s   "r   r   ConstantSource.__annotate__  s     W W; W4 Wr   c                ^    VP                  VP                  V P                  R R7      4       R# )Fr   N)rB   r   source_namerD   s   &&r   rF   ConstantSource.reconstruct  s&    g889I9Iu8UVr   c                    < V ^8  d   QhRS[ /# rI   rJ   )r   r;   s   "r   r   rG  "  s     $ $k $r   c                "    \         P                  # r>   )r	   r    rM   s   &r   r   ConstantSource.guard_source!  s    ###r   c                    < V ^8  d   QhRS[ /# rI   rP   )r   r;   s   "r   r   rG  &  r  r   c                    V P                   # r>   )rI  rM   s   &r   rV   ConstantSource._name_template%  s    r   c                &   < V ^8  d   QhRS[ RS[ /# )r   rw  r   r_  )r   r;   s   "r   r   rG  )  s     " "S "S "r   c                    \         hr>   rw   ry  s   &&r   rz  ConstantSource.make_guard)  r|  r   c                &   < V ^8  d   Qh/ S[ ;R&   # )r   rI  rP   )r   r;   s   "r   r   rG    r   r   r:   N)r\   r]   r^   r_   rF   r`   r   ra   rb   rV   rz  rc   rd   re   rf   s   @r   r   r     sP     W W $ $    " "  r   r   c                   N   a  ] tR tRt o ]V 3R lR l4       tV 3R lR ltRtV tR# )NumpyTensorSourcei-  c                    < V ^8  d   QhRS[ /# rI   rP   )r   r;   s   "r   r   NumpyTensorSource.__annotate__0  s     $ $ $r   c                    R # )z___from_numpy({0})r:   rM   s   &r   rV    NumpyTensorSource._name_template/  s    #r   c                "   < V ^8  d   QhRRRR/# r8   r:   )r   r;   s   "r   r   rX  3  r  r   c                   a SP                  V3R  l4       S! V P                  4       SP                  \        ^R4      4       R# )c                  (   < S P                  R R4      # )torch	as_tensorr  r  s   r   r   /NumpyTensorSource.reconstruct.<locals>.<lambda>4  s    g&>&>w&Tr   FNr  rD   s   &fr   rF   NumpyTensorSource.reconstruct3  s4    TU		21e<=r   r:   N)	r\   r]   r^   r_   r`   rV   rF   rd   re   rf   s   @r   rV  rV  -  s!     $ $> >r   rV  c                   <   a  ] tR tRt o ]V 3R lR l4       tRtV tR# )SubclassAttrListSourcei9  c                    < V ^8  d   QhRS[ /# rI   rP   )r   r;   s   "r   r   #SubclassAttrListSource.__annotate__<  s     - - -r   c                    R # )z{0}.__tensor_flatten__()[0]r:   rM   s   &r   rV   %SubclassAttrListSource._name_template;  s    ,r   r:   Nr\   r]   r^   r_   r`   rV   rd   re   rf   s   @r   rc  rc  9  s     - -r   rc  c                   <   a  ] tR tRt o ]V 3R lR l4       tRtV tR# )FloatTensorSourceiB  c                    < V ^8  d   QhRS[ /# rI   rP   )r   r;   s   "r   r   FloatTensorSource.__annotate__E  s     # # #r   c                    R # )z___as_tensor({0})r:   rM   s   &r   rV    FloatTensorSource._name_templateD  s    "r   r:   Nrh  rf   s   @r   rj  rj  B  s     # #r   rj  c                   <   a  ] tR tRt o ]V 3R lR l4       tRtV tR# )CallMethodItemSourceiI  c                    < V ^8  d   QhRS[ /# rI   rP   )r   r;   s   "r   r   !CallMethodItemSource.__annotate__L  s       r   c                    R # )z
{0}.item()r:   rM   s   &r   rV   #CallMethodItemSource._name_templateK  s    r   r:   Nrh  rf   s   @r   rp  rp  I  s      r   rp  c                   X   a  ] tR tRt o ]V 3R lR l4       t]V 3R lR l4       tRtV tR# )ShapeEnvSourceiS  c                    < V ^8  d   QhRS[ /# rI   rP   )r   r;   s   "r   r   ShapeEnvSource.__annotate__V  r  r   c                    R # r  r:   rM   s   &r   rV   ShapeEnvSource._name_templateU  r  r   c                    < V ^8  d   QhRS[ /# rI   rJ   )r   r;   s   "r   r   rx  Z  rl  r   c                "    \         P                  # r>   )r	   	SHAPE_ENVrM   s   &r   r   ShapeEnvSource.guard_sourceY  rp  r   r:   Nr  rf   s   @r   rv  rv  S  s+       % %r   rv  c                      a  ] tR tRt o ]P
                  V 3R lR l4       tV 3R lR lt]V 3R lR l4       t	V 3R lt
R	tV tR
# )CurrentStreamSourcei^  c                    < V ^8  d   QhRS[ /# rI   rP   )r   r;   s   "r   r    CurrentStreamSource.__annotate__c  s     u u ur   c                    R \        V P                  P                  4       R\        V P                  P                  4       R2# )z$___get_current_stream(torch.device('z', z)))r3   r   r  r4  rM   s   &r   rV   "CurrentStreamSource._name_templateb  s=    5ht{{?O?O6P5QQTU]^b^i^i^o^oUpTqqsttr   c                "   < V ^8  d   QhRRRR/# r8   r:   )r   r;   s   "r   r   r  f  s     > >; >4 >r   c                  a ^pSP                  V3R l4       SP                  V3R l4       SP                  SP                  V P                  P                  4      .4       V P                  P
                  e?   V^,          pSP                  SP                  V P                  P
                  4      .4       SP                  \        VR4      4       SP                  \        ^R4      4       R# )rg  c                  D   < S P                  \        P                  R 4      # )get_current_streamrQ  r  s   r   r   1CurrentStreamSource.reconstruct.<locals>.<lambda>i  s    G,,U^^=QRr   c                  (   < S P                  R R4      # )r^  r   r  r  s   r   r   r  k  s    g&>&>w&Qr   NF)r   r   r   r   r  r4  r   )rE   r9   num_argss   &f r   rF   CurrentStreamSource.reconstructf  s    R	
 	QRw889I9IJKL;;(MH!!7#<#<T[[=N=N#O"PQ28UCD21e<=r   c                    < V ^8  d   QhRS[ /# rI   rJ   )r   r;   s   "r   r   r  t  r   r   c                "    \         P                  # r>   r   rM   s   &r   r    CurrentStreamSource.guard_sources  r   r   c                &   < V ^8  d   Qh/ S[ ;R&   # )r   r   )device_type)r   r;   s   "r   r   r  ^  s      r   r:   N)r\   r]   r^   r_   ra   rb   rV   rF   r`   r   rc   rd   re   rf   s   @r   r  r  ^  sF      u u> > " "-  r   r  c                   X   a  ] tR tRt o ]V 3R lR l4       t]V 3R lR l4       tRtV tR# )BackwardStateSourceix  c                    < V ^8  d   QhRS[ /# rI   rP   )r   r;   s   "r   r    BackwardStateSource.__annotate__{  r  r   c                    R # r  r:   rM   s   &r   rV   "BackwardStateSource._name_templatez  r  r   c                    < V ^8  d   QhRS[ /# rI   rJ   )r   r;   s   "r   r   r    s     * *k *r   c                "    \         P                  # r>   )r	   BACKWARD_STATErM   s   &r   r    BackwardStateSource.guard_source~  s    )))r   r:   Nr  rf   s   @r   r  r  x  s+       * *r   r  only_allow_inputc                J    V ^8  d   QhR\         R\        R\        R,          /# )r   r   r  r   N)r
   r   r'   )r   s   "r   r   r     s(     	 		)-	4Z	r   c                    \        V \        4      '       d   \        V P                  VR 7      # \        V \        4      '       g   R# V'       d   V P
                  '       g   R# V P                  # )r  N)r   r   get_local_source_namer   r6   rY   rA   r   r  s   &$r   r  r    sM     &-(($V[[CSTTfk**r   c                <    V ^8  d   QhR\         R\        R\        /# )r   r   r  r   r   )r   s   "r   r   r     s&     X X Xd Xt Xr   c                    \        WR 7      RJ# r  )r  r  s   &$r   is_from_local_sourcer    s     KSWWWr   c                0    V ^8  d   QhR\         R\        /# r   r   )r   s   "r   r   r     s     6 6& 6T 6r   c                     \        V 4      R J# r>   )get_global_source_namer"   s   &r   is_from_global_sourcer    s    !&)55r   c                L    V ^8  d   QhR\         R,          R\        R,          /# r%   r&   )r   s   "r   r   r     s"      6D= S4Z r   c                     \        V \        4      '       d   \        V P                  4      # \        V \        4      '       g   R # V P
                  # r>   )r   r   r  r   r   r   r"   s   &r   r  r    s:    &-((%fkk22fl++r   c                0    V ^8  d   QhR\         R\        /# r   r   )r   s   "r   r   r     s      F t r   c                     \        V \        4      '       d   \        V P                  4      # \        V \        4      ;'       d&    V P
                  ;'       d    V P                  '       * # r>   )r   r   is_from_nonlocal_sourcer   r6   r?   rY   r"   s   &r   r  r    sT    &-((&v{{336;' 	  	 ++	  	 r   c                0    V ^8  d   QhR\         R\        /# r   r   )r   s   "r   r   r     s      6 d r   c                     \        V \        4      '       d   R # \        V \        4      '       d   \        V P                  4      # R# r   )r   rF  r   is_from_closure_sourcer   r"   s   &r   r  r    s1    &-((&-((%fkk22r   c                <    V ^8  d   QhR\         R\         R\        /# )r   r   targetr   r   )r   s   "r   r   r     s!      6 6 d r   c                 n    W8X  d   R # \        V \        4      '       d   \        V P                  V4      # R# r   )r   r   is_from_sourcer   )r   r  s   &&r   r  r    s,    &-((fkk622r   c                0    V ^8  d   QhR\         R\        /# r   r   )r   s   "r   r   r     s      6 d r   c                     \        V \        4      '       d   R # \        V \        4      '       d   \        V P                  4      # R# r   )r   r  r   &is_from_unspecialized_nn_module_sourcer   r"   s   &r   r  r    s2    &566&-((5fkkBBr   c                0    V ^8  d   QhR\         R\        /# r   r   )r   s   "r   r   r     s      6 d r   c                     \        V \        4      '       d   R # \        V \        4      '       d   \        V P                  4      # R# r   )r   r  r   .is_from_unspecialized_builtin_nn_module_sourcer   r"   s   &r   r  r    s2    &<==&-((=fkkJJr   c                0    V ^8  d   QhR\         R\        /# r   r   )r   s   "r   r   r     s      f  r   c                     \        V \        4      '       d   R # \        V \        4      '       d   \        V P                  4      # R# r   )r   rg  r   )is_from_unspecialized_param_buffer_sourcer   r"   s   &r   r  r    s2    &899&-((8EEr   c                0    V ^8  d   QhR\         R\        /# r   r   )r   s   "r   r   r     s       D r   c                     \        V \        4      '       d   R # \        V \        4      '       d   \        V P                  4      # R# r   )r   r  r   $is_from_flatten_script_object_sourcer   r"   s   &r   r  r    s2    &344	FM	*	*3FKK@@r   c                0    V ^8  d   QhR\         R\        /# r   r   )r   s   "r   r   r     s      V  r   c                     \        V \        4      '       d   R # \        V \        4      '       d   \        V P                  4      # R# r   )r   r  r   is_from_optimizer_sourcer   r"   s   &r   r  r    s1    &/**&-(('44r   c                0    V ^8  d   QhR\         R\        /# r   r   )r   s   "r   r   r     s      V  r   c                    \        V \        4      '       d   R # \        V \        4      '       d>   \        V P                  \        4      '       d   V P                  P
                  R8X  d   R # \        V \        4      '       d>   \        V P                  \        4      '       d   V P                  P
                  R8X  d   R # \        V \        4      '       d   \        V P                  4      # R# )Tr  r!  F)	r   r  r|  r   r   r   r0  r   is_from_defaultsr"   s   &r   r  r    s    &.)) 	6,--v{{J//KK"22 	6=))v{{J//KK.0&-((,,r   c                0    V ^8  d   QhR\         R\        /# r   r   )r   s   "r   r   r   
  s      f  r   c                     \        V \        4      '       d   R # \        V \        4      '       d   \        V P                  4      # R# r   )r   r  r   is_from_skip_guard_sourcer   r"   s   &r   r  r  	  s1    &/**&-(((55r   rx  )tr	  r
  enumra   collections.abcr   typingr   r   r^  r   r  torch._guardsr   r   r   r	   r
   r   r   bytecode_transformationr   r   r   r9   r   rL   LOCAL_SPECIALIZED_NN_MODULEr   GLOBAL_SPECIALIZED_NN_MODULELOCAL_UNSPECIALIZED_NN_MODULEGLOBAL_UNSPECIALIZED_NN_MODULE%LOCAL_UNSPECIALIZED_BUILTIN_NN_MODULE&GLOBAL_UNSPECIALIZED_BUILTIN_NN_MODULELOCAL_FSDP_MODULEGLOBAL_FSDP_MODULErb  r  r   r  r#   r*   r3   r6   rh   r|   r   r   r   r   r   r   r   r  r  r(  r4  r<  rF  rP  r\  rg  ri  r  Enumr  r  r  r  r  r  r  r  r  r  r0  rK  rb  r|  r  r  r  r  r  r  r  r  r  r  r  r
  r  r.  r   rV  rc  rj  rp  rv  r  r  	lru_cacher  r  r  r  r  r  r  r  r  r  r  r  r  r  r:   r   r   <module>r     s  &    $ % '    " {>>@@++[-T-T,,k.V.V--{/X/X..0Z0Z55{7h7h668j8j!!;#@#@""K$B$B' #  {@@BB--{/X/X..0Z0Z++[-V-V,,k.X.X55{7h7h668j8j!!;#@#@""K$B$B) %" {HHJJ--{/`/`..0b0b++[-^-^,,k.`.`55{7h7h668j8j!!;#@#@""K$B$B1 - {4466++[-J-J,,k.L.L!!;#@#@""K$B$B--{/L/L..0N0N55{7T7T668V8V 	&3 4(B& B )B< 4(
f 
 )
$ 4(P6 P )P 4(B B )B" 4(C6 C )C 4(E& E )E( 4(  ) 4(	0 	 )	 4(0 0 )0* 4(
 
 )
" 4(
 
 )
0 4($] $ )$ 4(M  ) 4(Lf L )L& 4(  ) 4(!M ! )! 4(	0 	0 )	0 4(K
 K )K 4(	Z 	 )	 4(f  )& 4(m  )@TYY @  4(#E= #E )#EL 4(0M 0 )0 4(
= 
 )
 4(	7} 	7 )	7 4(-  )( 4(	' 	' )	' 4(	.m 	. )	. m   4(!] ! )!H 4(!EM !E )!EH 4(  )( 4(m  )4 4(E E )ED 4(%E %E )%EP 4(&W &W )&WR 4(
 
 )
  4(+] + )+ 4(
*M 
* )
* 4(  ) 4(m  ) 4(
] 
 )
 4(M. M )M 4(U)D U )U 4(A A )A 4(" " )" 4("6 " )": 4("6 " )"4 4("V " )"$ 4(> > )> 4(-] - )- 4(# # )# 4(=  ) 4(%V % )% 4("& " )"2 4(*& * )* 	05	 	 XU X X 6 6                    2  r   