§
    ŠŠtj•  ã                   ó*  — 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dS )é    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                 óF   •— t          ¦   «                              | ¦  «        S ©N)ÚsuperÚ__new__)Úclsr   r   r   Ú	__class__s       €úZ/var/www/html/CA-Chatbot/venv/lib/python3.11/site-packages/torch/cuda/amp/autocast_mode.pyr   zautocast.__new__    s   ø€ õ ‘7”7—?’? 3Ñ'Ô'Ð'ó    c                 ó   — d S r   © )r   s    r   Ú__init_subclass__zautocast.__init_subclass__(   s   € ØˆDr   c                 ó¼   •— t           j                             ¦   «         r|| _        d| _        || _        d S t          ¦   «                              d|||¬¦  «         d S )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ØˆFÝ‰Œ×ÒØ˜G¨5Àð 	ñ 	
ô 	
ð 	
ð 	
ð 	
r   c                 ó„   •— t           j                             ¦   «         r| S t          ¦   «                              ¦   «         S r   )r   r   r   r   Ú	__enter__)r#   r   s    €r   r%   zautocast.__enter__:   s5   ø€ ÝÔ×+Ò+Ñ-Ô-ð 	ØˆKÝ‰wŒw× Ò Ñ"Ô"Ð"r   Úexc_typeÚexc_valÚexc_tbc                 óŠ   •— t           j                             ¦   «         rd S t          ¦   «                              |||¦  «        S r   )r   r   r   r   Ú__exit__)r#   r&   r'   r(   r   s       €r   r*   zautocast.__exit__@   s;   ø€ ÝÔ×+Ò+Ñ-Ô-ð 	ØˆFÝ‰wŒw×Ò ¨'°6Ñ:Ô:Ð:r   c                 ó†   •— t           j                             ¦   «         r|S t          ¦   «                              |¦  «        S r   )r   r   r   r   Ú__call__)r#   Úfuncr   s     €r   r,   zautocast.__call__E   s7   ø€ ÝÔ×+Ò+Ñ-Ô-ð 	ØˆKÝ‰wŒw×Ò Ñ%Ô%Ð%r   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__ÚsysÚversion_infor   Úfloat16Úboolr   r   r   r"   r%   r   r*   r,   Ú__classcell__)r   s   @r   r   r      sI  ø€ € € € € ðð ð Ô˜'Ò!Ð!ð !Ø!&¤Ø"&ð		(ð 	(àð	(ð ”;ð	(ð  ð		(ð 	(ð 	(ð 	(ð 	(ð 	(ð	ð 	ð 	ð
 Ø"œ]Ø"ð	
ð 
àð
ð Œ{ð
ð ð	
ð 
ð 
ð 
ð 
ð 
ð#ð #ð #ð #ð #ð; ð ;¨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                 óN   — t           j        j                             | d|¦  «        S )Nr   )r   ÚampÚautocast_modeÚ_cast)Úvaluer   s     r   r:   r:   L   s!   € õ Œ9Ô"×(Ò(¨°¸Ñ>Ô>Ð>r   z{`torch.cuda.amp.custom_fwd(args...)` is deprecated. Please use `torch.amp.custom_fwd(args..., device_type='cuda')` instead.)Úcast_inputsc                ób   —  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   s8   € ð G�9Ô�UœYÔ1¸vÐFÑFÔFØ˜[ðñ ô ð r   z{`torch.cuda.amp.custom_bwd(args...)` is deprecated. Please use `torch.amp.custom_bwd(args..., device_type='cuda')` instead.c                 ó^   —  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Ô1¸vÐFÑFÔFÀsÑKÔKÐKr   r   )rB   r2   Útypingr   Útyping_extensionsr   r   Ú__all__ÚFutureWarningr8   r9   r   r:   r   r   r   r   r   ú<module>rJ      sx  ðà Ð Ð Ð Ø 
€
€
€
Ø Ð Ð Ð Ð Ð Ø (Ð (Ð (Ð (Ð (Ð (à €€€ð 3Ð
2Ð
2€ð €ð@àðñ ô ð
6&ð 6&ð 6&ð 6&ð 6&ˆuŒyÔ&Ô/ñ 6&ô 6&ñô ð
6&ðt €ðPàðñ ô ð
?ð ?ñô ð
?ð €ðNàðñ ô ð
¨ð ð ð ð ñô ð
ð €ðNàðñ ô ð
Lð Lñô ð
Lð Lð Lr   