
    J/Ph                     \   d dl Z d dlmZ ddlmZmZmZmZmZm	Z	m
Z
mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZm Z m!Z! ddl"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z( ddl)m*Z* d dl+m,Z,m-Z-m.Z.m/Z/m0Z0m1Z1m2Z2m3Z3m4Z4 d dl5m6Z6 dd	l7m8Z8 d d
lm9Z9 ddl:m;Z; ddl<m=Z=m>Z> ddl?T ddl?m@Z@ ddlAmBZBmCZCmDZD ddlEmFZFmGZGmHZHmIZImJZJmKZKmLZLmMZM ddlNmOZO eOjP        xZQZPe!D ]AZR eSe jT        eU         eRjU        eR           eRjV        D ]ZW eSe jT        eU         eWeR           B[R[!d ZXd ZYd ZZ e9j[                     dS )    N)cg   )	threadIdxblockIdxblockDimgridDimlaneidwarpsizesyncwarpsharedlocalconstatomicshfl_sync_intrinsicvote_sync_intrinsicmatch_any_syncmatch_all_syncthreadfence_blockthreadfence_systemthreadfenceselppopcbrevclzffsfmacbrt
activemasklanemask_lt	nanosleepfp16_vector_type_stubs)gridgridsizesyncthreadssyncthreads_andsyncthreads_countsyncthreads_or)CudaSupportError)	BaseCUDAMemoryManagerHostOnlyCUDAMemoryManagerGetIpcHandleMixinMemoryPointerMappedMemoryPinnedMemory
MemoryInfo	IpcHandleset_memory_manager)runtime)nvvm)
initialize)KernelRuntimeError)jitdeclare_device)*)_auto_device)InOutInOut)all_syncany_synceq_syncballot_sync	shfl_syncshfl_up_syncshfl_down_syncshfl_xor_sync)	reductionc                  v    d} 	 t           j         j        } n# t          $ r Y nw xY w| ot          j                    S )zReturns a boolean to indicate the availability of a CUDA GPU.

    This will initialize the driver if it hasn't been initialized.
    F)driveris_availabler)   r4   )driver_is_availables    V/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/numba/cuda/device_init.pyrI   rI   -   sS      $m8    64#4#6#66s    
##c                  (    t          j                    S )a  Returns True if the CUDA Runtime is a supported version.

    Unsupported versions (e.g. newer versions than those known to Numba)
    may still work; this function provides a facility to check whether the
    current Numba version is tested and known to work with the current
    runtime version. If the current version is unsupported, the caller can
    decide how to act. Options include:

    - Continuing silently,
    - Emitting a warning,
    - Generating an error or otherwise preventing the use of CUDA.
    )r3   is_supported_version     rK   rM   rM   @   s     ')))rO   c                  $    t           j         j        S )zReturns None if there was no error initializing the CUDA driver.
    If there was an error initializing the driver, a string describing the
    error is returned.
    )rH   initialization_errorrN   rO   rK   
cuda_errorrR   Q   s    
 =--rO   )\sys
numba.cudar   stubsr   r   r   r   r	   r
   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r    r!   r"   
intrinsicsr#   r$   r%   r&   r'   r(   cudadrv.errorr)   numba.cuda.cudadrv.driverr*   r+   r,   r-   r.   r/   r0   r1   r2   numba.cuda.cudadrv.runtimer3   cudadrvr4   r5   errorsr6   
decoratorsr7   r8   apir:   argsr;   r<   r=   intrinsic_wrapperr>   r?   r@   rA   rB   rC   rD   rE   kernelsrF   Reducereducevector_type_stubsetattrmodules__name__aliasesaliasrI   rM   rR   initialize_allrN   rO   rK   <module>rj      s"   



      ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( (< < < < < < < < < < < < < < < < + + + + + +F F F F F F F F F F F F F F F F F F F F F F
 / . . . . .       ! ! ! ! ! ! & & & & & & + + + + + + + +                              / / / / / / / / / / / / / / / / / / / /      " " + @ @GCK!#3#<>NOOO!) @ @H%u.>????@(7 7 7&* * *". . . 
      rO   