3
Á3W^¼  ã               @   s   d a dd„ Zd S )Nc              C   sØ   t dk	rt S ddl} ddlm } |a tt dƒrÔ| jjdk	rÔtt jƒ}t|ƒdk rjt|d ƒ}t|d ƒ}nt|dd… ƒ}t|d ƒ}| jj}|j	dƒ}t|d ƒ}t|d	 ƒ}||ksÀ||krÔt
d
j||||ƒƒ‚t S )z`
    Make sure that CUDA versions match between the pytorch install and torchvision install
    Né    )Ú_CÚCUDA_VERSIONi'  é   é   Ú.é   zÜDetected that PyTorch and torchvision were compiled with different CUDA versions. PyTorch has CUDA Version={}.{} and torchvision has CUDA Version={}.{}. Please reinstall the torchvision that matches your PyTorch install.)r   ÚtorchZtorchvisionÚhasattrÚversionZcudaÚstrr   ÚintÚsplitÚRuntimeErrorÚformat)r   ÚCZ
tv_versionZtv_majorZtv_minorZ	t_versionZt_majorZt_minor© r   ú</tmp/pip-build-7wfi2gtz/torchvision/torchvision/extension.pyÚ_lazy_import   s(    

r   )r   r   r   r   r   r   Ú<module>   s   