diff --git a/docs/api/paddle/get_autocast_cpu_dtype_cn.rst b/docs/api/paddle/get_autocast_cpu_dtype_cn.rst new file mode 100644 index 00000000000..8e51f2abc8c --- /dev/null +++ b/docs/api/paddle/get_autocast_cpu_dtype_cn.rst @@ -0,0 +1,8 @@ +.. _cn_api_paddle_get_autocast_cpu_dtype: + +get_autocast_cpu_dtype +------------------------------- + +.. py:function:: paddle.get_autocast_cpu_dtype(device_type=None) + +``get_autocast_dtype`` 的别名,请参考 :ref:`cn_api_paddle_get_autocast_dtype`。 diff --git a/docs/api/paddle/get_autocast_dtype_cn.rst b/docs/api/paddle/get_autocast_dtype_cn.rst new file mode 100644 index 00000000000..a1f7505f1db --- /dev/null +++ b/docs/api/paddle/get_autocast_dtype_cn.rst @@ -0,0 +1,27 @@ +.. _cn_api_paddle_get_autocast_dtype: + +get_autocast_dtype +------------------------------- + +.. py:function:: paddle.get_autocast_dtype(device_type=None) + + + + +获取当前上下文中自动混合精度的默认数据类型。 + + +参数 +:::::::::::: + + - **device_type** (str, 可选) - 设备类型,默认为 None。注意:在 PaddlePaddle 中所有设备共享同一套自动混合精度配置,实际返回值与设备类型无关。 + +返回 +:::::::::::: +字符串,当前上下文中自动混合精度的默认数据类型。 + + +代码示例 +:::::::::::: + +COPY-FROM: paddle.amp.get_autocast_dtype diff --git a/docs/api/paddle/get_autocast_gpu_dtype_cn.rst b/docs/api/paddle/get_autocast_gpu_dtype_cn.rst new file mode 100644 index 00000000000..b8f48c92539 --- /dev/null +++ b/docs/api/paddle/get_autocast_gpu_dtype_cn.rst @@ -0,0 +1,8 @@ +.. _cn_api_paddle_get_autocast_gpu_dtype: + +get_autocast_gpu_dtype +------------------------------- + +.. py:function:: paddle.get_autocast_gpu_dtype(device_type=None) + +``get_autocast_dtype`` 的别名,请参考 :ref:`cn_api_paddle_get_autocast_dtype`。 diff --git a/docs/api/paddle/is_autocast_enabled_cn.rst b/docs/api/paddle/is_autocast_enabled_cn.rst new file mode 100644 index 00000000000..66a3a58751a --- /dev/null +++ b/docs/api/paddle/is_autocast_enabled_cn.rst @@ -0,0 +1,27 @@ +.. _cn_api_paddle_is_autocast_enabled: + +is_autocast_enabled +------------------------------- + +.. py:function:: paddle.is_autocast_enabled(device_type=None) + + + + +获取当前上下文中是否启用了自动混合精度。 + + +参数 +:::::::::::: + + - **device_type** (str, 可选) - 设备类型,默认为 None。注意:在 PaddlePaddle 中所有设备共享同一套自动混合精度配置,实际返回值与设备类型无关。 + +返回 +:::::::::::: +布尔值,如果当前上下文中启用了自动混合精度,则返回 ``True``,否则返回 ``False``。 + + +代码示例 +:::::::::::: + +COPY-FROM: paddle.amp.is_autocast_enabled