+
    :iE*                     T   ^ RI Ht ^ RIHtHtHtHtHtHtH	t	 ^ RI
HtHtHtHt ^ RIHt ^ RIHtHtHt R t]! R4       ! R R	]P,                  4      4       t]! R4       ! R
 R]4      4       t]! R4       ! R R]P,                  4      4       t]R8X  d   ]P6                  ! 4        R# R# )    sqrt)cudafloat32int16int32int64uint32void)compilecompile_for_current_devicecompile_ptxcompile_ptx_for_current_device)runtime)skip_on_cudasimunittestCUDATestCasec                     W,           # N xys   &&c/var/www/html/photoedit/myenv/lib/python3.14/site-packages/numba/cuda/tests/cudapy/test_compiler.pyf_moduler      s	    5L    z(Compilation unsupported in the simulatorc                      a  ] tR t^t o R tR tR tR tR tR t	R t
R tR	 tR
 tR tR tR tR tR tR tR tR tRtV tR# )TestCompilec                
   R  p\         R,          \         R,          \         R,          3p\        W4      w  r4V P                  RV4       V P                  RV4       V P                  RV4       V P	                  V\
        4       R# )c                     \         P                  ! ^4      pV\        V 4      8  d   W,          W#,          ,           W&   R# R# )   N)r   gridlen)rr   r   is   &&& r   f)TestCompile.test_global_kernel.<locals>.f   s.    		!A3q6ztad{ r   :NNNfunc_retval.visible .func.visible .entryN)r   r   assertNotInassertInassertEqualr   selfr&   argsptxrestys   &    r   test_global_kernelTestCompile.test_global_kernel   so    	#
 
GAJ
3 )
 	,)3/'-%r   c                   R  p\         \         3p\        WRR7      w  r4V P                  RV4       V P                  RV4       V P                  RV4       V P	                  V\         4       \        \
        \
        4      p\        WRR7      w  r4V P	                  V\
        4       \        \        \        4      p\        WRR7      w  r4V P	                  V\        4       Rp\        WRR7      w  r4V P	                  V\        4       R# )c                     W,           # r   r   r   s   &&r   add-TestCompile.test_device_function.<locals>.add$   	    5Lr   Tdevicer(   r)   r*   zuint32(uint32, uint32)N)r   r   r,   r+   r-   r   r   r
   )r/   r7   r0   r1   r2   	sig_int32	sig_int16
sig_strings   &       r   test_device_function TestCompile.test_device_function#   s    	 ! 48
 	mS)&,*C0( %'	 =
&%'	 =
&-
 >
'r   c                N   R  p\         \         \         \         3p\        WRR7      w  r4V P                  RV4       V P                  RV4       V P                  RV4       \        WRRR7      w  r4V P                  RV4       V P                  RV4       V P                  R	V4       R
# )c                 @    \        W,          V,           V,          4      # r   r   )r   r   zds   &&&&r   r&   $TestCompile.test_fastmath.<locals>.fB   s    a((r   Tr:   z
fma.rn.f32z
div.rn.f32zsqrt.rn.f32)r;   fastmathzfma.rn.ftz.f32zdiv.approx.ftz.f32zsqrt.approx.ftz.f32N)r   r   r,   r.   s   &    r   test_fastmathTestCompile.test_fastmathA   s    	) '73 6
 	lC(lC(mS) E
 	&,*C0+S1r   c                N    V P                  VR 4       V P                  VR4       R# )z\.section\s+\.debug_info\.file.*test_compiler.py"NassertRegexr/   r1   s   &&r   check_debug_infoTestCompile.check_debug_infoU   s(     	;< 	:;r   c                P    R  p\        VRRRR7      w  r#V P                  V4       R# )c                      R # r   r   r   r   r   r&   6TestCompile.test_device_function_with_debug.<locals>.fe       r   T)r;   debugNr   r   rN   r/   r&   r1   r2   s   &   r   test_device_function_with_debug+TestCompile.test_device_function_with_debug^   s)    	 !Bt4@
c"r   c                N    R  p\        VRRR7      w  r#V P                  V4       R# )c                      R # r   r   r   r   r   r&   -TestCompile.test_kernel_with_debug.<locals>.fm   rS   r   T)rT   Nr   rU   rV   s   &   r   test_kernel_with_debug"TestCompile.test_kernel_with_debugk   s'    	 !Bd3
c"r   c                *    V P                  VR 4       R# )rJ   NrK   rM   s   &&r   check_line_infoTestCompile.check_line_infos   s     	:;r   c                P    R  p\        VRRRR7      w  r#V P                  V4       R# )c                      R # r   r   r   r   r   r&   :TestCompile.test_device_function_with_line_info.<locals>.fz   rS   r   T)r;   lineinfoNr   r   r_   rV   s   &   r   #test_device_function_with_line_info/TestCompile.test_device_function_with_line_infoy   s)    	 !BtdC
S!r   c                N    R  p\        VRRR7      w  r#V P                  V4       R# )c                      R # r   r   r   r   r   r&   1TestCompile.test_kernel_with_line_info.<locals>.f   rS   r   T)rd   Nr   re   rV   s   &   r   test_kernel_with_line_info&TestCompile.test_kernel_with_line_info   s'    	 !B6
S!r   c                    R  pV P                  \        R4      ;_uu_ 4        \        V\        R,          \        R,          34       RRR4       R#   + '       g   i     R# ; i)c                 0    V ^ ,          V^ ,          ,           # )r   r   r   s   &&r   r&   0TestCompile.test_non_void_return_type.<locals>.f   s    Q4!A$;r   zmust have void return type:NNr!   N)assertRaisesRegex	TypeErrorr   r
   r/   r&   s   & r   test_non_void_return_type%TestCompile.test_non_void_return_type   sD    	 ##I/KLLF3K56 MLLLs   %AA"	c                    R  pV P                  \        R4      ;_uu_ 4        \        V\        \        3RR7       RRR4       R#   + '       g   i     R# ; i)c                     W,           # r   r   r   s   &&r   r&   7TestCompile.test_c_abi_disallowed_for_kernel.<locals>.f   r9   r   z&The C ABI is not supported for kernelscabiNrp   NotImplementedErrorr   r   rr   s   & r    test_c_abi_disallowed_for_kernel,TestCompile.test_c_abi_disallowed_for_kernel   sM    	 ##$7$LN NE5>s3N N N N   AA	c                    R  pV P                  \        R4      ;_uu_ 4        \        V\        \        3RR7       RRR4       R#   + '       g   i     R# ; i)c                     W,           # r   r   r   s   &&r   r&   +TestCompile.test_unsupported_abi.<locals>.f   r9   r   zUnsupported ABI: fastcallfastcallry   Nr{   rr   s   & r   test_unsupported_abi TestCompile.test_unsupported_abi   sM    	 ##$7$?A AE5>z:A A A Ar   c                   R  p\        V\        \        \        4      RRR7      w  r#V P                  VR4       V P                  VR4       \        V\	        \        \        4      RRR7      w  r#V P                  VR4       R# )c                     W,           # r   r   r   s   &&r   r&   1TestCompile.test_c_abi_device_function.<locals>.f   r9   r   Trx   r;   rz   param_2z=\.visible\s+\.func\s+\(\.param\s+\.b32\s+func_retval0\)\s+f\(z&\.visible\s+\.func\s+\(\.param\s+\.b64N)r   r   r+   rL   r	   rV   s   &   r   test_c_abi_device_function&TestCompile.test_c_abi_device_function   su    	 !E%$7#N
i(
 	 6 	7
 !E%$7#N
GHr   c                x    \        \        \        \        \        4      R RR7      w  rV P                  VR4       R# )Trx   r   D\.visible\s+\.func\s+\(\.param\s+\.b32\s+func_retval0\)\s+f_module\(Nr   r   r   rL   r/   r1   r2   s   &  r   'test_c_abi_device_function_module_scope3TestCompile.test_c_abi_device_function_module_scope   s5     5+>t%(*

 	 = 	>r   c                    R R/p\        \        \        \        \        4      RRVR7      w  r#V P                  VR4       R# )abi_name	_Z4funciiTrx   )r;   rz   abi_infozE\.visible\s+\.func\s+\(\.param\s+\.b32\s+func_retval0\)\s+_Z4funcii\(Nr   )r/   r   r1   r2   s   &   r   test_c_abi_with_abi_name$TestCompile.test_c_abi_with_abi_name   sA    , 5+>t%(8=

 	 > 	?r   c                v    \        \        \        \        \        4      R R7      w  rV P                  VR4       R# )Tr:   r   N)r   r   r   rL   r   s   &  r   test_compile_defaults_to_c_abi*TestCompile.test_compile_defaults_to_c_abi   s0    XuUE':4H
 	 = 	>r   c                8   \         P                  ! 4       R
8  d   V P                  R4       \        \        \        \
        \
        4      RRR7      w  rRp\        P                  VR,          RR7      pV P                  WC4       V P                  V\
        4       R	# )   z,-gen-lto unavailable in this toolkit versionTltoirr;   outputiCN:N   Nlittle)	byteorderN)r      )	r   get_versionskipTestr   r   r   int
from_bytesr-   )r/   r   r2   LTOIR_MAGICheaders   &    r   test_compile_to_ltoir!TestCompile.test_compile_to_ltoir   sw     7*MMHIxue)<T&-/ !b	X>-&r   c           	         R pRV 2pV P                  \        V4      ;_uu_ 4        \        \        \	        \        \        4      RVR7       RRR4       R#   + '       g   i     R# ; i)illegalzUnsupported output type: Tr   N)rp   r|   r   r   r   )r/   illegal_outputmsgs   &  r   test_compile_to_invalid_error)TestCompile.test_compile_to_invalid_error   sO    ").)9:##$7==HeE51$)+ >===s   &AA'	r   N)__name__
__module____qualname____firstlineno__r3   r?   rG   rN   rW   r\   r_   rf   rk   rs   r}   r   r   r   r   r   r   r   __static_attributes____classdictcell____classdict__s   @r   r   r      se     &$(<2(<##<""74;I&>?>'+ +r   r   c                   2   a  ] tR t^t o R tR tR tRtV tR# )TestCompileForCurrentDevicec                   R  p\         \         3pV! W#RR7      w  rE\        P                  ! 4       P                  p\        P                  P
                  P                  V4      pRV^ ,           V^,           2pV P                  W4       R# )c                     W,           # r   r   r   s   &&r   r7   FTestCompileForCurrentDevice._check_ptx_for_current_device.<locals>.add   r9   r   Tr:   z.target sm_N)r   r   get_current_devicecompute_capabilitycudadrvnvvmfind_closest_archr,   )	r/   compile_functionr7   r0   r1   r2   	device_cccctargets	   &&       r   _check_ptx_for_current_device9TestCompileForCurrentDevice._check_ptx_for_current_device   su    	 !%c=
 ++-@@	\\00;r!ugbeW-f"r   c                0    V P                  \        4       R # r   )r   r   r/   s   &r   #test_compile_ptx_for_current_device?TestCompileForCurrentDevice.test_compile_ptx_for_current_device   s    **+IJr   c                0    V P                  \        4       R # r   )r   r   r   s   &r   test_compile_for_current_device;TestCompileForCurrentDevice.test_compile_for_current_device   s    **+EFr   r   N)	r   r   r   r   r   r   r   r   r   r   s   @r   r   r      s     #KG Gr   r   c                   *   a  ] tR t^t o RtR tRtV tR# )TestCompileOnlyTestsz~For tests where we can only check correctness by examining the compiler
output rather than observing the effects of execution.c                    R  p\        V\        3RR7      w  r#^ pVP                  R4       F  pRV9   g   K  V^,          pK  	  ^pV P                  WdRV RV 24       R# )c                 ^    \         P                  ! ^ 4       \         P                  ! V 4       R# )    N)r   	nanosleep)r   s   &r   use_nanosleep:TestCompileOnlyTests.test_nanosleep.<locals>.use_nanosleep   s    NN2NN1r   )r   
znanosleep.u32zGot z" nanosleep instructions, expected N)   r   )r   r
   splitr-   )r/   r   r1   r2   nanosleep_countlineexpecteds   &      r   test_nanosleep#TestCompileOnlyTests.test_nanosleep   sr    	 !	fE
IIdOD$&1$ $   1 2&&.Z1	3r   r   N)r   r   r   r   __doc__r   r   r   r   s   @r   r   r      s     >3 3r   r   __main__N)mathr   numbar   r   r   r   r	   r
   r   
numba.cudar   r   r   r   numba.cuda.cudadrvr   numba.cuda.testingr   r   r   r   TestCaser   r   r   r   mainr   r   r   <module>r      s     B B B8 8 & F F
 ;<P+(## P+ =P+f ;<G, G =G, ;<38,, 3 =30 zMMO r   