+
    :i(              	          ^ RI t^ RIt^ RIt^ RIt^ RIt^ RIHt ^ RI	H
t
 ^ RIHtHtHtHtHt ^ RIHtHt ^ RItR tR tR tR	 t]]! R
4      ]! R4      ]! R4       ! R R]4      4       4       4       4       tR tR t]]! R
4      ]! R4      ]! R4       ! R R]4      4       4       4       4       t]]! R4       ! R R]4      4       4       t]R8X  d   ]P>                  ! 4        R# R# )    N)cuda)driver)skip_on_armskip_on_cudasimskip_under_cuda_memcheckContextResettingTestCaseForeignArray)
linux_onlywindows_onlyc                 ~     V ! 4       pR pTpTP                  Y434       R#    Rp\         P                  ! 4       p L/; i)TFN)	traceback
format_excput)the_workresult_queuearrsuccouts   &&   ^/var/www/html/photoedit/myenv/lib/python3.14/site-packages/numba/cuda/tests/cudapy/test_ipc.pycore_ipc_handle_testr      sD    
j d[!%""$s   ! <c                 .   a a V V3R  lp\        W24       R# )c                    < \         P                  ! \         P                  4      p \        P                  ! SSV P
                  ,          V R 7      ;_uu_ 4       pVP                  4       uuRRR4       #   + '       g   i     R# ; i)shapedtypeN)npr   intpr   open_ipc_arrayitemsizecopy_to_host)r   darrhandlesizes     r   r   &base_ipc_handle_test.<locals>.the_work!   s\    !  tu~~/E',. .15$$&. . . .s   A33B	Nr   )r"   r#   r   r   s   ff& r   base_ipc_handle_testr&       s    ' 0    c                 *   a  V 3R  lp\        W!4       R# )c                    < \         P                  ! \         P                  4      p SP                  \        P
                  ! 4       SP                  V P                  ,          V R 7      pVP                  4       pSP                  4        V# )r   )
r   r   r   
open_arrayr   current_contextr#   r   r    close)r   r!   r   r"   s      r   r   +serialize_ipc_handle_test.<locals>.the_work,   sf    !  !5!5!7'-{{enn'D', ! . !
r'   Nr%   )r"   r   r   s   f& r   serialize_ipc_handle_testr.   +   s     0r'   c           	          T ;_uu_ 4       pVP                  4       p V ;_uu_ 4         R R R 4       \        R4      h  + '       g   i     L; i  \         d&   p\        T4      R8w  d   \        R4      h R p?MR p?ii ; i R R R 4       M  + '       g   i     M; iRpXpM   Rp\        P
                  ! 4       p M; iTP                  YV34       R # Nzdid not raise on reopenzIpcHandle is already openedzinvalid exception messageTF)r    AssertionError
ValueErrorstrr   r   r   )ipcarrr   r!   r   er   r   s   &&     r   ipc_array_testr6   9   s    Vt##%C@V  %%>?? V Fq6::()DEE ;F: VVV$ %""$
 d[!s^   
B% B
A=	ABAAB A;6B;B  B	B% B	B% %C zHangs cuda-memcheckzIpc not available in CUDASIMz&CUDA IPC not supported on ARM in Numbac                   L   a  ] tR t^Rt o R tR tR	R ltR tR	R ltR t	Rt
V tR# )
TestIpcMemoryc                   \         P                  ! ^
\         P                  R7      p\        P                  ! V4      p\        P
                  ! 4       pVP                  VP                  4      p\        P                  '       d   VP                  P                  pM\        VP                  4      pVP                  p\        P                  ! R4      pVP!                  4       pWVV3pVP#                  \$        VR7      p	V	P'                  4        VP)                  4       w  rV
'       g   V P+                  V4       M\         P,                  P/                  W4       V	P1                  ^4       R# )
   r   spawntargetargsN)r   aranger   r   	to_devicer+   get_ipc_handlegpu_datar   USE_NV_BINDINGr"   reservedbytesr#   mpget_contextQueueProcessr&   startgetfailtestingassert_equaljoin)selfr   devarrctxipchhandle_bytesr#   r   r?   procr   r   s   &           r   test_ipc_handleTestIpcMemory.test_ipc_handleX   s    ii"''*$ ""$!!&//2    ;;//L -Lyy nnW%yy{L1{{"6T{B

 $$&	IIcNJJ##C-		!r'   c                z    R \        ^R 4      \        ^^4      \        R ^4      3pRp\        P                  ! W4      # )N)FT)slice	itertoolsproduct)rQ   indicesforeignss   &  r   variantsTestIpcMemory.variantsu   s:    q$q!eD!nE !  33r'   Nc                   \         P                  ! ^
\         P                  R7      p\        P                  ! V4      pVe	   WA,          pV'       d    \        P
                  ! \        V4      4      pVP                  4       p\        P                  ! 4       pVP                  VP                  4      p\        P                  ! V4      p\        P                  ! V4      p	V P                  V	P                  R4       V P!                  V	P"                  VP"                  4       \$        P&                  '       d<   V P!                  V	P(                  P*                  VP(                  P*                  4       M8V P!                  \-        V	P(                  4      \-        VP(                  4      4       \.        P0                  ! R4      pVP3                  4       p
Wz3pVP5                  \6        VR7      pVP9                  4        V
P;                  4       w  rV'       g   V P=                  V4       M\         P>                  PA                  W^4       VPC                  ^4       R# r:   r;   Nr<   r=   )"r   r@   r   r   rA   as_cuda_arrayr	   r    r+   rB   rC   pickledumpsloadsassertIsbaseassertEqualr#   r   rD   r"   rE   tuplerG   rH   rI   rJ   r.   rK   rL   rM   rN   rO   rP   )rQ   	index_argforeignr   rR   expectrS   rT   buf
ipch_reconr   r?   rV   r   r   s   &&&            r   check_ipc_handle_serialization,TestIpcMemory.check_ipc_handle_serialization}   s   ii"''*$ &F''V(<=F$$& ""$!!&//2 ll4 \\#&
joot,$))4   Z..779M9MNU:#4#45uT[[7IJ nnW%yy{#{{";${G

 $$&	IIcNJJ##F0		!r'   c                    V P                  4        F9  w  rV P                  WR 7      ;_uu_ 4        V P                  W4       RRR4       K;  	  R#   + '       g   i     KP  ; i)indexrl   N)r_   subTestrp   rQ   rt   rl   s   &  r   test_ipc_handle_serialization+TestIpcMemory.test_ipc_handle_serialization   sE    #}}OEE;;33EC <;  /;;;   AA!c                |   \         P                  ! ^
\         P                  R7      p\        P                  ! V4      pVe	   WA,          pV'       d    \        P
                  ! \        V4      4      pVP                  4       pVP                  4       p\        P                  ! R4      pVP                  4       pWh3p	VP                  \        V	R7      p
V
P                  4        VP                  4       w  rV'       g   V P!                  V4       M\         P"                  P%                  W\4       V
P'                  ^4       R# rb   )r   r@   r   r   rA   rc   r	   r    rB   rG   rH   rI   rJ   r6   rK   rL   rM   rN   rO   rP   )rQ   rk   rl   r   rR   rm   rT   rS   r   r?   rV   r   r   s   &&&          r   check_ipc_arrayTestIpcMemory.check_ipc_array   s    ii"''*$ &F''V(<=F$$&$$& nnW%yy{#{{.t{<

 $$&	IIcNJJ##F0		!r'   c                    V P                  4        F9  w  rV P                  WR 7      ;_uu_ 4        V P                  W4       RRR4       K;  	  R#   + '       g   i     KP  ; irs   )r_   ru   r{   rv   s   &  r   test_ipc_arrayTestIpcMemory.test_ipc_array   sE    #}}OEE;;$$U4 <;  /;;;ry    )NF)__name__
__module____qualname____firstlineno__rW   r_   rp   rw   r{   r~   __static_attributes____classdictcell____classdict__s   @r   r8   r8   R   s*     :4$LD
25 5r'   r8   c                 .   a a VV 3R  lp\        W24       R# )c                    < \         P                  S,          ;_uu_ 4        \         P                  P                  4       p SP	                  V 4      pSP
                  \        P                  ! \        P                  4      P                  ,          p\        P                  ! V\        P                  R 7      p\         P                  P                  W1SP
                  R7       SP                  4        RRR4       V#   + '       g   i     X# ; i)r;   )r#   N)r   gpusdevicesrH   open_stagedr#   r   r   r   r   zerosr   device_to_hostr,   )this_ctx	deviceptrarrsize	hostarray
device_numr"   s       r   r   (staged_ipc_handle_test.<locals>.the_work   s    YYz""||//1H**84IkkRXXbgg%6%?%??G8IKK&&6;; '  LLN #  #" s   CC;;D	Nr%   )r"   r   r   r   s   ff& r   staged_ipc_handle_testr      s    
 0r'   c                 &    \         P                  V,          ;_uu_ 4        T ;_uu_ 4       pVP                  4       p V ;_uu_ 4         R R R 4       \        R4      h  + '       g   i     L; i  \         d&   p\        T4      R8w  d   \        R4      h R p?MR p?ii ; i R R R 4       M  + '       g   i     M; iR R R 4       M  + '       g   i     M; iRpXpM   Rp\        P                  ! 4       p M; iTP                  Yg34       R # r0   )	r   r   r    r1   r2   r3   r   r   r   )r4   r   r   r!   r   r5   r   r   s   &&&     r   staged_ipc_array_testr      s    YYz""4'')D   ))BCC  ! J1v!>>,-HII ?J>  #"""& %""$
 d[!sz   C! C	B-	
A0A
A0B-	A-(A00B ;BB-	B  B-	$	C	-B=8C	 	C! 	C	C! !C<c                   ,   a  ] tR t^t o R tR tRtV tR# )TestIpcStagedc                z   \         P                  ! ^
\         P                  R7      p\        P                  ! V4      p\
        P                  ! R4      pVP                  4       p\        P                  ! 4       pVP                  VP                  4      p\        P                  ! V4      p\        P                  ! V4      pV P                  VP                  R4       \         P"                  '       d<   V P%                  VP&                  P(                  VP&                  P(                  4       M8V P%                  \+        VP&                  4      \+        VP&                  4      4       V P%                  VP,                  VP,                  4       \/        \1        \        P2                  4      4       F  p	WiV3p
VP5                  \6        V
R7      pVP9                  4        VP;                  4       w  rVP=                  ^4       V'       g   V P?                  V4       Kl  \         P@                  PC                  W4       K  	  R# )r:   r;   r<   Nr=   )"r   r@   r   r   rA   rG   rH   rI   r+   rB   rC   rd   re   rf   rg   rh   r   rD   ri   r"   rE   rj   r#   rangelenr   rJ   r   rK   rL   rP   rM   rN   rO   )rQ   r   rR   mpctxr   rS   rT   rn   ro   r   r?   rV   r   r   s   &             r   test_stagedTestIpcStaged.test_staged   sy   ii"''*$ w'{{} ""$!!&//2ll4 \\#&
joot,   Z..779M9MNU:#4#45uT[[7IJ$))4  DII/Jl3D==(>T=JDJJL$((*IDIIaL		#

''1 0r'   c                >   \        \        \        P                  4      4       F  p\        P
                  P                  ^
4      p\        P                  ! V4      pVP                  4       p\        P                  ! R4      pVP                  4       pWAV3pVP                  \        VR7      pVP                  4        VP                  4       w  rVP                  ^4       V	'       g   V P!                  V
4       K  \        P"                  P%                  W*4       K  	  R# )r:   r<   r=   N)r   r   r   r   r   randomrA   rB   rG   rH   rI   rJ   r   rK   rL   rP   rM   rN   rO   )rQ   r   r   rR   rT   rS   r   r?   rV   r   r   s   &          r   r~   TestIpcStaged.test_ipc_array  s    DII/J))""2&C^^C(F((*D ..)C99;Ll3D;;&;$;GDJJL$((*IDIIaL		#

''1# 0r'   r   N)r   r   r   r   r   r~   r   r   r   s   @r   r   r      s     
 2D2 2r'   r   c                   &   a  ] tR tRt o R tRtV tR# )TestIpcNotSupportedi-  c                ^   \         P                  ! ^
\         P                  R7      p\        P                  ! V4      pV P                  \        4      ;_uu_ 4       pVP                  4        RRR4       \        XP                  4      pV P                  RV4       R#   + '       g   i     L9; i)r:   r;   NzOS does not support CUDA IPC)r   r@   r   r   rA   assertRaisesOSErrorrB   r3   	exceptionassertIn)rQ   r   rR   raiseserrmsgs   &    r   test_unsupported$TestIpcNotSupported.test_unsupported0  sp    ii"''*$w''6!!# (V%%&4f= ('s   BB,	r   N)r   r   r   r   r   r   r   r   s   @r   r   r   -  s     > >r'   r   __main__) multiprocessingrG   r[   r   rd   numpyr   numbar   numba.cuda.cudadrvr   numba.cuda.testingr   r   r   r   r	   numba.tests.supportr
   r   unittestr   r&   r.   r6   r8   r   r   r   r   r   mainr   r'   r   <module>r      s         %H H 9 "11"2 /0/056n5, n5 7 1 1 n5b1 "4 /0/05652, 52 7 1 1 52p /0>2 > 1 > zMMO r'   