+
     þÎju  ã                   óè   € R t ^ RIt^ RIt^ RIt^ RIHt ^ RIHt ^ RIH	t	H
t
 ^ RIHt ]P                  R8X  d   RtRtM]P                  R	8X  d   R
tRtMRtRtR tR tRR ltR tR tRR ltR tR# )a  CUDA Toolkit libraries lookup utilities.

CUDA Toolkit libraries can be available via either:

- the `cuda-nvcc` and `cuda-nvrtc` conda packages for CUDA 12,
- the `cudatoolkit` conda package for CUDA 11,
- a user supplied location from CUDA_HOME,
- a system wide location,
- package-specific locations (e.g. the Debian NVIDIA packages),
- or can be discovered by the system loader.
N)Úfind_lib)Úget_cuda_paths)Úlocate_driver_and_loaderÚload_driver)ÚCudaSupportErrorÚwin32z%s.dllz%s.libÚdarwinzlib%s.dylibzlib%s.azlib%s.soc                  ó@   € \        4       p V R ,          P                  pV# )Ú	libdevice)r   Úinfo)ÚdÚpathss     ÚM/opt/data/home/.local/lib/python3.14/site-packages/numba/cuda/cudadrv/libs.pyÚget_libdevicer   "   s   € ÜÓ€AØˆk�N×Ñ€EØ€Ló    c                  ó˜   € \        \        4       R 4      ;_uu_ 4       p V P                  4       uuRRR4       #   + '       g   i     R# ; i)ÚrbN)Úopenr   Úread)Úbcfiles    r   Úopen_libdevicer   (   s+   € Ü	Œm‹o˜t×	$Ô	$¨Ø�{‰{‹}÷ 
%×	$×	$Ó	$ús	   �8¸A		c                ó6  € V R8X  d1   \        4       R,          P                  ;'       g    \        R,          # V'       d   RMRp\        4       V,          P                  p\        WVR7      pV'       d   \        M\        pV'       d   \        V4      # WP,          # )zó
Find the path of a CUDA library based on a search of known locations. If
the search fails, return a generic filename for the library (e.g.
'libnvvm.so' for 'nvvm') so that we may attempt to load it using the system
loader's search mechanism.
ÚnvvmÚstatic_cudalib_dirÚcudalib_dir©Ústatic)r   r   Ú_dllnamepatternr   Ú_staticnamepatternÚmax)Úlibr   Údir_typeÚlibdirÚ
candidatesÚnamepatterns   &&    r   Úget_cudalibr%   -   ss   € ð ˆf„}ÜÓ Õ'×,Ñ,×HÐH´À&Õ0HÐHç+1Ñ'°}ˆÜÓ! (Õ+×0Ñ0ˆä˜#¨fÔ5€Jß(.Õ$´O€Kß(Œ3ˆz‹?Ð?¨kÕ.?Ð?r   c                 óD   € \        V 4      p\        P                  ! V4      # )N)r%   ÚctypesÚCDLL)r    Úpaths   & r   Úopen_cudalibr*   ?   s   € Ü�sÓ€DÜ�;Š;�tÓÐr   c                 ól   € \         P                  P                  V 4      '       g   \        V  R 24      hR# )z
 not foundN)Úosr)   ÚisfileÚFileNotFoundError)r)   s   &r   Úcheck_static_libr/   D   s,   € Ü�7‰7�>‰>˜$×ÒÜ 4 &¨
Ð 3Ó4Ð4ñ  r   c                 óØ   € V R 8X  d   \        4       R ,          P                  # V R8X  d   \        4       R,          P                  # V'       d   RMRp\        4       V,          P                  # )r   r
   r   r   )r   Úby)r    r   r!   s   && r   Ú_get_source_variabler2   I   sW   € Ø
ˆf„}ÜÓ Õ'×*Ñ*Ð*Ø	�Ô	ÜÓ Õ,×/Ñ/Ð/ç+1Ñ'°}ˆÜÓ Õ)×,Ñ,Ð,r   c            
     óè  € Rp  \        4       w  r\        R4       V F  p\        RV 24       K  	  \        RV 24       \        RRR7       \        W4      w  rE\        R4       \        R	V 24       \        P
                  R8X  dÈ   V '       gÀ   \        P                  ! 4       p\        P                  P                  \        P                  P                  RV R4      p \        V4      ;_uu_ 4       p	V	P                  4       p
RRR4       \        R X
P                  4        4       4      p\        R4       V F  p\        RV 24       K  	  RP                  4       pV Fb  p\!        V4      p\        RP#                  V\%        V4      4      4       \        RV4        \        RRR7       \'        V4       \        R4       Kd  	  Rp\!        VRR7      p\        RP#                  V\%        VRR7      4      4       \        RV4        \        RRR7       \)        V4       \        R4       \%        R4      p\        R V 24       \-        4       p\        RV4        \        RRR7       \)        V4       \        R4       V '       * #   \         d   p\        R
T 24       Rp  Rp?EL4Rp?ii ; i  + '       g   i     EL³; i  \         d    \        RT R24        EL‘i ; i  \         d"   p\        RT: RT: 24       Rp  Rp?EKª  Rp?ii ; i  \*         d!   p\        RT: RT: 24       Rp  Rp?ELRp?ii ; i  \*         d&   p\        RT: RT: 24       Rp  Rp?T '       * # Rp?ii ; i)!z:Test library lookup.  Path info is printed to stdout.
    FzFinding driver from candidates:Ú	zUsing loader z	Trying to load driverz...)Úendz	okz		Loaded from z	ERROR: failed to open driver: TNÚlinuxÚprocÚmapsc              3   ó8   "  € T F  pR V9   g   K  Vx € K  	  R# 5i)z
libcuda.soN© )Ú.0Úss   & r   Ú	<genexpr>Útest.<locals>.<genexpr>   s   é € ÐI¡| !°|ÀqÑ7HŸAšA£|ùs   ‚	�
z	Mapped libcuda.so paths:z		z	ERROR: Could not open z) to determine absolute path to libcuda.soznvvm nvrtc cudartzFinding {} from {}z	Located atz	Trying to open libraryz	ERROR: failed to open z:
Ú	cudadevrtr   z	Checking libraryz	ERROR: failed to find r
   zFinding libdevice from )r   Úprintr   r   ÚsysÚplatformr,   Úgetpidr)   ÚjoinÚsepr   r   ÚsetÚsplitÚOSErrorr%   Úformatr2   r*   r/   r.   r   )ÚfailedÚdlloaderr#   ÚlocationÚdllr)   ÚeÚpidÚmapsfileÚfr8   Ú	locationsÚlibsr    Úwheres                  r   ÚtestrU   S   sÿ  € ð €FðÜ7Ó9ÑˆÜÐ/Ô0Û"ˆHÜ�B�x�j�/Ö"ñ #ä�˜h˜ZÐ(Ô)ÜÐ'¨UÕ3Ü Ó5‰	ˆÜˆfŒÜÐ   Ð'Ô(ô ‡|�|�wÔ§vÜ�iŠi‹kˆÜ—7‘7—<‘<¤§¡§¡¨V¸°u¸vÓFˆð	)Ü�h—” 1Ø—v‘v“x�÷  ô ÑI t§z¡z¤|ÓIÓIˆIÜÐ.Ô/Û%�Ü˜˜X˜JÐ'Ö(ñ &ð ×$Ñ$Ó&€DÛˆÜ˜3ÓˆÜÐ"×)Ñ)¨#Ô/CÀCÓ/HÓIÔJÜˆn˜dÔ#ð	ÜÐ,°%Õ8Ü˜ÔÜ�&ŽMñ ð €CÜ�s 4Ô(€DÜ	Ð
×
%Ñ
% cÔ+?ÀØGKô,Mó Nô Oä	ˆ.˜$ÔðÜÐ"¨Õ.Ü˜ÔÜˆfŒô ! Ó-€EÜ	Ð# E 7Ð
+Ô,Ü‹?€DÜ	ˆ.˜$ÔðÜÐ"¨Õ.Ü˜ÔÜˆfŒð
 Œ:Ðøô[ ô ÜÐ0°°Ð4Ô5ØŽûðú÷  —�ûô
 ô 	(ô Ð,¨X¨Jð 7'ð '÷ (ð		(ûô2 ô 	Ý³sºAÐ>Ô?Ø�Fûð	ûô ô Ý³3ºÐ:Ô;ØŽûðûô ô Ý³3ºÐ:Ô;ØŒàŒ:Ðûð	úsŠ   „A/J Ã!K Ã4J/ÄK Æ #K$È	#L É#M ÊJ,ÊJ'Ê'J,Ê/K 	Ê:	K ËK!Ë K!Ë$LË/LÌLÌL>ÌL9Ì9L>ÍM1ÍM,Í,M1)F)Ú__doc__r,   rA   r'   Únumba.misc.findlibr   Únumba.cuda.cuda_pathsr   Únumba.cuda.cudadrv.driverr   r   Únumba.cuda.cudadrv.errorr   rB   r   r   r   r   r%   r*   r/   r2   rU   r:   r   r   Ú<module>r[      s�   ðñ
ó 
Û 
Û å 'Ý 0ß KÝ 5ð ‡<�<�7ÔØ€OØ!ÑØ‡\�\�XÔØ#€OØ"Ñà €OØ"Ðòòô
@ò$ò
5ô
-ô]r   