Ë
    M²j•  ã                   ó  — d dl Z d dlZd dlmZ d dlmZ d dlZg d¢Z ede¬«       G d„ dej                  j                  j                  «      «       Z ed	e¬«      d
„ «       Z ede¬«      dddœd„«       Z ede¬«      d„ «       Zy)é    N)ÚAny)Ú
deprecated)ÚautocastÚ
custom_fwdÚ
custom_bwdzk`torch.cuda.amp.autocast(args...)` is deprecated. Please use `torch.amp.autocast('cuda', args...)` instead.)Úcategoryc                   óø   ‡ — e Zd ZdZej
                  dk  r'dej                  dfdedej                  defˆ fd„Z
d„ Zdej                  dfdedej                  defˆ fd	„Zˆ fd
„Zdededefˆ fd„Zˆ fd„Zˆ xZS )r   z–See :class:`torch.autocast`.

    ``torch.cuda.amp.autocast(args...)`` is deprecated. Please use ``torch.amp.autocast("cuda", args...)`` instead.
    )é   é   TÚenabledÚdtypeÚcache_enabledc                 ó"   •— t         ‰| �  | «      S ©N)ÚsuperÚ__new__)Úclsr   r   r   Ú	__class__s       €ú[/var/www/html/ia-enhanced/venv/lib/python3.12/site-packages/torch/cuda/amp/autocast_mode.pyr   zautocast.__new__    s   ø€ ô ‘7‘? 3Ó'Ð'ó    c                  ó   — y r   © )r   s    r   Ú__init_subclass__zautocast.__init_subclass__(   s   € Ør   c                 ó”   •— t         j                  j                  «       r|| _        d| _        || _        y t        ‰| �  d|||¬«       y )NÚcuda)r   r   r   )ÚtorchÚ_jit_internalÚis_scriptingÚ_enabledÚdeviceÚ
fast_dtyper   Ú__init__)Úselfr   r   r   r   s       €r   r"   zautocast.__init__+   sJ   ø€ ô ×Ñ×+Ñ+Ô-Ø#ˆDŒMØ ˆDŒKØ#ˆDŒOØÜ‰ÑØ˜G¨5Àð 	õ 	
r   c                 ó`   •— t         j                  j                  «       r| S t        ‰| �  «       S r   )r   r   r   r   Ú	__enter__)r#   r   s    €r   r%   zautocast.__enter__:   s(   ø€ Ü×Ñ×+Ñ+Ô-ØˆKÜ‰wÑ Ó"Ð"r   Úexc_typeÚexc_valÚexc_tbc                 ód   •— t         j                  j                  «       ry t        ‰| �  |||«      S r   )r   r   r   r   Ú__exit__)r#   r&   r'   r(   r   s       €r   r*   zautocast.__exit__@   s,   ø€ Ü×Ñ×+Ñ+Ô-ØÜ‰wÑ ¨'°6Ó:Ð:r   c                 ób   •— t         j                  j                  «       r|S t        ‰| �  |«      S r   )r   r   r   r   Ú__call__)r#   Úfuncr   s     €r   r,   zautocast.__call__E   s*   ø€ Ü×Ñ×+Ñ+Ô-ØˆKÜ‰wÑ Ó%Ð%r   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__ÚsysÚversion_infor   Úfloat16Úboolr   r   r   r"   r%   r   r*   r,   Ú__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   — t         j                  j                  j                  | d|«      S )Nr   )r   ÚampÚautocast_modeÚ_cast)Úvaluer   s     r   r:   r:   L   s#   € ô �9‰9×"Ñ"×(Ñ(¨°¸Ó>Ð>r   z{`torch.cuda.amp.custom_fwd(args...)` is deprecated. Please use `torch.amp.custom_fwd(args..., device_type='cuda')` instead.)Úcast_inputsc                óp   —  t        j                  t        j                  j                  d¬«      | |¬«      S )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   r8   r   r@   s     r   r   r   U   s0   € ð GŒ9×ÑœUŸY™Y×1Ñ1¸vÔFØ˜[ôð r   z{`torch.cuda.amp.custom_bwd(args...)` is deprecated. Please use `torch.amp.custom_bwd(args..., device_type='cuda')` instead.c                 ól   —  t        j                  t        j                  j                  d¬«      | «      S )z�
    ``torch.cuda.amp.custom_bwd(args...)`` is deprecated. Please use
    ``torch.amp.custom_bwd(args..., device_type='cuda')`` instead.
    r   r>   )rB   rC   r   r8   r   )Úbwds    r   r   r   d   s)   € ð GŒ9×ÑœUŸY™Y×1Ñ1¸vÔFÀsÓKÐKr   r   )rB   r2   Útypingr   Útyping_extensionsr   r   Ú__all__ÚFutureWarningr8   r9   r   r:   r   r   r   r   r   ú<module>rJ      sÄ   ðã Û 
Ý Ý (ã ò 3€ñ ð@àôô
6&ˆu�y‰y×&Ñ&×/Ñ/ó 6&óð
6&ñt ðPàôñ
?óð
?ñ ðNàôð
¨ó óð
ñ ðNàôñ
Lóñ
Lr   