ó
    "Eñi   ã                   ó–  • S r SSKrSSKrSSKJr  SSKrSSKJrJ	r	  SSK
r
SSKJrJrJrJrJrJrJrJrJrJrJrJrJrJrJrJrJrJrJrJrJ r J!r!J"r"J#r#J$r$  \RJ                  " \&5      r'\RP                  S 5       r)1 Skr*\
RV                  4S	 jr,\-" 5       r.\
RV                  SS
.S\/\R`                  \4   S\Rb                  \-  4S jjr2g)a±  
This is a simple interpreter for Sympy expressions that dispatches to
classes following the torch._inductor.virtualized calling convention.
For directness, the interpreter takes the handler directly rather than
consulting the TLS.  It does not use most of the methods on the full
handler; only those with corresponding Sympy expressions.  To see an example
of a full handler, see torch.utils._sympy.value_ranges.ValueRangeAnalysis.
é    N)ÚAny)ÚBooleanÚBooleanAtomé   )ÚBitwiseFn_bitwise_andÚBitwiseFn_bitwise_orÚBitwiseFn_bitwise_xorÚ	CeilToIntÚCleanDivÚFloatPowÚFloatTrueDivÚFloorDivÚ
FloorToIntÚIdentityÚ
IntTrueDivÚ!IsNonOverlappingAndDenseIndicatorÚMaxÚMinÚModÚModularIndexingÚOpaqueUnaryFn_log2ÚPowByNaturalÚ	PythonModÚRoundDecimalÚ
RoundToIntÚToFloatÚTruncToFloatÚ
TruncToIntÚWherec                  ó8  • 0 [         R                  S_[         R                  S_[         R                  S_[         R                  S_[         R
                  S_[         R                  S_[         R                  S_[         R                  S_[         R                  S	_[        S
_[        S_[        S_[        S_[        S_[        S_[         R                   S_[         R"                  S_0 [$        S_[&        S_[         R(                  S_[*        S_[,        S_[         R*                  S_[         R.                  S_[         R0                  S_[         R2                  S_[         R4                  S_[         R6                  S_[4        S_[6        S_[8        S_[         R:                  R<                  R>                  R@                  S_[         RB                  S_[D        S_E[F        S[H        S[J        S [L        S![N        S"[P        S#0En S$ H  nX[S        [         U5      '   M     U $ )%NÚor_Úand_ÚeqÚneÚltÚgtÚleÚgeÚnot_Úint_truedivÚtruedivÚfloordivÚtruncÚwhereÚaddÚmulÚpowÚpow_by_naturalÚmodÚ
python_modÚabsÚlogÚexpÚminimumÚmaximumÚmodular_indexingÚexpr_cond_pairÚ	piecewiseÚidentityÚ&is_non_overlapping_and_dense_indicatorÚround_decimalÚlog2Úbitwise_andÚ
bitwise_orÚbitwise_xor)	ÚcosÚsinÚtanÚsinhÚcoshÚtanhÚasinÚacosÚatan)*ÚsympyÚOrÚAndÚEqÚNeÚLtÚGtÚLeÚGeÚNotr   r   r   r   r   r   ÚAddÚMulr   r   ÚPowr   r   ÚAbsr6   r7   r   r   r   Ú	functionsÚ
elementaryr<   ÚExprCondPairÚ	Piecewiser   r   r   r   r   r   r	   Úgetattr)ÚHANDLERSÚnames     ÚV/home/mande/repo/quber/.venv/lib/python3.13/site-packages/torch/utils/_sympy/interp.pyÚhandlersrc   7   sh  € ð3Ü�‰�%ð3ä�	‰	�6ð3ô 	�‰�$ð3ô 	�‰�$ð	3ô
 	�‰�$ð3ô 	�‰�$ð3ô 	�‰�$ð3ô 	�‰�$ð3ô 	�	‰	�6ð3ô 	�Mð3ô 	�ið3ô 	�*ð3ô 	�*ð3ô 	�gð3ô 	ˆwð3ô  	�	‰	�5ð!3ô" 	�	‰	�5ñ#3ô$ 	�%ð%3ô& 	Ð&ð'3ô4 	�	‰	Ð#ð53ô6 	ˆUð73ô8 	�<ð93ô@ 	�	‰	�5ðA3ôB 	�	‰	�5ðC3ôD 	�	‰	�5ðE3ôF 	�	‰	�5ðG3ôH 	�	‰	�9ðI3ôJ 	�	‰	�9ðK3ôL 	ˆYðM3ôN 	ˆYðO3ôP 	Ð+ðQ3ôR 	�‰×"Ñ"×,Ñ,×9Ñ9Ð;KðS3ôT 	�‰˜ðU3ôV 	�*ñW3ôX 	*Ð+SÜ�oä˜FÜ˜}Ü˜lÜ˜}ñe3€Hól VˆØ)-”œ Ó%Ó&ñ Vð €Oó    >   r/   r0   r!   r"   r9   r8   c                 ó(  • [        U[        R                  5      (       aT  [        UR                  S   [        R                  R
                  R                  5      (       a  U R                  US   5      $ [        U[        5      (       a#  U R                  US   [        R                  5      $ [        S[        R                  S[        R                  S[        S[         S["        S0nUR%                  UR&                  5      =nb  [)        X5      " / UQUP76 $ UR&                  [        R*                  L aK  UR,                  (       a:  [/        U S5      (       a)  U R1                  U5      n[2        R5                  SX5        U$ [/        UR&                  S	5      (       a  UR&                  R6                  nO[9        5       UR&                     n[)        X5      n U[:        ;   ai  [=        U5      S::  a  [?        S
5      eU" US   US   5      n[A        S[=        U5      5       H  n	U" X�U	   5      nM     [2        R5                  SXQU5        U$ U" U6 n[2        R5                  SXQU5        U$ ! [B         a    e [D         a    [2        RG                  SXQ5        e f = f)Nr   r   Útrunc_to_intÚfloor_to_intÚceil_to_intÚround_to_intÚsym_sumzsym_sum(%s) -> %sÚ_torch_handler_namezassociative op needs >1 argsé   z%s(%s) -> %szfailed while executing %s(%s))$Ú
isinstancerM   rY   ÚargsÚcoreÚnumbersÚHalfÚsqrtr   Úto_dtypeÚtorchÚfloat64r   ÚfloorÚceilingr   r
   r   ÚgetÚfuncr_   rW   Ú
is_integerÚhasattrrj   r6   Údebugrk   rc   ÚASSOCIATIVE_OPSÚlenÚAssertionErrorÚrangeÚNotImplementedErrorÚ	ExceptionÚwarning)
Úanalysisrn   ÚexprÚindex_dtypeÚINDEX_DTYPE_HANDLERSÚhandler_nameÚrÚhandlerÚaccÚis
             rb   Ú_run_sympy_handlerr�   }   s  € ä�$œŸ	™	×"Ñ"¤zØ�	‰	�!‰”e—j‘j×(Ñ(×-Ñ-÷(ñ (ð �}‰}˜T !™WÓ%Ð%Ü�$œ× Ñ Ø× Ñ   a¡¬%¯-©-Ó8Ð8ô 	�NÜ�‰�^Ü�‰�}Ü�NÜ�=Ü�NðÐð -×0Ñ0°·±Ó;Ð;ˆÑHÜ�xÔ.ÐB°ÐB°kÒBÐBð ‡y�y”E—I‘IÒ $§/§/´g¸hÈ	×6RÑ6RØ×Ñ˜TÓ"ˆÜ�	‰	Ð% tÔ/Øˆäˆt�y‰yÐ/×0Ñ0Ø—y‘y×4Ñ4‰ä“z $§)¡)Ñ,ˆÜ�hÓ-€GðØœ?Ó*Ü�4‹y˜A‹~Ü$Ð%CÓDÐDÙ˜$˜q™' 4¨¡7Ó+ˆCÜ˜1œc $›iÖ(�Ù˜c¨¡7Ó+’ñ )ä�I‰I�n l¸#Ô>ØˆJá˜�ˆAÜ�I‰I�n l¸!Ô<ØˆHøÜó ØÜó Ü�‰Ð3°\ÔHØðús   ÇA2I% ÉI% É%,J©r†   Úmissing_handlerÚenvr…   c                óZ  • S n[        U[        5      (       a  [        R                  nO_[        U[        R
                  5      (       a  [        R                  nO/[        U[        R                  5      (       a  [        R                  nUb  U R                  X%5      $ [        U[        R                  5      (       a;  UR                  U[        5      =n[        La  U$ U(       a  U" U5      $ [        U5      e[        U UR                   Vs/ s H  n[!        U UUUUS9PM     snUUS9$ s  snf )NrŽ   )r†   )rm   r   rt   ÚboolrM   ÚIntegerÚint64ÚNumberÚdoubleÚconstantÚSymbolrx   Ú_nilÚKeyErrorr�   rn   Úsympy_interp)r„   r�   r…   r†   r�   Údtyper‰   Úargs           rb   r›   r›   º   s  € ð €EÜ�$œ×$Ñ$Ü—
‘
‰Ü	�Dœ%Ÿ-™-×	(Ñ	(Ü—‘‰Ü	�Dœ%Ÿ,™,×	'Ñ	'Ü—‘ˆàÑØ× Ñ  Ó-Ð-Ü	�Dœ%Ÿ,™,×	'Ñ	'Ø—‘˜œtÓ$Ð$ˆA¬TÒ1ØˆHÞÙ" 4Ó(Ð(ä˜4“.Ð ô Øð —y’yó		
ò !�ô ØØØØ'Ø /ôñ !ñ		
ð 	Øñð ùò		
s   Ä
D(
)3Ú__doc__Ú	functoolsÚloggingÚtypingr   rM   Úsympy.logic.boolalgr   ÚSympyBooleanr   rt   r[   r   r   r	   r
   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   Ú	getLoggerÚ__name__r6   Úcacherc   r}   r”   r�   Úobjectr™   Údictr˜   ÚExprr›   © rd   rb   Ú<module>r«      sÆ   ðñó Û Ý ã ß Dã ÷÷ ÷ ÷ ÷ ÷ õ ð: ×Ò˜Ó!€ð ‡�ñ?ó ð?òD F€ð :?¿¹ô 7ñt ƒx€ð —‘Øò*à	ˆe�l‰l˜CÐÑ	 ð*ð �*‰*�|Ñ
#ö*rd   