
    j]	                     F    d dl Z d dlZd dlZda ej                    Zd ZdS )    NFc            	         t           rdS t          5  t           r	 ddd           dS da ddd           n# 1 swxY w Y   t          j                            d          rdS ddlm}  | j        }|dz  }|                                 \  }}|| j	        j
        k    rt          d|           |dz  }||k    r(t          j        d| d	| d
| dt          d           dS dS )a)  Warn if the CUDA driver major version is older than cuda-bindings compile-time version.

    This function compares the CUDA major version that cuda-bindings was compiled
    against with the CUDA major version supported by the installed driver. If the
    compile-time major version is greater than the driver's major version, a warning
    is issued.

    The check runs only once per process. Subsequent calls are no-ops.

    The warning can be suppressed by setting the environment variable
    ``CUDA_PYTHON_DISABLE_MAJOR_VERSION_WARNING=1``.
    NT)CUDA_PYTHON_DISABLE_MAJOR_VERSION_WARNINGr   )driveri  z%Failed to query CUDA driver version: z/cuda-bindings was built for CUDA major version z1, but the NVIDIA driver only supports up to CUDA z. Some cuda-bindings features may not work correctly. Consider updating your NVIDIA driver, or using a cuda-bindings version built for CUDA zM. (Set CUDA_PYTHON_DISABLE_MAJOR_VERSION_WARNING=1 to suppress this warning.)   )
stacklevel)$_major_version_compatibility_checked_lockosenvirongetcuda.bindingsr   CUDA_VERSIONcuDriverGetVersionCUresultCUDA_SUCCESSRuntimeErrorwarningswarnUserWarning)r   compile_versioncompile_majorerrruntime_versionruntime_majors         g/home/longshao/multi-rider-rag/.venv/lib/python3.11/site-packages/cuda/bindings/utils/_version_check.py#warn_if_cuda_major_version_mismatchr      s    , 	 4 4/ 	4 4 4 4 4 4 4 4 04,4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 
z~~ABB  %$$$$$ )O#t+M "4466C
fo***H3HHIII#t+M}$$[m [ [6C[ [ @M[ [ [
 	
 	
 	
 	
 	
 	
 %$s   	5599)r
   	threadingr   r   Lockr	   r        r   <module>r!      sU    
			      (- $	0
 0
 0
 0
 0
r    