+
    JV-jV  ã                   óÆ  € ^ RI t ^ RIHt ^ RIt^ RIt^ RIt^ RIHt ]P                  P                  t]P                  ! R4      tR tR tR t]]P                  P#                  R]P$                  ! 4       R3]P&                  ! 4       R	3]P(                  ! 4       R
3]P*                  ! 4       R3]P,                  ! 4       R3]P.                  ! 4       R3]P0                  ! 4       R3]P2                  ! 4       R3]P4                  ! 4       R3]P6                  ! 4       R3]P8                  ! 4       R3.4      R 4       4       t]]P                  P#                  R]P$                  ]P&                  ]P(                  ]P*                  ]P,                  ]P.                  ]P0                  ]P2                  ]P4                  ]P6                  ]P8                  .4      R 4       4       tR tR t R# )é    N©Úwraps)ÚVersionÚnumpyc                 óp   € \         P                  P                  \         P                  ! V 4      V4      ^8H  # )é   )ÚctypesÚ	pythonapiÚPyCapsule_IsValidÚ	py_object)ÚcapsuleÚnames   &&Új/Volumes/fast/ai/experiments/ui-tars-smoke/.venv/lib/python3.14/site-packages/pyarrow/tests/test_dlpack.pyr   r       s,   € Ü×Ñ×-Ñ-¬f×.>Ò.>¸wÓ.GÈÓNÐRSÑSÐSó    c                 óä   € V P                  4       p\        VR 4      RJ g   Q h\        P                  V 4      p\        P                  P                  W1RR7       V P                  4       R8X  g   Q hR# )s   dltensorT)ÚstrictN)r   r   )Ú
__dlpack__r   ÚnpÚfrom_dlpackÚtestingÚassert_array_equalÚ__dlpack_device__)ÚarrÚexpected_arrÚDLTensorÚresults   &&  r   Úcheck_dlpack_exportr   $   s_   € Ø�~‰~Ó€HÜ˜X {Ó3°tÓ;Ð;Ð;ä�^‰^˜CÓ €FÜ‡J�J×!Ñ! &¸tÐ!ÔDà× Ñ Ó" fÔ,Ð,Ò,r   c                 ó0   a € \        S 4      V 3R  l4       pV# )c                  óä   <€ \         P                  ! 4        \        P                  ! 4       p S! V / VB \        P                  ! 4       V8X  g   Q h#   \        P                  ! 4       T8X  g   Q hi ; i)N)ÚgcÚcollectÚpaÚtotal_allocated_bytes)ÚargsÚkwargsÚallocated_bytesÚfs   *, €r   ÚwrapperÚ&check_bytes_allocated.<locals>.wrapper/   s\   ø€ ä
�
Š
ŒÜ×2Ò2Ó4ˆð	AÙ�dÐ%˜fÑ%ä×+Ò+Ó-°Ô@Ð@Ñ@ø”2×+Ò+Ó-°Ô@Ð@Ñ@ús   ­A ÁA/r   )r'   r(   s   f r   Úcheck_bytes_allocatedr*   .   s"   ø€ Ü
ˆ1ƒXôAó ðAð €Nr   Úuint8Úuint16Úuint32Úuint64Úint8Úint16Úint32Úint64Úfloat16Úfloat32Úfloat64c                 ó  € \        \        P                  4      \        R 4      8  d   \        P                  ! R4       \        P                  . RO\        P                  V4      R7      p\        P
                  ! W R7      p\        W24       \        P                  P                  V4      p\        WB4       VP                  ^^4      p\        P                  ^.\        P                  V4      R7      p\        WR4       VP                  ^ ^4      p\        P                  ^.\        P                  V4      R7      p\        WR4       VP                  ^4      p\        P                  ^^.\        P                  V4      R7      p\        WR4       \        P
                  ! . V R7      p\        P                  . \        P                  V4      R7      p\        Wb4       \        P                  P                  V4      p\        WB4       R# )ú1.24.0úyNo dlpack support in numpy versions older than 1.22.0, strict keyword in assert_array_equal added in numpy version 1.24.0©Údtype©ÚtypeN©r   é   é   )r   r   Ú__version__ÚpytestÚskipÚarrayr:   r"   r   ÚTensorÚ
from_numpyÚslice)Ú
value_typeÚnp_type_strÚexpectedr   ÚtÚ
arr_slicedÚarr_zeros   &&     r   Útest_dlpackrM   :   se  € ô$ Œr�~‰~Ó¤¨Ó!2Ô2Ü�Šð ô 	ô �x‰xš	¬¯©°+Ó)>ˆxÓ?€HÜ
�(Š(�8Ô
-€CÜ˜Ô&ä
�	‰	×Ñ˜XÓ&€AÜ˜Ô$à—‘˜1˜a“€JÜ�x‰x˜˜¤2§8¡8¨KÓ#8ˆxÓ9€HÜ˜
Ô-à—‘˜1˜a“€JÜ�x‰x˜˜¤2§8¡8¨KÓ#8ˆxÓ9€HÜ˜
Ô-à—‘˜1“€JÜ�x‰x˜˜A˜¤b§h¡h¨{Ó&;ˆxÓ<€HÜ˜
Ô-ä�xŠx˜ Ô,€HÜ�x‰x˜¤"§(¡(¨;Ó"7ˆxÓ8€HÜ˜Ô+ä
�	‰	×Ñ˜XÓ&€AÜ˜Ö$r   Únp_typec                 óò  € \        \        P                  4      \        R 4      8  d   \        P                  ! R4       \        P                  . RO4      p\        P                  WR7      P                  RRR7      p\        P                  P                  V4      p\        W24       \        P                  WR7      P                  RRR7      p\        P                  P                  V4      p\        W24       R# )	r7   r8   r9   ÚC)ÚorderÚFN)r   r>   r?   é   é   é   r   r   )r>   r>   r>   )r   r   r@   rA   rB   rC   Úreshaper"   rD   rE   r   )rN   r   rI   rJ   s   &   r   Útest_tensor_dlpackrW   l   s´   € ô Œr�~‰~Ó¤¨Ó!2Ô2Ü�Šð ô 	ô �(‰(Ò+Ó
,€CÜ�x‰x˜ˆxÓ+×3Ñ3°IÀSÐ3ÓI€HÜ
�	‰	×Ñ˜XÓ&€AÜ˜Ô$ä�x‰x˜ˆxÓ+×3Ñ3°IÀSÐ3ÓI€HÜ
�	‰	×Ñ˜XÓ&€AÜ˜Ö$r   c                  óB  € \        \        P                  4      \        R 4      8  d   \        P                  ! R4       \
        P                  ! . RO4      p \        P                  ! \        RR7      ;_uu_ 4        \        P                  V 4       RRR4       \
        P                  ! ^ ^.^^..\
        P                  ! \
        P                  ! 4       4      R7      p \        P                  ! \        RR7      ;_uu_ 4        \        P                  V 4       RRR4       \
        P                  ! . 4      p \        P                  ! \        RR7      ;_uu_ 4        \        P                  V 4       RRR4       \
        P                  ! . R	O4      p \        P                  ! \        RR7      ;_uu_ 4        \        P                  V 4       RRR4       R#   + '       g   i     ELL; i  + '       g   i     LØ; i  + '       g   i     L“; i  + '       g   i     R# ; i)
z1.22.0z6No dlpack support in numpy versions older than 1.22.0.Nz,Can only use DLPack on arrays with no nulls.©Úmatchr;   z+DataType is not compatible with DLPack specz5Bit-packed boolean data type not supported by DLPack.)r   Nr?   )TFT)r   r   r@   rA   rB   r"   rC   ÚraisesÚ	TypeErrorr   Úlist_r1   )r   s    r   Útest_dlpack_not_supportedr^   �   sZ  € ÜŒr�~‰~Ó¤¨Ó!2Ô2Ü�ŠÐLÔMä
�(Š(’<Ó
 €CÜ	�Š”yð )2÷ 
3ö 
3ä
�‰�sÔ÷
3ô �(Š(Ø
ˆQˆ�!�Q�ÐÜ�XŠX”b—h’h“jÓ!ô€Cô 
�Š”yÐ(U×	VÖ	VÜ
�‰�sÔ÷ 
Wô �(Š(�2‹,€CÜ	�Š”yÐ(U×	VÖ	VÜ
�‰�sÔ÷ 
Wô �(Š(Ò&Ó
'€CÜ	�Š”yð )2÷ 
3ö 
3ä
�‰�sÔ÷
3ñ 
3÷#
3÷ 
3ð 
3ú÷ 
W×	Vú÷ 
W×	Vú÷

3÷ 
3ð 
3ús0   Á:GÄG'ÅG:Æ3HÇG$	Ç'G7	Ç:H
	ÈH	c                  ó  € \         P                  ! R 4      p \        P                  ! \        P                  ! R\        P
                  ! 4       4      .4      p\        P                  ! . RO\        P
                  ! 4       R7      p\        P                  ! V.VR7      pV P                  W0P                  ^ 4      4      pV P                  WCP                  4      pVR,          p\         P                  ! \        RR7      ;_uu_ 4        \        P                  V4       RRR4       \         P                  ! \        RR7      ;_uu_ 4        VP                  4        RRR4       R#   + '       g   i     LO; i  + '       g   i     R# ; i)zpyarrow.cudaÚf0r;   )Úschemaz=DLPack support is implemented only for buffers on CPU device.rY   Nr=   )rA   Úimportorskipr"   ra   Úfieldr0   rC   Úrecord_batchÚserialize_record_batchÚContextÚread_record_batchr[   ÚNotImplementedErrorr   r   r   )Úcudara   Úa0ÚbatchÚcbufÚcbatchÚcarrs          r   Útest_dlpack_cuda_not_supportedro   œ   s	  € Ü×Ò˜~Ó.€Dä�YŠYœŸš ¤r§x¢x£zÓ2Ð3Ó4€FÜ	�Š’)¤"§(¢(£*Ô	-€BÜ�OŠO˜R˜D¨Ô0€Eà×&Ñ& u¯l©l¸1«oÓ>€DØ×#Ñ# D¯,©,Ó7€FØ�$�<€Dô 
�ŠÔ*ð 39÷ 
:ö 
:ä
�‰�tÔ÷
:ô 
�ŠÔ*ð 39÷ 
:ö 
:à×ÑÔ ÷
:ñ 
:÷	
:÷ 
:ú÷
:÷ 
:ð 
:ús   ÄE!ÅE4Å!E1	Å4F	)rG   rH   )!r	   Ú	functoolsr   r    rA   Úpyarrowr"   Úpyarrow.vendored.versionr   Úmarkr   Ú
pytestmarkrb   r   r   r   r*   Úparametrizer+   r,   r-   r.   r/   r0   r1   r2   r3   r4   r5   rM   rW   r^   ro   © r   r   Ú<module>rw      s›  ðó$ Ý Û 	Û ã Ý ,ð �[‰[×Ñ€
Ø×Ò˜Ó!€òTò-ò	ð Ø‡�×ÑØ!à	�Š‹�WÐØ	�Š‹�hÐØ	�Š‹�hÐØ	�Š‹�hÐØ	�Š‹�FÐØ	�Š‹�WÐØ	�Š‹�WÐØ	�Š‹�WÐØ	�Š‹�yÐ!Ø	�Š‹�yÐ!Ø	�Š‹�yÐ!ðóñ %ó!ó ð"%ðB Ø‡�×Ñ˜ØŸ(™( B§I¡I¨r¯y©y¸"¿)¹)ØŸ'™' 2§8¡8¨R¯X©X°r·x±xØŸ*™* b§j¡j°"·*±*ð?ó@ñ%ó	@ó ð
%ò ô6!r   