ó
    Í‘®iñ  ã                  ó´   • S SK Jr  S SKJr  S SKJrJr  SSKJrJ	r	J
r
  SSKJrJr  SSKJrJrJrJrJrJrJr  SSK
JrJrJr  / S	Qr\r\rSSS jjrSSS jjrg
)é    )Úannotations)Úcore)Ú_current_expected_placeÚ_get_paddle_placeé   )Úaccuracy_compareÚ	debuggingÚgrad_scaler)Ú
black_listÚ
white_list)Úamp_decorateÚ	amp_guardÚ	auto_castÚautocastÚdecorateÚget_autocast_dtypeÚis_autocast_enabled)Ú	AmpScalerÚ
GradScalerÚOptimizerState)	r   r   r   Úis_float16_supportedÚis_bfloat16_supportedr   r   Úget_autocast_cpu_dtypeÚget_autocast_gpu_dtypeNc                ó^   • U c
  [        5       O
[        U 5      n [        R                  " U 5      $ )aæ  
Determine whether the place supports float16 in the auto-mixed-precision training.

Args:
    device (str|None, optional): Specify the running device.
        It can be ``cpu``, ``gpu``, ``xpu``, ``gpu:x`` and ``xpu:x``,
        where ``x`` is the index of the GPUs or XPUs. if device is None, the device is the current device. Default: None.

Examples:

    .. code-block:: python

        >>> import paddle
        >>> paddle.amp.is_float16_supported() # True or False
        False
)r   r   r   r   ©Údevices    ÚS/var/www/html/banglarbhumi/venv/lib/python3.13/site-packages/paddle/amp/__init__.pyr   r   >   s1   € ð( ‰>ô 	 Ô!ä˜vÓ&ð ô ×$Ò$ VÓ,Ð,ó    c                ó^   • U c
  [        5       O
[        U 5      n [        R                  " U 5      $ )aç  
Determine whether the place supports bfloat16 in the auto-mixed-precision training.

Args:
    device (str|None, optional): Specify the running device.
        It can be ``cpu``, ``gpu``, ``xpu``, ``gpu:x`` and ``xpu:x``,
        where ``x`` is the index of the GPUs or XPUs. if device is None, the device is the current device. Default: None.

Examples:

    .. code-block:: python

        >>> import paddle
        >>> paddle.amp.is_bfloat16_supported() # True or False
        True
)r   r   r   r   r   s    r   r   r   Y   s1   € ð( ‰>ô 	 Ô!ä˜vÓ&ð ô ×%Ò% fÓ-Ð-r   )N)r   z
str | NoneÚreturnÚbool)Ú
__future__r   Úpaddle.baser   Úpaddle.base.frameworkr   r   Ú r   r	   r
   Ú	amp_listsr   r   r   r   r   r   r   r   r   r   r   r   Ú__all__r   r   r   r   © r   r   Ú<module>r*      sY   ðõ #å ÷÷
ñ ÷
÷÷ ñ ÷ñ ò
€ð ,Ð Ø+Ð ö-÷6.r   