o
    HÆ&i“  ã                   @   s<   d dl Z d dlmZmZ d dlZG dd„ dƒZddd„ZdS )é    N)ÚAnyÚDictc                   @   s4   e Zd ZU eƒ Zeeef ed< e	 
¡ Zdd„ ZdS )ÚDeviceContextÚ	_CONTEXTSc                 C   s
   || _ d S ©N)Údevice)Úselfr   © r	   úEC:\wamp64\www\opt\env\Lib\site-packages\torch/_lazy/device_context.pyÚ__init__   s   
zDeviceContext.__init__N)Ú__name__Ú
__module__Ú__qualname__Údictr   r   Ústrr   Ú__annotations__Ú	threadingÚLockÚ_CONTEXTS_LOCKr   r	   r	   r	   r
   r      s   
 r   c                 C   st   | d u rt jj ¡ } nt| ƒ} tj tj | d ¡}|d u r't| ƒ}|tj| < |W  d   ƒ S 1 s3w   Y  d S r   )	ÚtorchZ_CZ_lazyZ_get_default_device_typer   r   r   r   Úget)r   Zdevctxr	   r	   r
   Úget_device_context   s   
$ûr   r   )r   Útypingr   r   Ztorch._C._lazyr   r   r   r	   r	   r	   r
   Ú<module>   s
    