
    ȅi                         S SK r S SKrS SKJr  S SKJr  S SKr/ SQr\" S\S9 " S S\R                  R                  R                  5      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_bwdzk`torch.cuda.amp.autocast(args...)` is deprecated. Please use `torch.amp.autocast('cuda', args...)` instead.)categoryc                     ^  \ rS rSrSr\R                  S:  a*  S\R                  S4S\	S\R                  S\	4U 4S jjjrS	 rS\R                  S4S\	S\R                  S\	4U 4S
 jjj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.
)   r
   Tenableddtypecache_enabledc                 "   > [         TU ]  U 5      $ N)super__new__)clsr   r   r   	__class__s       V/home/james-whalen/.local/lib/python3.13/site-packages/torch/cuda/amp/autocast_mode.pyr   autocast.__new__    s     7?3''    c                     g r    )r   s    r   __init_subclass__autocast.__init_subclass__(   s    r   c                    > [         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_dtyper   __init__)selfr   r   r   r   s       r   r$   autocast.__init__+   sG     ++--#M DK#OG 	 	
r   c                 j   > [         R                  R                  5       (       a  U $ [        TU ]  5       $ r   )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   r1   autocast.__call__E   s-    ++--Kw%%r   )r!   r"   r#   )__name__
__module____qualname____firstlineno____doc__sysversion_infor   float16boolr   r   r   r$   r(   r   r.   r1   __static_attributes____classcell__)r   s   @r   r   r      s     '! !!&"&		(	( ;;	(  		( 	(	
 "]]"	

 {{
 	
 
#; ;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.c                 X    [         R                  R                  R                  U SU5      $ )Nr   )r   ampautocast_mode_cast)valuer   s     r   rB   rB   L   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fwdrD   )	functoolspartialr   r@   r   rH   s     r   r   r   U   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   rF   )rJ   rK   r   r@   r   )bwds    r   r   r   d   s&     UYY11vFsKKr   r   )rJ   r9   typingr   typing_extensionsr   r   __all__FutureWarningr@   rA   r   rB   r   r   r   r   r   <module>rR      s     
  (  3 @
6&uyy&&// 6&
6&t P
?
? N
 
 N
L
Lr   