
    [Th                         S SK r S SKJr  S SKJr  S SKr/ SQr " S S\R                  R                  R                  5      r	\" S\
S9S	 5       r\" S
\
S9SSS.S jj5       r\" S\
S9S 5       rg)    N)Any)
deprecated)autocast
custom_fwd
custom_bwdc                      ^  \ rS rSrSr\" S\S9S\R                  S4S\	S\R                  S\	4U 4S	 jjj5       rU 4S
 jrS\S\S\4U 4S jjrU 4S jrSrU =r$ )r      zSee :class:`torch.autocast`.

``torch.cuda.amp.autocast(args...)`` is deprecated. Please use ``torch.amp.autocast("cuda", args...)`` instead.
zk`torch.cuda.amp.autocast(args...)` is deprecated. Please use `torch.amp.autocast('cuda', args...)` instead.categoryTenableddtypecache_enabledc                    > [         R                  R                  5       (       a  Xl        SU l        X l        g [        TU ]  SXUS9  g )Ncuda)r   r   r   )torch_jit_internalis_scripting_enableddevice
fast_dtypesuper__init__)selfr   r   r   	__class__s       T/var/www/auris/envauris/lib/python3.13/site-packages/torch/cuda/amp/autocast_mode.pyr   autocast.__init__   sG     ++--#M DK#OG 	 	
    c                 j   > [         R                  R                  5       (       a  U $ [        TU ]  5       $ N)r   r   r   r   	__enter__)r   r   s    r   r    autocast.__enter__&   s+    ++--Kw ""r   exc_typeexc_valexc_tbc                 l   > [         R                  R                  5       (       a  g [        TU ]  XU5      $ r   )r   r   r   r   __exit__)r   r"   r#   r$   r   s       r   r&   autocast.__exit__,   s-    ++--w6::r   c                 l   > [         R                  R                  5       (       a  U$ [        TU ]  U5      $ r   )r   r   r   r   __call__)r   funcr   s     r   r)   autocast.__call__1   s-    ++--Kw%%r   )r   r   r   )__name__
__module____qualname____firstlineno____doc__r   FutureWarningr   float16boolr   r   r    r   r&   r)   __static_attributes____classcell__)r   s   @r   r   r      s    
 	D "]]"	

 {{
 	


#; ;s ;C ;
& &r   r   z`torch.cuda.amp.autocast_mode._cast(value, dtype)` is deprecated. Please use `torch.amp.autocast_mode._cast(value, 'cuda', dtype)` instead.r
   c                 X    [         R                  R                  R                  U SU5      $ )Nr   )r   ampautocast_mode_cast)valuer   s     r   r9   r9   8   s#     99""((>>r   z{`torch.cuda.amp.custom_fwd(args...)` is deprecated. Please use `torch.amp.custom_fwd(args..., device_type='cuda')` instead.)cast_inputsc                d    [         R                  " [        R                  R                  SS9" XS9$ )z
``torch.cuda.amp.custom_fwd(args...)`` is deprecated. Please use
``torch.amp.custom_fwd(args..., device_type='cuda')`` instead.
r   device_typefwdr;   )	functoolspartialr   r7   r   r?   s     r   r   r   A   s+     UYY11vF r   z{`torch.cuda.amp.custom_bwd(args...)` is deprecated. Please use `torch.amp.custom_bwd(args..., device_type='cuda')` instead.c                 h    [         R                  " [        R                  R                  SS9" U 5      $ )z
``torch.cuda.amp.custom_bwd(args...)`` is deprecated. Please use
``torch.amp.custom_bwd(args..., device_type='cuda')`` instead.
r   r=   )rA   rB   r   r7   r   )bwds    r   r   r   P   s&     UYY11vFsKKr   r   )rA   typingr   typing_extensionsr   r   __all__r7   r8   r   r1   r9   r   r    r   r   <module>rI      s      (  3(&uyy&&// (&X P
?
? N
 
 N
L
Lr   