
    i]	                     H    d dl Z d dlZd dlZda ej                         Zd Zy)    NFc            	         t         ryt        5  t         r
	 ddd       yda ddd       t        j                  j	                  d      ryddlm}  | j                  }|dz  }| j                         \  }}|| j                  j                  k7  rt        d|       |dz  }||kD  r't        j                  d| d	| d
| dt        d       yy# 1 sw Y   xY w)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         s/var/www/vps2.regionflexible.com/Desarrollo/venv/lib/python3.12/site-packages/cuda/bindings/utils/_version_check.py#warn_if_cuda_major_version_mismatchr      s     ,	 4/4 4 04,4 
zz~~AB % ))O#t+M "446C
foo***B3%HII#t+M}$=m_ M66C_ E??Lo NZ[
 	
 %/4 4s   CCC)r
   	threadingr   r   Lockr	   r        r   <module>r!      s+    
   (- $	0
r    