
    i]	                     H    S SK r S SKrS SKrSq\R                  " 5       rS rg)    NFc            	         [         (       a  g[           [         (       a
   SSS5        gSq SSS5        [        R                  R	                  S5      (       a  gSSKJn   U R                  nUS-  nU R                  5       u  p4X0R                  R                  :w  a  [        SU 35      eUS-  nX%:  a%  [        R                  " SU S	U S
U S3[        SS9  gg! , (       d  f       N= f)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         a/var/www/html/ai-image-ml/venv/lib/python3.13/site-packages/cuda/bindings/utils/_version_check.py#warn_if_cuda_major_version_mismatchr      s     ,+	// 
 04, 
 
zz~~ABB % ))O#t+M "446C
oo***B3%HII#t+M$=m_ M66C_ E??Lo NZ[
 	
 %/ 
s   CC
C&)r
   	threadingr   r   Lockr	   r        r   <module>r!      s)    
   (- $0
r    