Ë
    g^(h  ã                   óî   — d dl Z d dlmZ d dlmZ d dlZg d¢Z 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_bwdc                   ó¦   ‡ — e Zd ZdZ ede¬«      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.
    zk`torch.cuda.amp.autocast(args...)` is deprecated. Please use `torch.amp.autocast('cuda', args...)` instead.©ÚcategoryTÚenabledÚdtypeÚcache_enabledc                 ó”   •— t         j                  j                  «       r|| _        d| _        || _        y t        ‰| �  d|||¬«       y )NÚcuda)r   r   r   )ÚtorchÚ_jit_internalÚis_scriptingÚ_enabledÚdeviceÚ
fast_dtypeÚsuperÚ__init__)Úselfr   r   r   Ú	__class__s       €úZ/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/torch/cuda/amp/autocast_mode.pyr   zautocast.__init__   sJ   ø€ ô ×Ñ×+Ñ+Ô-Ø#ˆDŒMØ ˆDŒKØ#ˆDŒOØÜ‰ÑØ˜G¨5Àð 	õ 	
ó    c                 ó`   •— t         j                  j                  «       r| S t        ‰| �  «       S ©N)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__1   s*   ø€ Ü×Ñ×+Ñ+Ô-ØˆKÜ‰wÑ Ó%Ð%r   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   ÚFutureWarningr   Úfloat16Úboolr   r   r   r   r#   r%   Ú__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   — t         j                  j                  j                  | d|«      S )Nr   )r   ÚampÚautocast_modeÚ_cast)Úvaluer   s     r   r2   r2   8   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©Úfwdr4   )Ú	functoolsÚpartialr   r0   r   r8   s     r   r   r   A   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   r6   )r:   r;   r   r0   r   )Úbwds    r   r   r   P   s)   € ð GŒ9×ÑœUŸY™Y×1Ñ1¸vÔFÀsÓKÐKr   r   )r:   Útypingr   Útyping_extensionsr   r   Ú__all__r0   r1   r   r+   r2   r   r   © r   r   ú<module>rB      s¤   ðã Ý Ý (ã ò 3€ô(&ˆu�y‰y×&Ñ&×/Ñ/ô (&ñX ðPàôñ
?óð
?ñ ðNàôð
¨ó óð
ñ ðNàôñ
Lóñ
Lr   