o
    oi                  	   @   s  U d dl mZmZmZmZmZmZmZmZ d dl	Z	d dl
mZ d dl	mZ defddZded	ed
edefddZded	ed
edefddZd%ded	ed
ee defddZermd%dee dee deedf fddZneddd rdee defddZndee defddZeredZedee f ed< neddd re	jZne	jZeredef ed< edef ed< dS eddrd d lmZ d d!lmZ d d"lmZ  ee d#d$Zeed#ZdS e	j!j"jZe	j!j"jZdS )&    )TYPE_CHECKINGAnyCallableContextManagerListOptionalTupleTypeVarN)version)Tensorreturnc                   C   s   t jdd S )z<Parse the `torch.__version__` variable and removes +cu*/cpu.+r   )torch__version__	partition r   r   H/home/ubuntu/.local/lib/python3.10/site-packages/kornia/utils/_compat.pytorch_version   s   r   majorminorpatchc                 C   s*   t t }|t |  d| d| k S N.r
   parser   r   r   r   _versionr   r   r   torch_version_lt      r   c                 C   s*   t t }|t |  d| d| kS r   r   r   r   r   r   torch_version_le#   r   r   c                 C   sJ   t t }|d u r|t |  d| kS |t |  d| d| kS r   r   r   r   r   r   torch_version_ge(   s   r    tensorsindexing.c                 C   s   d S Nr   r!   r"   r   r   r   torch_meshgrid2   s    r%      
   c                 C   s   t j| |dS )N)r"   r   meshgridr$   r   r   r   r%   6   s   c                 C   s
   t | S r#   r(   r$   r   r   r   r%   ;   s   
_Ttorch_inference_mode
custom_fwdautocast      )partial)r-   )r,   cuda)device_typer#   )#typingr   r   r   r   r   r   r   r	   r   	packagingr
   r   strr   intboolr   r   r    r%   r*   __annotations__inference_moder+   no_grad	functoolsr0   	torch.ampr-   	_autocastr,   _custom_fwdr1   ampr   r   r   r   <module>   s<   * *

