
    JTh                         % S SK Jr  S SKrS SKJrJrJr  S SKJr  S SK	J
r
  S SKrSq\\R                     \S'   \R                  " S5      S 5       r " S	 S
\5      rS rS rg)    )OptionalN)TorchFunctionMode	_pop_mode
_push_modecontext_decorator)_len_torch_function_stackCURRENT_DEVICE   c                  B   1 [         R                  i[         R                  i[         R                  i[         R                  i[         R
                  i[         R                  i[         R                  i[         R                  i[         R                  i[         R                  R                  i[         R                  R                  i[         R                  i[         R                  i[         R                  i[         R                   i[         R"                  i[         R$                  i[         R&                  i[         R(                  R*                  i[         R
                  i[         R,                  i[         R.                  i[         R0                  i[         R2                  i[         R4                  i[         R6                  i[         R8                  i[         R:                  i[         R<                  i[         R>                  i[         R@                  i[         RB                  i[         RD                  i[         RF                  i[         RH                  i[         RJ                  i[         RL                  i[         RN                  i[         RP                  i[         RJ                  i$ N))torchemptyempty_permutedempty_stridedempty_quantizedonesarangebartlett_windowblackman_windoweyefftfftfreqrfftfreqfullfillhamming_windowhann_windowkaiser_windowlinspacelogspacenestednested_tensorrandrandnrandintrandpermrangesparse_coo_tensorsparse_compressed_tensorsparse_csr_tensorsparse_csc_tensorsparse_bsr_tensorsparse_bsc_tensortril_indicestriu_indicesvanderzerosasarraytensor	as_tensorscalar_tensor     K/var/www/auris/envauris/lib/python3.13/site-packages/torch/utils/_device.py_device_constructorsr:      s   -- 	- 		-
 	- 	

- 	- 	- 	- 			- 			- 			- 	

- 	

- 	-  	!-" 	#-$ 	%-& 	'-( 	"")-. 	

/-0 	

1-2 	3-4 	5-6 	7-8 	9-: 	;-< 	&&=-> 	?-@ 	A-B 	C-D 	E-F 	G-H 	I-J 	K-L 	M-N 	O-R 	S-T 	U-V 	W-X 	Y- -r8   c                   0    \ rS rSrS rS rS rSS jrSrg)	DeviceContext=   c                 :    [         R                  " U5      U l        g r   )r   device)selfr?   s     r9   __init__DeviceContext.__init__>   s    ll6*r8   c                     [         U l        U R                  q [        [	        5       5       Vs/ s H  n[        5       PM     nn[        U 5        [        U5       H  n[        U5        M     g s  snf r   )r
   
old_devicer?   r(   r	   r   r   reversed)r@   _	cur_stackmodes       r9   	__enter__DeviceContext.__enter__A   sZ    (
 +00I0K*LM*LQY[*L	M4Y'Dt (	 Ns   A,c                 V   U R                   q/ n[        [        5       S-
  5       H5  n[	        5       n[        U[        5      (       a   eUR                  U5        M7     [        5       S:  a!  [	        5       n[        U[        5      (       d   e[        U5       H  n[        U5        M     g )Nr   r   )
rD   r
   r(   r	   r   
isinstancer<   appendrE   r   )r@   exc_typeexc_valexc_tbrG   rF   rH   s          r9   __exit__DeviceContext.__exit__Q   s    	 02Q67A;D!$6666T" 8
 %&*;DdM2222Y'Dt (r8   Nc                     U=(       d    0 nU[        5       ;   a!  UR                  S5      c  U R                  US'   U" U0 UD6$ )Nr?   )r:   getr?   )r@   functypesargskwargss        r9   __torch_function__ DeviceContext.__torch_function__d   sC    2'))fjj.B.J#{{F8T$V$$r8   )r?   rD   )r7   N)	__name__
__module____qualname____firstlineno__rA   rI   rQ   rY   __static_attributes__r7   r8   r9   r<   r<   =   s    + &%r8   r<   c                 $   ^  [        U 4S jU5      $ )Nc                     > T $ r   r7   r?   s   r9   <lambda>"device_decorator.<locals>.<lambda>l   s    Vr8   r   )r?   rU   s   ` r9   device_decoratorre   k   s    ^T22r8   c                    ^  U 4S j$ )z
Set the default device inside of the wrapped function by decorating it with this function.

If you would like to use this as a context manager, use device as a
context manager directly, e.g., ``with torch.device(device)``.
c                 D   > [        [        R                  " T5      U 5      $ r   )re   r   r?   )rU   r?   s    r9   rc   set_device.<locals>.<lambda>u   s    (f)=tDr8   r7   rb   s   `r9   
set_deviceri   n   s     EDr8   )typingr   r   torch.overridesr   r   r   torch.utils._contextlibr   torch._Cr	   	functoolsr
   r?   __annotations__	lru_cacher:   r<   re   ri   r7   r8   r9   <module>rq      sd      D D 5 . )-& -
Q. .b+%% +%\3Er8   