+
    :i                         ^ RI Ht ^ RIHtHt ^ RIHtHt ^ RIH	t	H
t
 ^ RIHtHtHtHtHtHtHtHtHt ^ RIHt ^ RIt^ RIHtHtHt ^ RIt] ! R	 R
4      4       t]! R4       ! R R]4      4       t] R8X  d   ]PB                  ! 4        R# R# )    )List)	dataclassfield)cudafloat32)compile_ptx_for_current_devicecompile_ptx)	cossintanexploglog10log2powtanh)truedivN)CUDATestCaseskip_on_cudasimskip_unless_cc_75c                      a  ] tR t^t o ]! ]R7      t]! ]R7      t]! ]R7      t]! ]R7      t	V 3R lR lt
V 3R ltRtV tR# )FastMathCriterion)default_factoryc                ,   < V ^8  d   QhRS[ RS[RS[/# )   testfastprec)r   str)format__classdict__s   "c/var/www/html/photoedit/myenv/lib/python3.14/site-packages/numba/cuda/tests/cudapy/test_fastmath.py__annotate__FastMathCriterion.__annotate__   s'     J J, Jc J J    c                
  aa TP                  \        ;QJ d)    V3R  lV P                   4       F  '       d   K   RM	  RM! V3R  lV P                   4       4      4       TP                  \        ;QJ d)    V3R lV P                   4       F  '       d   K   RM	  RM! V3R lV P                   4       4      4       TP                  \        ;QJ d)    V3R lV P                   4       F  '       d   K   RM	  RM! V3R lV P                   4       4      4       TP                  \        ;QJ d5    V3R lV P
                   4       F  '       d   K   R4       R# 	  R4       R# ! V3R lV P
                   4       4      4       R# )c              3   ,   <"   T F	  qS9   x  K  	  R # 5iN .0ir   s   & r"   	<genexpr>*FastMathCriterion.check.<locals>.<genexpr>        B/A!I/A   FTc              3   ,   <"   T F	  qS9  x  K  	  R # 5ir(   r)   r*   s   & r"   r-   r.           H3GaTM3Gr0   c              3   ,   <"   T F	  qS9   x  K  	  R # 5ir(   r)   r+   r,   r   s   & r"   r-   r.      r/   r0   c              3   ,   <"   T F	  qS9  x  K  	  R # 5ir(   r)   r4   s   & r"   r-   r.      r2   r0   N)
assertTrueallfast_expectedfast_unexpectedprec_expectedprec_unexpected)selfr   r   r   s   &&ffr"   checkFastMathCriterion.check   s    Bt/A/ABBt/A/ABBCH43G3GHH43G3GHHIBt/A/ABBt/A/ABBCH43G3GHIIH43G3GHHIr%   c                   < V ^8  d   Qh/ S[ S[,          ;R&   S[ S[,          ;R&   S[ S[,          ;R&   S[ S[,          ;R&   # )r   r8   r9   r:   r;   )r   r   )r    r!   s   "r"   r#   r$      sG     9:  #Y<  9:	 
 #Y< r%   r)   N)__name__
__module____qualname____firstlineno__r   listr8   r9   r:   r;   r=   __annotate_func____static_attributes____classdictcell__r!   s   @r"   r   r      s@     $T:M!&t!<O$T:M!&t!<OJ J  r%   r   z4Fastmath and PTX inspection not available on cudasimc                      a  ] tR t^t o R tV 3R lR ltV 3R lR ltR tR tR t	]
R	 4       tR
 tR tR tR tR tR tR tR t]P*                  R 4       tRtV tR# )TestFastMathOptionc                >   \         P                  ! W#R R7      ! V4      p\         P                  ! W#R7      ! V4      pVP                  WP                  V4      VP                  V4      4       \	        WVR R7      w  rx\	        WVR7      w  rVP                  WV	4       R# )T)devicefastmathrL   N)r   jitr=   inspect_asmr   )
r<   pyfuncsigrL   	criterionfastverprecverfastptx_precptxs
   &&&&&     r"   _test_fast_math_common)TestFastMathOption._test_fast_math_common   s     ((3=fE((3.v6%%c*G,?,?,D	

 4

 4

 	w/r%   c                    < V ^8  d   QhRS[ /# r   rS   r   )r    r!   s   "r"   r#   TestFastMathOption.__annotate__1   s     
 
3D 
r%   c                   a V3R  lpV3R lpV P                  V\        R,          \        3RVR7       V P                  V\        3RVR7       R# )c                    < S! V4      V ^ &   R# r   Nr)   )rxops   &&r"   kernel8TestFastMathOption._test_fast_math_unary.<locals>.kernel2   s    a5AaDr%   c                    < S! V 4      # r(   r)   )rc   rd   s   &r"   device_functionATestFastMathOption._test_fast_math_unary.<locals>.device_function5   s    a5Lr%   NN   FrL   rS   TNrY   r   )r<   rd   rS   re   rh   s   &f&  r"   _test_fast_math_unary(TestFastMathOption._test_fast_math_unary1   sT    		 	##WS\7+EY 	$ 	
 	##gZ	 	$ 	
r%   c                    < V ^8  d   QhRS[ /# r\   r]   )r    r!   s   "r"   r#   r^   ?   s     
 
4E 
r%   c                   a V3R  lpV3R lpV P                  V\        R,          \        \        3RVR7       V P                  V\        \        3RVR7       R# )c                    < S! W4      V ^ &   R# ra   r)   )rb   rc   yrd   s   &&&r"   re   9TestFastMathOption._test_fast_math_binary.<locals>.kernel@   s    a8AaDr%   c                    < S! W4      # r(   r)   )rc   rs   rd   s   &&r"   rL   9TestFastMathOption._test_fast_math_binary.<locals>.deviceC   s    a8Or%   rj   Frl   TNrm   )r<   rd   rS   re   rL   s   &f&  r"   _test_fast_math_binary)TestFastMathOption._test_fast_math_binary?   sZ    		 	##S\7G,Ui 	$ 	
 	##Wg&ty 	$ 	
r%   c                L    V P                  \        \        R .R .R7      4       R# )cos.approx.ftz.f32 r8   r;   N)rn   r
   r   r<   s   &r"   	test_cosfTestFastMathOption.test_cosfN   '    ""45!6 7	
r%   c                L    V P                  \        \        R .R .R7      4       R# )sin.approx.ftz.f32 r{   N)rn   r   r   r|   s   &r"   	test_sinfTestFastMathOption.test_sinfW   r   r%   c                N    V P                  \        \        . ROR .R7      4       R# )r   r{   N)r   rz   div.approx.ftz.f32 )rn   r   r   r|   s   &r"   	test_tanfTestFastMathOption.test_tanf`   s(    "" - !66	8	
r%   c                L    V P                  \        \        R .R .R7      4       R# )tanh.approx.f32 r{   N)rn   r   r   r|   s   &r"   
test_tanhfTestFastMathOption.test_tanhfj   s)     	""12!3 4	
r%   c                |   a a R  oV V3R lpV! R\        R.R.R7      R7       V! R	\        RR.R.R7      R7       R# )
c                 "    \        V4      V ^ &   R# ra   )r   )rb   rc   s   &&r"   tanh_kernel>TestFastMathOption.test_tanhf_compile_ptx.<locals>.tanh_kernelv   s    7AaDr%   c                    < \        S\        R ,          \        3RV R7      w  r#\        S\        R ,          \        3V R7      w  rCVP                  SW$4       R# )rj   T)rM   cc)r   N)r	   r   r=   )r   rS   rV   rW   rX   r<   r   s   &&   r"   tanh_common_testCTestFastMathOption.test_tanhf_compile_ptx.<locals>.tanh_common_testy   sK    $[73<2I.2r;JG$[73<2I(*,JGOOD'3r%   r   r{   )r   rS   zex2.approx.ftz.f32 zrcp.approx.ftz.f32 N)      )r   r   r]   )r<   r   r   s   f @r"   test_tanhf_compile_ptx)TestFastMathOption.test_tanhf_compile_ptxu   sR    		4 	F.?-./0/
 	
 	F#4002/0$2	3r%   c                L    V P                  \        \        R .R .R7      4       R# )zfma.rn.f32 )r9   r:   N)rn   r   r   r|   s   &r"   	test_expfTestFastMathOption.test_expf   s%    ""!.,o	
r%   c                N    V P                  \        \        R R.R .R7      4       R# )lg2.approx.ftz.f32 
0f3F317218r{   N)rn   r   r   r|   s   &r"   	test_logfTestFastMathOption.test_logf   s)    """4lC!6 7	
r%   c                N    V P                  \        \        R R.R .R7      4       R# )r   
0f3E9A209Br{   N)rn   r   r   r|   s   &r"   test_log10fTestFastMathOption.test_log10f   s)    ""$4lC!6 7	
r%   c                L    V P                  \        \        R .R .R7      4       R# r   r{   N)rn   r   r   r|   s   &r"   
test_log2fTestFastMathOption.test_log2f   s'    ""#45!6 7	
r%   c                L    V P                  \        \        R .R .R7      4       R# r   )rw   r   r   r|   s   &r"   	test_powfTestFastMathOption.test_powf   s'    ##"45!6 7	
r%   c           
     T    V P                  \        \        R .R.R.R .R7      4       R# )r   
div.rn.f32)r8   r9   r:   r;   N)rw   r   r   r|   s   &r"   	test_divfTestFastMathOption.test_divf   s1    ##&45!-+n!6 7		
r%   c                .   V P                  R 4       R p\        R,          \        \        3p\        P                  ! VRRR7      ! V4      p\        P                  ! VRR7      ! V4      p^
p\        P
                  ! V\        P                  R7      pV P                  \        4      ;_uu_ 4        V^V3,          ! VRR4       R	R	R	4        V^V3,          ! VRR4       R	#   + '       g   i     L&; i  \         d    T P                  R
4        R	# i ; i)z!Exceptions not supported with LTOc                     W,          V ^ &   R# ra   r)   )rb   rc   rs   s   &&&r"   f103TestFastMathOption.test_divf_exception.<locals>.f10   s    5AaDr%   rj   T)rM   debug)r   )dtypeg      $@g        Nz5Divide in fastmath should not throw ZeroDivisionError)	skip_if_ltor   r   rO   npemptyassertRaisesZeroDivisionErrorfail)r<   r   rR   rT   rU   nelemarys   &      r"   test_divf_exception&TestFastMathOption.test_divf_exception   s     	<=	 s|Wg.((3T:3?((3d+C0hhuBJJ/011AuHc4- 2	OAuHc4-	 21
 ! 	OIIMN	Os   /C!C4 !C1	4DDc                  a \         P                  ! R RR7      R 4       oV3R lp\        R,          \        3p\         P                  ! VRR7      ! V4      p\         P                  ! V4      ! V4      pV P                  RVP	                  V4      4       V P                  RVP	                  V4      4       V P                  RVP	                  V4      4       V P                  R	VP	                  V4      4       R
# )zfloat32(float32, float32)TrN   c                     W,          # r(   r)   )abs   &&r"   foo@TestFastMathOption.test_device_fastmath_propagation.<locals>.foo   s	    5Lr%   c                 l   < \         P                  ! ^4      pW P                  8  d   S! W!4      W&   R# R# )rk   N)r   gridsize)arrvalr,   r   s   && r"   bar@TestFastMathOption.test_device_fastmath_propagation.<locals>.bar   s)    		!A88|Q r%   rj   )rM   zdiv.approx.f32r   zdiv.full.f32N)r   rO   r   assertInrP   assertNotIn)r<   r   rR   rT   rU   r   s   &    @r"    test_device_fastmath_propagation3TestFastMathOption.test_device_fastmath_propagation   s    
 
-d	;	 
<		%
 s|W%((3.s3((3-$ 	&(;(;C(@A 	lG$7$7$<=)7+>+>s+CD)<)<S)ABr%   r)   N)r@   rA   rB   rC   rY   rn   rw   r}   r   r   r   r   r   r   r   r   r   r   r   r   unittestexpectedFailurer   rF   rG   rH   s   @r"   rJ   rJ      s     0(
 

 



 
 
3,





O* C Cr%   rJ   __main__)"typingr   dataclassesr   r   numbar   r   numba.cuda.compilerr   r	   mathr
   r   r   r   r   r   r   r   r   operatorr   numpyr   numba.cuda.testingr   r   r   r   r   rJ   r@   mainr)   r%   r"   <module>r      s     (  K @ @ @  3 3  
J 
J 
J GHTC TC ITCn zMMO r%   