+
    &jh                    d   ^ RI Ht ^ RIt^ RIHt ^ RIHtHtHt ^ RI	H
t
 ]'       d	   ^ RIHtHt ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIHt ]
! R4      t]! R	4      t]P4                  R
 R l4       t]P4                  R R l4       t ! R R]P:                  P<                  4      tR# )    )annotationsN)nullcontext)AnyTYPE_CHECKINGTypeVar)	ParamSpec)CallableSequence)torch_function_passthrough_P_Rc                   V ^8  d   QhRR/# )   returnzdict[Any, Any] )formats   "l/Users/jameslopez/projects/CWCArchive/cwc-podcast/.venv/lib/python3.14/site-packages/torch/_prims/context.py__annotate__r      s     3 3> 3    c            	     ,   \         \         P                  3\         P                  \         P                  P                  3\         P                  P                  \         P                  P                  P                  3\         P                  \         P                  P                  3\         P
                  \         P                  P
                  3\         P                  \         P                  P                  3.p / \         P                  P                  \         P                  P                  b\         P                  P                  \         P                  P                  b\         P                  P                  \         P                  P                  b\         P                  P                  \         P                  P                  b\         P                  P                   \         P                  P"                  b\         P                  P$                  \         P                  P&                  b\         P                  P(                  \         P                  P*                  b\         P                  P,                  \         P                  P.                  b\         P                  P0                  \         P                  P2                  b\         P                  P4                  \         P                  P6                  b\         P                  P8                  \         P                  P:                  b\         P                  P<                  \         P                  P<                  b\         P                  P>                  \         P                  P>                  b\         P                  P@                  \         P                  P@                  b\         P                  PB                  \         P                  PB                  b\         P                  PD                  \         P                  PD                  b\         P                  PF                  \         P                  PF                  b\         P                  PH                  \         P                  PH                  \         P                  PJ                  \         P                  PJ                  \         P                  PL                  \         PN                  PP                  \         P                  PR                  \         PN                  PR                  /CpV  FN  w  r#VPT                   F9  pVPV                  PY                  V4      WPV                  PY                  V4      &   K;  	  KP  	  \[        \         P                  4       Fh  pV\         P                  PT                  9   g   K$  \         P                  PV                  PY                  V4      V\]        \         P                  V4      &   Kj  	  \         P                  P^                  PT                   Fk  p\]        \         P                  VR4      ;'       g    \]        \         V4      p\         P                  P^                  PV                  PY                  V4      W&   Km  	  V# )zq
Mapping of torch API functions to torch._refs functions.
E.g. torch_to_refs_map()[torch.add] == torch._refs.add
N)0torch_refsnn
functionalspecialfftlinalgTensor
__invert__bitwise_not__xor__bitwise_xor__and__bitwise_and__or__
bitwise_or__eq__eq__rsub__rsub__rtruediv__rtruediv__floordiv__floor_divide__rfloordiv__	rfloordiv__pow__pow__rpow__rpow	new_emptynew_full	new_zerosnew_onesfill_zero_tosum_to_sizecopy__primscopy_toresize__all____dict__getdirgetattr_conversions)modulesr	mod_torchmod_refsstensor_attrs         r   torch_to_refs_maprM      s    
	5;;>>"			ekknn778	++,	EKKOO$	u{{))*G!8!8ekk55 	ekk55 	U[[33	
 	U[[^^ 	u{{// 	!!5;;#7#7 	!!5;;#;#; 	""EKK$9$9 	ekkoo 	u{{// 	 5 5 	u{{33 	 5 5 	u{{33  	EKK--!" 	EKK--#$ 	  %++"9"9ELL00U\\00-A0  '	!!A+3+<+<+@+@+CA  $$Q'( "  '
 ###*/++*>*>*B*B1*EAgellA&' 
 [[%%--ellAt4IIq8I11::>>qA . Hr   c                   V ^8  d   QhRR/# )r   r   zset[Any]r   )r   s   "r   r   r   S   s     H H8 Hr   c                     \         P                  P                   U u0 uF,  p \         P                  P                  P	                  V 4      kK.  	  up # u up i )zB
Set of all prim functions, e.g., torch._prims.add in all_prims()
)r   r>   rA   rB   rC   )rK   s    r   	all_primsrP   R   s=    
 38,,2F2FG2FQELL!!%%a(2FGGGs   2Ac                  B    ] tR t^ZtRtRR ]3R R lltR
R R lltR	tR# )TorchRefsModea  
Switches the interpretation of torch.* functions and Tensor methods to
use PrimTorch refs in torch._refs.  (Direct calls to _refs are unaffected.)

>>> # xdoctest: +SKIP
>>> with TorchRefsMode():
...     torch.add(x, y)  # calls torch._refs.add(x, y)

By default, this context manager will fall back on the torch.* if the
ref does not exist; set strict=True to error if this occurs.
If the ref exists we still would like to fall back on the torch.* sometimes,
this behavior can be customized by passing a function to should_fallback_fn.
Fc                 	    R # )Fr   )_s   *r   <lambda>TorchRefsMode.<lambda>l   s    Ur   c               (    V ^8  d   QhRRRRRRRR/# )	r   strictboolshould_fallback_fnzCallable[..., bool]prims_mode_clstyper   Noner   )r   s   "r   r   TorchRefsMode.__annotate__i   s2     - -- 0- 	-
 
-r   c                	*    Wn         W n        W0n        R # )N)rX   rZ   r[   )selfrX   rZ   r[   s   &&&&r   __init__TorchRefsMode.__init__i   s     "4,r   Nc          
     ,    V ^8  d   QhRRRRRRRRR	R
/# )r   	orig_funczCallable[_P, _R]typeszSequence[type]argszSequence[Any]kwargszdict[str, Any] | Noner   r   r   )r   s   "r   r   r^   s   s<     .* .*#.* .* 	.*
 &.* 
.*r   c                	   Vf   / pV\         9   g   V\        4       9   d,   V P                  4       ;_uu_ 4        V! V/ VB uuR R R 4       # \        4       pVP	                  VR 4      pVfV   \        V\        P                  P                  4      '       d,   \        P                  P                  P	                  VR 4      pMVf   \        V\        P                  P                  4      '       do   \        VRR 4      pVf0   VP                  '       d   \        WP                  ^ ,          R 4      pVe+   \        P                  P                  P	                  VR 4      pVe?   V P                  WWcV4      '       d	   V! V/ VB # V ;_uu_ 4        V! V/ VB uuR R R 4       # V P                  '       d,   \!        R\        P"                  P%                  V4       24      hV! V/ VB #   + '       g   i     EL; i  + '       g   i     Li; i)Ndefaultzno _refs support for )r   rP   r[   rM   rC   
isinstancer   _ops
OpOverload_decompdecomposition_tableOpOverloadPacketrE   _dirrZ   rX   RuntimeError	overridesresolve_name)r`   rd   re   rf   rg   mappingfuncri   s   &&&&&   r   __torch_function__ TorchRefsMode.__torch_function__s   s    >F 22i9;6N$$&& $1&1 '& $%{{9d+ <Jy%**2G2GHH==4488DID\jEJJ4O4OPPiD9G9>>>!)^^A->E"}}88<<WdK&&tFKK $1&11T,V, ;;;'(D(DY(O'PQ  $)&))E '&&6 s   G$G8$G5	8H	)r[   rZ   rX   )r   N)	__name__
__module____qualname____firstlineno____doc__r   ra   rv   __static_attributes__r   r   r   rR   rR   Z   s!      2B*	-.* .*r   rR   ) 
__future__r   	functools
contextlibr   typingr   r   r   typing_extensionsr   collections.abcr	   r
   r   torch._decomptorch._primstorch._refstorch._refs.nntorch._refs.nn.functionaltorch._refs.specialtorch.overridestorch._prims_commonr   r   r   cacherM   rP   rr   TorchFunctionModerR   r   r   r   <module>r      s    "  " . . ' 2          : t_T] 3 3l H HG*EOO55 G*r   