
    hE                        S SK r S SKrS SKrSSKJr  SrS r \ R                  S:X  an  \R                  S:  a^  \ R                  S   r
\
R                  S	5      r\ H8  r\ R                  R                  \5      (       d  M%   \ R                  " \5        M:     \" S
5      r\R$                  R'                  \5        SrS rS rS rS r\" 5         g! \ a     M~  f = f! \\4 a     N(f = f)    N   )_get_extension_pathFc                      g)NF r       M/var/www/auris/envauris/lib/python3.13/site-packages/torchvision/extension.py_has_opsr	      s    r   nt)   	   PATH;_CTc                      g)NTr   r   r   r   r	   r	   %   s    r   c                  8    [        5       (       d  [        S5      eg )Na  Couldn't load custom C++ ops. This can happen if your PyTorch and torchvision versions are incompatible, or if you had errors while compiling torchvision from source. For further information on the compatible versions, check https://github.com/pytorch/vision#installation for the compatibility matrix. Please check your PyTorch version with torch.__version__ and your torchvision version with torchvision.__version__ and verify if they are compatible, and if not please reinstall torchvision so that it matches your PyTorch install.)r	   RuntimeErrorr   r   r   _assert_has_opsr   ,   s!    ::T
 	
 r   c                     [         (       d  gSSKJn   [        R                  R
                  R                  5       nUS:w  a  U b  [        U5      n[        U5      S:  a  [        US   5      n[        US   5      nO[        USS 5      n[        US   5      nU R                  S5      n[        US   5      n[        US   5      nXc:w  a  [        S	U SU S
U SU S3	5      eU$ )zX
Make sure that CUDA versions match between the pytorch install and torchvision install
r   )cudai'     r   .r   zqDetected that PyTorch and torchvision were compiled with different CUDA major versions. PyTorch has CUDA Version=z" and torchvision has CUDA Version=zE. Please reinstall the torchvision that matches your PyTorch install.)_HAS_OPStorch.versionr   torchopstorchvision_cuda_versionstrintsplitr   )torch_version_cuda_version
tv_versiontv_majortv_minor	t_versiont_majort_minors           r   _check_cuda_versionr*   9   s     88yy$$224H2~,8]
z?U":a=)H:a=)H:a?+H:a=)H&,,S1	il#il#,,39AgY ?  (z8* 5VV  Or   c                 X    [        U 5      n[        R                  R                  U5        g )N)r   r   r   load_library)lib_namelib_paths     r   _load_libraryr/   W   s    "8,H	II8$r   )ossysr   _internally_replaced_utilsr   r   r	   nameversion_infoenvironenv_pathr!   path_arrpathexistsadd_dll_directory	Exceptionr.   r   r,   ImportErrorOSErrorr   r*   r/   r   r   r   <module>r>      s    	 
  ; 	 
ww$3++f4::f%>>#&Dww~~d##((.  #4(H	II8$H

<%
  } !  	W 		s6   A#C C,C CC CC C('C(