U
    wâhT  ã                   @   sf   d dl Z d dlmZ d dlmZ d dlmZ eedƒ dd„ Zdd	„ Zd
d„ Z	eedƒ ee	dƒ dS )é    N)Ú_Await)Ú_register_builtin)Ú
set_modulez	torch.jitc                 O   s   t jj| f|ž|ŽS )zpCreate Await object that will call specified functioni with specified args, when it is requested for the result.)ÚtorchÚ_CÚ
_awaitable)ÚfuncÚargsÚkwargs© r   úB/var/www/html/venv/lib/python3.8/site-packages/torch/jit/_await.pyr      s    r   c                 C   s   t j | ¡S )zjRequest await the result of execution, if Await is not completed yet, the func will be called immediately.)r   r   Ú_awaitable_wait)Zawr   r   r   r      s    r   c                 C   s   t j | ¡S )z-Create completed Await with specified result.)r   r   Ú_awaitable_nowait)Úor   r   r   r      s    r   zprim::awaitable_waitzprim::awaitable_nowait)
r   Ztorch._jit_internalr   Ztorch.jit._builtinsr   Ztorch.utilsr   r   r   r   r   r   r   r   Ú<module>   s   

