+
    ‹°³jç  ã                   ó¦  € ^RI Ht ^ RIHt ^ RIHt ]P                  ! R4      tR R ltR R lt	R	 R
 lt
R R lt]P                  ]! . R3OR7      ]
! R4      R4R l4       4       4       t]P                  ]! RR.R7      ]	! R4      ]P                  R4R l4       4       4       4       t]P                  ]! RR.R7      ]	! R4      ]P                  R4R l4       4       4       4       t]P                  ]! RR.R7      ]	! R4      ]P                  R4R l4       4       4       4       t]P                  ]! RR.R7      ]	! R4      ]P                  R4R l4       4       4       4       t]P                  ]! RR.R7      ]	! R4      ]P                  R4R l4       4       4       4       t]P                  ]! RR.R7      ]	! R4      ]P                  R4R l4       4       4       4       t]P                  ]! RR.R7      ]	! R4      ]P                  R4R  l4       4       4       4       t]P                  ]! R.R7      ]	! R!4      ]P                  R4R" l4       4       4       4       t]P                  ]! RR.R7      ]	! R#4      ]P                  R4R$ l4       4       4       4       t]P                  ]P                  ]	! R%4      R4R& l4       4       4       t]P                  ]
! R'4      R5R( l4       4       t]P                  ]! R.R7      ]
! R)4      R4R* l4       4       4       t]P                  ]! RR.R7      ]	! R+4      ]P                  R4R, l4       4       4       4       t]P                  ]! RR.R7      ]	! R-4      ]P                  R4R. l4       4       4       4       t]P                  ]! RR.R7      ]	! R/4      ]P                  R4R0 l4       4       4       4       t]P                  ]! R14      R4R2 l4       4       tR# )6é   )Úcore©Úwraps)ÚListÚTc                óF   € V ^8„  d   QhR\         \        ,          R\        /# )é   ÚdtypesÚreturn)r   Ústrr   )Úformats   "ÚU/home/luca/screen-checking/.venv/lib/python3.14/site-packages/triton/language/math.pyÚ__annotate__r      s   € ÷ ñ œœc�ð ¤qñ ó    c                ó   a € V 3R lpV# )aT  
We're following libdevice's convention to check accepted data types for math functions.
It is not a good practice to support all data types as accelerators/GPUs don't support
many float16 and bfloat16 math operations.
We should let the users know that they are using and invoke explicit cast to convert
the data type to the supported one.
c                 ó4   <a € \        S 4      VV 3R  l4       pV# )c                  óŽ  <€ \        V 4      \        VP                  4       4      ,           pV Uu. uF'  p\        V\        P                  4      '       g   K%  VNK)  	  up FW  pVP
                  P                  P                  S9  g   K*  \        R S RVP
                  P                  P                   24      h	  S! V / VB # u upi )zExpected dtype z	 but got )	ÚlistÚvaluesÚ
isinstancer   ÚtensorÚtypeÚscalarÚnameÚ
ValueError)ÚargsÚkwargsÚall_argsÚaÚargr
   Úfns   *,   €€r   ÚcheckÚ,_check_dtype.<locals>.wrapper.<locals>.check   sœ   ø€ ô ˜D“z¤D¨¯©«Ó$9Õ9ˆHÙ#+ÓJ¡8˜a¬z¸!¼T¿[¹[×/IŸ˜¡8ÔJ�Ø—8‘8—?‘?×'Ñ'¨vÖ5Ü$ °v°h¸iÈÏÉÏÉ×H\ÑH\ÐG]Ð%^Ó_Ð_ñ Kñ �tÐ&˜vÑ&Ð&ùò Ks   ¯"CÁCr   )r!   r"   r
   s   f €r   ÚwrapperÚ_check_dtype.<locals>.wrapper   s    ù€ ä	ˆr‹õ	'ó 
ð	'ð ˆr   © )r
   r$   s   f r   Ú_check_dtyper'      s   ø€ õð €Nr   c                óh   € V ^8„  d   QhR\         R\        P                  \        .\        3,          /# ©r	   r   r   ©r   r   ÚCallabler   )r   s   "r   r   r   !   s)   € ÷ ñ ¤ð ¬¯©´q°c¼1°fÕ(=ñ r   c                 ó   a € R  V 3R llpV# )c                ó0   € V ^8„  d   QhR\         R\         /# ©r	   Úfuncr   ©r   )r   s   "r   r   Ú+_add_math_1arg_docstr.<locals>.__annotate__#   s   € ÷ ñ œð œqñ r   c                 ó:   <€ R pVP                  SR7      V n        V # )zk
    Computes the element-wise {name} of :code:`x`.

    :param x: the input values
    :type x: Block
    ©r   ©r   Ú__doc__©r/   Údocstrr   s   & €r   Ú
_decoratorÚ)_add_math_1arg_docstr.<locals>._decorator#   s#   ø€ ðˆð —}‘}¨$�}Ó/ˆŒØˆr   r&   ©r   r8   s   f r   Ú_add_math_1arg_docstrr;   !   s   ø€ ÷ð ð Ðr   c                óh   € V ^8„  d   QhR\         R\        P                  \        .\        3,          /# r)   r*   )r   s   "r   r   r   0   s)   € ÷ ñ ¤ð ¬¯©´q°c¼1°fÕ(=ñ r   c                 ó   a € R  V 3R llpV# )c                ó0   € V ^8„  d   QhR\         R\         /# r.   r0   )r   s   "r   r   Ú+_add_math_2arg_docstr.<locals>.__annotate__2   s   € ÷ 
ñ 
œð 
œqñ 
r   c                 ó:   <€ R pVP                  SR7      V n        V # )z«
    Computes the element-wise {name} of :code:`x` and :code:`y`.

    :param x: the input values
    :type x: Block
    :param y: the input values
    :type y: Block
    r3   r4   r6   s   & €r   r8   Ú)_add_math_2arg_docstr.<locals>._decorator2   s#   ø€ ðˆð —}‘}¨$�}Ó/ˆŒØˆr   r&   r:   s   f r   Ú_add_math_2arg_docstrrB   0   s   ø€ ÷
ð 
ð Ðr   c                óh   € V ^8„  d   QhR\         R\        P                  \        .\        3,          /# r)   r*   )r   s   "r   r   r   A   s)   € ÷ ñ ¤ð ¬¯©´q°c¼1°fÕ(=ñ r   c                 ó   a € R  V 3R llpV# )c                ó0   € V ^8„  d   QhR\         R\         /# r.   r0   )r   s   "r   r   Ú+_add_math_3arg_docstr.<locals>.__annotate__C   s   € ÷ ñ œð œqñ r   c                 ó:   <€ R pVP                  SR7      V n        V # )zé
    Computes the element-wise {name} of :code:`x`, :code:`y`, and :code:`z`.

    :param x: the input values
    :type x: Block
    :param y: the input values
    :type y: Block
    :param z: the input values
    :type z: Block
    r3   r4   r6   s   & €r   r8   Ú)_add_math_3arg_docstr.<locals>._decoratorC   s#   ø€ ð	ˆð —}‘}¨$�}Ó/ˆŒØˆr   r&   r:   s   f r   Ú_add_math_3arg_docstrrI   A   s   ø€ ÷ð ð Ðr   )r
   z-most significant N bits of the 2N-bit productNc                 ó  € VP                  V 4      p VP                  V4      p\        P                  ! WV4      w  r\        P                  ! VP                  P                  V P                  VP                  4      V P                  4      # ©N)Ú	to_tensorr   Úbinary_op_type_legalizationr   ÚbuilderÚcreate_umulhiÚhandler   ©ÚxÚyÚ	_semantics   &&&r   ÚumulhirU   T   sh   € ð 	×Ñ˜AÓ€AØ×Ñ˜AÓ€AÜ×+Ò+¨A°)Ó<�D€AÜ�;Š;�y×(Ñ(×6Ñ6°q·x±xÀÇÁÓJÈAÏFÉFÓSÐSr   Úfp32Úfp64Úexponentialc                 ó¬   € VP                  V 4      p \        P                  ! VP                  P	                  V P
                  4      V P                  4      # rK   )rL   r   r   rN   Ú
create_exprP   r   ©rR   rT   s   &&r   Úexpr\   ^   ó>   € ð
 	×Ñ˜AÓ€AÜ�;Š;�y×(Ñ(×3Ñ3°A·H±HÓ=¸q¿v¹vÓFÐFr   zexponential (base 2)c                 ó¬   € VP                  V 4      p \        P                  ! VP                  P	                  V P
                  4      V P                  4      # rK   )rL   r   r   rN   Úcreate_exp2rP   r   r[   s   &&r   Úexp2r`   g   ó>   € ð
 	×Ñ˜AÓ€AÜ�;Š;�y×(Ñ(×4Ñ4°Q·X±XÓ>ÀÇÁÓGÐGr   znatural logarithmc                 ó¬   € VP                  V 4      p \        P                  ! VP                  P	                  V P
                  4      V P                  4      # rK   )rL   r   r   rN   Ú
create_logrP   r   r[   s   &&r   Úlogrd   p   r]   r   zlogarithm (base 2)c                 ó¬   € VP                  V 4      p \        P                  ! VP                  P	                  V P
                  4      V P                  4      # rK   )rL   r   r   rN   Úcreate_log2rP   r   r[   s   &&r   Úlog2rg   y   ra   r   Úcosinec                 ó¬   € VP                  V 4      p \        P                  ! VP                  P	                  V P
                  4      V P                  4      # rK   )rL   r   r   rN   Ú
create_cosrP   r   r[   s   &&r   Úcosrk   ‚   r]   r   Úsinec                 ó¬   € VP                  V 4      p \        P                  ! VP                  P	                  V P
                  4      V P                  4      # rK   )rL   r   r   rN   Ú
create_sinrP   r   r[   s   &&r   Úsinro   ‹   r]   r   zfast square rootc                 ó¬   € VP                  V 4      p \        P                  ! VP                  P	                  V P
                  4      V P                  4      # rK   )rL   r   r   rN   Úcreate_sqrtrP   r   r[   s   &&r   Úsqrtrr   ”   ra   r   z?precise square root (rounding to nearest wrt the IEEE standard)c                 ó¬   € VP                  V 4      p \        P                  ! VP                  P	                  V P
                  4      V P                  4      # rK   )rL   r   r   rN   Úcreate_precise_sqrtrP   r   r[   s   &&r   Úsqrt_rnru   �   s>   € ð
 	×Ñ˜AÓ€AÜ�;Š;�y×(Ñ(×<Ñ<¸Q¿X¹XÓFÈÏÉÓOÐOr   zinverse square rootc                 ó¬   € VP                  V 4      p \        P                  ! VP                  P	                  V P
                  4      V P                  4      # rK   )rL   r   r   rN   Úcreate_rsqrtrP   r   r[   s   &&r   Úrsqrtrx   ¦   ó>   € ð
 	×Ñ˜AÓ€AÜ�;Š;�y×(Ñ(×5Ñ5°a·h±hÓ?ÀÇÁÓHÐHr   zabsolute valuec                 ó  € VP                  V 4      p V P                  pVP                  4       '       d‚   \        P                  ! V P
                  ^\        P                  VR7      p\        P                  ! VP                  P                  V P                  VP                  4      V P                  4      # VP                  4       '       dE   \        P                  ! VP                  P                  V P                  4      V P                  4      # VP                  4       '       dE   \        P                  ! VP                  P                  V P                  4      V P                  4      # VP!                  4       '       d   V # Q RT 24       h)é   )rT   zUnexpected dtype )rL   ÚdtypeÚis_fp8e4b15r   ÚfullÚshapeÚint8r   rN   Ú
create_andrP   r   Úis_floatingÚcreate_fabsÚis_int_signedÚcreate_iabsÚis_int_unsigned)rR   rT   r|   Úmasks   &&  r   Úabsrˆ   ¯   s  € ð 	×Ñ˜AÓ€AØ�G‰G€EØ×Ñ×ÒÜ�yŠy˜Ÿ™ $¬¯	©	¸YÔGˆÜ�{Š{˜9×,Ñ,×7Ñ7¸¿¹À$Ç+Á+ÓNÐPQ×PVÑPVÓWÐWØ	×	Ñ	×	Ò	Ü�{Š{˜9×,Ñ,×8Ñ8¸¿¹ÓBÀAÇFÁFÓKÐKØ	×	Ñ	×	Ò	Ü�{Š{˜9×,Ñ,×8Ñ8¸¿¹ÓBÀAÇFÁFÓKÐKØ	×	Ñ	×	 Ò	 Øˆà1Ð)¨%¨Ð1Ó1ˆur   zfast divisionc                 ó–   € \         P                  ! V4      pVP                  V 4      p VP                  V4      pVP                  WV4      # rK   )r   Ú_unwrap_if_constexprrL   Úfdiv)rR   rS   Úieee_roundingrT   s   &&&&r   r‹   r‹   Â   sE   € ô ×-Ò-¨mÓ<€MØ×Ñ˜AÓ€AØ×Ñ˜AÓ€AØ�>‰>˜! Ó.Ð.r   z<precise division (rounding to nearest wrt the IEEE standard)c                 ó  € VP                  V 4      p VP                  V4      p\        P                  ! WV4      w  r\        P                  ! VP                  P                  V P                  VP                  4      V P                  4      # rK   )rL   r   rM   r   rN   Úcreate_precise_divfrP   r   rQ   s   &&&r   Údiv_rnr�   Ë   sk   € ð 	×Ñ˜AÓ€AØ×Ñ˜AÓ€AÜ×+Ò+¨A°)Ó<�D€AÜ�;Š;�y×(Ñ(×<Ñ<¸Q¿X¹XÀqÇxÁxÓPÐRS×RXÑRXÓYÐYr   zerror functionc                 ó¬   € VP                  V 4      p \        P                  ! VP                  P	                  V P
                  4      V P                  4      # rK   )rL   r   r   rN   Ú
create_erfrP   r   r[   s   &&r   Úerfr’   Õ   r]   r   Úfloorc                 ó¬   € VP                  V 4      p \        P                  ! VP                  P	                  V P
                  4      V P                  4      # rK   )rL   r   r   rN   Úcreate_floorrP   r   r[   s   &&r   r“   r“   Þ   ry   r   Úceilc                 ó¬   € VP                  V 4      p \        P                  ! VP                  P	                  V P
                  4      V P                  4      # rK   )rL   r   r   rN   Úcreate_ceilrP   r   r[   s   &&r   r–   r–   ç   ra   r   zfused multiply-addc                 ó²  € VP                  V 4      p VP                  V4      pVP                  V4      p\        P                  ! WV4      w  r\        P                  ! W V4      w  r \        P                  ! W!V4      w  r!\        P                  ! VP                  P                  V P                  VP                  VP                  4      V P                  4      # rK   )rL   r   rM   r   rN   Ú
create_fmarP   r   )rR   rS   ÚzrT   s   &&&&r   Úfmarœ   ð   s©   € ð 	×Ñ˜AÓ€AØ×Ñ˜AÓ€AØ×Ñ˜AÓ€AÜ×+Ò+¨A°)Ó<�D€AÜ×+Ò+¨A°)Ó<�D€AÜ×+Ò+¨A°)Ó<�D€AÜ�;Š;�y×(Ñ(×3Ñ3°A·H±H¸a¿h¹hÈÏÉÓQÐST×SYÑSYÓZÐZr   )Úint32Úint64Úuint32Úuint64rK   )FN)Ú r   Ú	functoolsr   Útypingr   ÚTypeVarr   r'   r;   rB   rI   ÚbuiltinrU   Ú_tensor_member_fnr\   r`   rd   rg   rk   ro   rr   ru   rx   rˆ   r‹   r�   r’   r“   r–   rœ   r&   r   r   Ú<module>r§      sy  ðÝ Ý Ý à‡L‚L�Ó€õõ2õõ"ð& ‡�ÙÒ;Ô<ÙÐFÓGóTó Hó =ó ðTð ‡�Ù�f˜fÐ%Ô&Ù�}Ó%Ø×ÑóGó ó &ó 'ó ðGð
 ‡�Ù�f˜fÐ%Ô&ÙÐ-Ó.Ø×ÑóHó ó /ó 'ó ðHð
 ‡�Ù�f˜fÐ%Ô&ÙÐ*Ó+Ø×ÑóGó ó ,ó 'ó ðGð
 ‡�Ù�f˜fÐ%Ô&ÙÐ+Ó,Ø×ÑóHó ó -ó 'ó ðHð
 ‡�Ù�f˜fÐ%Ô&Ù�xÓ Ø×ÑóGó ó !ó 'ó ðGð
 ‡�Ù�f˜fÐ%Ô&Ù�vÓØ×ÑóGó ó ó 'ó ðGð
 ‡�Ù�f˜fÐ%Ô&ÙÐ)Ó*Ø×ÑóHó ó +ó 'ó ðHð
 ‡�Ù�f�XÔÙÐXÓYØ×ÑóPó ó Zó ó ðPð
 ‡�Ù�f˜fÐ%Ô&ÙÐ,Ó-Ø×ÑóIó ó .ó 'ó ðIð
 ×ÑØ‡�ÙÐ'Ó(ó2ó )ó ó ð2ð  ‡�Ù�Ó'ó/ó (ó ð/ð ‡�Ù�f�XÔÙÐUÓVóZó Wó ó ðZð ‡�Ù�f˜fÐ%Ô&ÙÐ'Ó(Ø×ÑóGó ó )ó 'ó ðGð
 ‡�Ù�f˜fÐ%Ô&Ù�wÓØ×ÑóIó ó  ó 'ó ðIð
 ‡�Ù�f˜fÐ%Ô&Ù�vÓØ×ÑóHó ó ó 'ó ðHð
 ‡�ÙÐ+Ó,ó[ó -ó ò[r   