+
    :iu                         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     U/var/www/html/photoedit/myenv/lib/python3.14/site-packages/numba/cuda/cudadrv/libs.pyget_libdevicer   "   s    AkN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+    	mot	$	${{} 
%	$	$	$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5J(.$OK(3z??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,    77>>$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Li ; 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|!|q7HAA|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Bxj/" #hZ()'U35	f '( ||wviik77<<VuvF	)h1vvx   Itzz|III./%XJ'( & $$&D3"))#/CC/HIJnd#	,%8&M  Cs4(D	

%
%c+?GK,M N O	.$".f !-E	#E7
+,?D	.$".f
 :[  045  
  	( ,XJ 7' ' (		(2  	sA>?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   