+
    ˜°³jU#  ã                   ó6  € ^ RI t ^ RIt^ RIHt ^ RIHtHt ^ RIt^ RI	H
t ^ RIt^ RIHt ^ RIHtHtHtHtHtHtHtHtHtHtHtHtHtHt ^ RIHt ]]]]]]]]3t ]]]]]3t!R.]'       d   R.M. ,           t" ! R	 R
]4      t#R t$R t%R t&R t'R t(RR lt)R t*R# )é    N)ÚSequence)ÚpartialÚwraps)Ú	TEST_CUDA)Ú_dispatch_dtypesÚ	all_typesÚall_types_andÚall_types_and_complexÚall_types_and_complex_andÚall_types_and_halfÚcomplex_typesÚfloating_and_complex_typesÚfloating_and_complex_types_andÚfloating_typesÚfloating_types_andÚfloating_types_and_halfÚintegral_typesÚintegral_types_and)Útorch_to_numpy_dtype_dictÚcpuÚcudac                   ó   € ] tR t^7tRtR# )Ú_dynamic_dispatch_dtypes© N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__static_attributes__r   ó    Úe/home/luca/screen-checking/.venv/lib/python3.14/site-packages/torch/testing/_internal/opinfo/utils.pyr   r   7   s   † ãr    r   c                 ó‚  € VR	9  d   \        RV: 24      h\        '       g+   VR8X  d$   \        P                  ! R^R7       \	        R
4      # \        4       p\        \        P                  \        P                  \        P                  4       F_  p V! WVR4      pRpT F.  p T ! TP                  .TP                  O5/ TP                  B  K0  	  T'       g   KN  TP                  T4       Ka  	  \	        V4      #   \         d#    \        P                  ! RT RT 2^R7        Kš  i ; i  \         d    Rp  Kk  i ; i)r   r   z-Expected device_type in ['cpu', 'cuda'], got zGWARNING: CUDA is not available, empty_dtypes dispatch will be returned!)Ú
stacklevelFz.WARNING: Unable to generate sample for device:z and dtype:T)r   r   r   )ÚAssertionErrorr   ÚwarningsÚwarnr   Úsetr   ÚtorchÚboolÚbfloat16ÚhalfÚRuntimeErrorÚinputÚargsÚkwargsÚadd)ÚopÚsample_inputs_fnÚdevice_typeÚsupported_dtypesÚdtypeÚsamplesÚ	supportedÚsamples   &&&     r!   Úget_supported_dtypesr9   <   s1  € à˜/Ô)ÜØ;¸K¹?ÐKó
ð 	
÷ ‹9˜¨Ô.Ü�ŠØUØõ	
ô (¨Ó+Ð+ä“uÐÜ*¬5¯:©:´u·~±~ÄuÇzÁzÖRˆð	Ù& r¸¸uÓEˆGð ˆ	ÛˆFðÙ�6—<‘<Ð? &§+¡+Ò?°·±Ô?ñ ÷ ‰9Ø× Ñ  Ö'ñ5 Sô8 $Ð$4Ó5Ð5øô3 ô 		ô
 �MŠMØ@ÀÀÈ[ÐY^ÐX_Ð`Øõò ð		ûô"  ô à!�	Ûðús$   Â
C<Â$*D,Ã<)D)Ä(D)Ä,D>Ä=D>c                 ó¸  € \         P                  ! R R4      p\        V 4      ^ 8X  d
   V! RR4      # \        V 4      p\         F3  p\        V! 4       4      V8X  g   K  V! W3P
                  R,           4      u # 	  RpRp\         FC  p\        V! 4       4      pVP                  V4      '       g   K,  \        V4      pWu8”  g   K?  TpTpKE  	  Vf   V! R\        V 4      4      # V! \        X.\        \        V 4      \        V! 4       4      ,
          4      O5!  VP
                  \        \        \        V 4      \        V! 4       4      ,
          4      4      ,           4      # )Úreturn_typezdispatch_fn dispatch_fn_strz()Ng        r   )ÚcollectionsÚ
namedtupleÚlenr'   ÚCOMPLETE_DTYPES_DISPATCHr   ÚEXTENSIBLE_DTYPE_DISPATCHÚissubsetÚstrr   Útuple)Údtypesr;   Ú
set_dtypesÚdispatchÚchosen_dispatchÚchosen_dispatch_scoreÚdispatch_dtypesÚscores   &       r!   Údtypes_dispatch_hintrK   i   s(  € ô ×(Ò(¨Ð8UÓV€Kô ˆ6ƒ{�aÔÙ˜2˜tÓ$Ð$ä�V“€Jß,ˆä‰x‹z‹?˜jÖ(Ù˜x×):Ñ):¸TÕ)AÓBÒBñ -ð
 €OØÐß-ˆÜ™h›j›/ˆØ×'Ñ'¨
×3Ò3Ùä�OÓ$ˆØÖ(Ø$)Ð!Ø&ŠOñ .ð ÒÙ˜2œs 6›{Ó+Ð+áÜ�Ð@œ5¤ V£¬s±8³:«Õ!>Ó?Ó@Ø×ÑœC¤¤c¨&£k´C¹»
³OÕ&CÓ DÓEÕEóð r    c                 ó   € V P                   # ©N)Údynamic_dtypes)r1   s   &r!   Úis_dynamic_dtype_setrO   �   s   € ð ×ÑÐr    c                 ó¦   € R V P                    R\        V P                  4      P                   R\        V P                  4      P                   R2pV# )z
        OpInfo(z,
               dtypes=z,
               dtypesIfCUDA=z,
        )
        )ÚnamerK   rD   Údispatch_fn_strÚdtypesIfCUDA)r1   Úfmt_strs   & r!   Ústr_format_dynamic_dtyperU   •   sY   € ðØ—‘ˆyð Ü+¨B¯I©IÓ6×FÑFÐGð HÜ1°"·/±/ÓB×RÑRÐSð T	ð€Gð €Nr    c                 ó:   a a€ R  o\        S 4      V V3R l4       pV# )c                 óÊ   € V \         P                  \        \         P                  \         P                  \         P
                  \         P                  \         P                  39   # rM   )ÚnpÚbool_r)   Úuint8Úint8Úint16Úint32Úint64)r5   s   &r!   Úis_integralÚ=np_unary_ufunc_integer_promotion_wrapper.<locals>.is_integral¬   sA   € ØÜ�H‰HÜÜ�H‰HÜ�G‰GÜ�H‰HÜ�H‰HÜ�H‰Hð
ñ 
ð 	
r    c                 ó²   <€ \         \        P                  ! 4       ,          pS! V P                  4      '       d   S! V P	                  V4      4      # S! V 4      # rM   )r   r(   Úget_default_dtyper5   Úastype)ÚxÚnp_dtypeÚfnr_   s   & €€r!   Ú
wrapped_fnÚ<np_unary_ufunc_integer_promotion_wrapper.<locals>.wrapped_fn·   sD   ø€ ô -¬U×-DÒ-DÓ-FÕGˆá�q—w‘w×ÒÙ�a—h‘h˜xÓ(Ó)Ð)Ù�!‹uˆr    ©r   )rf   rg   r_   s   f @r!   Ú(np_unary_ufunc_integer_promotion_wrapperrj       s(   ù€ ò	
ô ˆ2ƒYõó ðð Ðr    c                ó:   a a€ \        S 4      R V V3R ll4       pV# )a  Wraps a NumPy reduction operator.

The wrapper function will forward dim, keepdim, mask, and identity
kwargs to the wrapped function as the NumPy equivalent axis,
keepdims, where, and initial kwargs, respectively.

Args:
    f: NumPy reduction operator to wrap
    supports_keepdims (bool, optional): Whether the NumPy operator accepts
        keepdims parameter. If it does not, the wrapper will manually unsqueeze
        the reduced dimensions if it was called with keepdim=True. Defaults to True.

Returns:
    Wrapped function

c                ó8   € V ^8„  d   QhR\         P                  /# )é   rd   )ÚnptÚNDArray)Úformats   "r!   Ú__annotate__Ú/reference_reduction_numpy.<locals>.__annotate__×   s   € ÷ -ñ -”3—;‘;ñ -r    c                 ó  <€ \        VP                  4       4      pVP                  R R4      pVP                  RR4      pR V9   dF   \        V\        4      '       d   \        V4      MTpV P                  ^ 8X  d   VR9   d   RVR&   MWBR&   RV9   d   S
'       d   WRR&   RV9   dn   VP                  R4      pVeY   VP                  \        P                  8w  d   \        RVP                   24      hVP                  4       P                  4       VR&   R	V9   d…   VP                  R	4      pVep   VP                  \        P                  J d/   VP                  4       P                  \        P                   4      pMVP                  4       pVP                  4       VR
&   S	! V .VO5/ VB pV'       dT   S
'       gL   V P                  ^ 8”  d;   Vf   \#        \%        V P                  4      4      MTp\&        P(                  ! W„4      pV# )ÚdimNÚkeepdimFÚaxisÚkeepdimsÚmaskz+Expected mask.layout == torch.strided, got ÚwhereÚidentityÚinitial>   ©r   ©éÿÿÿÿr   r~   )r'   ÚkeysÚpopÚ
isinstancer   rC   ÚndimÚlayoutr(   Ústridedr$   r   Únumpyr5   r*   ÚtoÚfloat32ÚlistÚrangerX   Úexpand_dims)rd   r.   r/   r   rt   ru   rx   rz   ÚresultÚfÚsupports_keepdimss   &*,      €€r!   ÚwrapperÚ*reference_reduction_numpy.<locals>.wrapperÖ   sž  ø€ ô �6—;‘;“=Ó!ˆà�j‰j˜ Ó%ˆØ—*‘*˜Y¨Ó.ˆà�DŒ=Ü *¨3´× 9Ò 9”%˜”*¸sˆCð �v‰v˜Œ{˜sÐ&:Ô:Ø!%��v’à!$�v‘à˜Ô×!2Ø!(�:Ñà�TŒ>Ø—:‘:˜fÓ%ˆDØÒØ—;‘;¤%§-¡-Ô/Ü(ØEÀdÇkÁkÀ]ÐSóð ð #'§(¡(£*×"2Ñ"2Ó"4��w‘à˜ÔØ—z‘z *Ó-ˆHØÒ#Ø—>‘>¤U§^¡^Ó3Ø'Ÿ|™|›~×0Ñ0´·±Ó?‘Hà'Ÿ|™|›~�HØ$,§N¡NÓ$4��yÑ!á�1Ð&�tÒ&˜vÑ&ˆ÷ ×,°·±¸!´Ø),ª”$”u˜QŸV™V“}Ô%¸#ˆCÜ—^’^ FÓ0ˆFàˆr    ri   )rŒ   r�   rŽ   s   ff r!   Úreference_reduction_numpyr�   Ä   s(   ù€ ô$ ˆ1ƒX÷-ð -ó ð-ð^ €Nr    c                ó¬  € RV9  dª   \         P                  ! V P                  \         P                  4      '       d!   V P	                  \         P
                  4      p MT\         P                  ! V P                  \         P                  4      '       d    V P	                  \         P                  4      p \        \         P                  4      pV! V .VO5/ VB # )a9  
The function will call np.prod with type as np.int64 if the input type
is int or uint64 if it is uint. This is necessary because windows np.prod uses by default
int32 while on linux it uses int64.
This is for fixing integer overflow https://github.com/pytorch/pytorch/issues/77320

Returns:
    np.prod of input
r5   )
rX   Ú
issubdtyper5   Úsignedintegerrc   r^   ÚunsignedintegerÚuint64r�   Úprod)Úar.   r/   rf   s   &*, r!   Ú
prod_numpyr˜   	  s‰   € ð �fÔÜ�=Š=˜Ÿ™¤"×"2Ñ"2×3Ò3Ø—‘œŸ™Ó"‰AÜ�]Š]˜1Ÿ7™7¤B×$6Ñ$6×7Ò7Ø—‘œŸ™Ó#ˆAä	"¤2§7¡7Ó	+€BÙˆaÐ!�$Ò!˜&Ñ!Ð!r    )T)+r<   r%   Úcollections.abcr   Ú	functoolsr   r   r…   rX   Únumpy.typingÚtypingrn   r(   Ú#torch.testing._internal.common_cudar   Ú$torch.testing._internal.common_dtyper   r   r	   r
   r   r   r   r   r   r   r   r   r   r   Ú$torch.testing._internal.common_utilsr   r?   r@   ÚDEVICESr   r9   rK   rO   rU   rj   r�   r˜   r   r    r!   Ú<module>r¡      s½   ðó Û Ý $ß $ã Ý ã Ý 9÷÷ ÷ ÷ õ  Kð ØØØØØØØð	Ð ð ØØ"ØØðÐ ð ˆ'§�f‘X°Õ
3€ô	Ð/ô 	ò
*6òZ#òLòò!ôHBôJ"r    