From 661fe3062c91a0f2f1dea73994f0189e04e4e9b0 Mon Sep 17 00:00:00 2001 From: gfwm0502 <63550764+gfwm0502@users.noreply.github.com> Date: Fri, 5 Jun 2020 10:24:07 +0800 Subject: [PATCH] Modify documents of flags in advanced_guide (#2179) (#2189) test=develop As the title --- doc/fluid/advanced_guide/flags/flags_cn.rst | 13 ++++++++++++- doc/fluid/advanced_guide/flags/flags_en.rst | 11 +++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/doc/fluid/advanced_guide/flags/flags_cn.rst b/doc/fluid/advanced_guide/flags/flags_cn.rst index 6968eaddc..5d0d41472 100644 --- a/doc/fluid/advanced_guide/flags/flags_cn.rst +++ b/doc/fluid/advanced_guide/flags/flags_cn.rst @@ -2,11 +2,22 @@ 环境变量FLAGS ================== +调用说明 +---------- + +PaddlePaddle中的环境变量FLAGS支持两种设置方式。 + +- 通过export来设置环境变量,如 :code:`export FLAGS_eager_delete_tensor_gb = 1.0` 。 + +- 通过API::code:`get_flag` 和 :code:`set_flags` 来打印和设置环境变量FLAGS。API使用详情请参考 :ref:`cn_api_fluid_get_flags` 与 :ref:`cn_api_fluid_set_flags` 。 + + +环境变量FLAGS功能分类 +---------------------- .. toctree:: :maxdepth: 1 - cudnn_cn.rst data_cn.rst debug_cn.rst diff --git a/doc/fluid/advanced_guide/flags/flags_en.rst b/doc/fluid/advanced_guide/flags/flags_en.rst index 247c38f16..b24c551c7 100644 --- a/doc/fluid/advanced_guide/flags/flags_en.rst +++ b/doc/fluid/advanced_guide/flags/flags_en.rst @@ -2,6 +2,17 @@ FLAGS ================== +Usage +------ +These FLAGS in PaddlePaddle can be set in two ways. + +- Set the FLAGS through export. For example: :code:`export FLAGS_eager_delete_tensor_gb = 1.0` . + +- Through :code:`get_flags` and :code:`set_flags` to print and set the environment variables. For more information of using these API, please refer to :ref:`api_fluid_get_flags` and :ref:`api_fluid_get_flags` . + + +FLAGS Quick Search +------------------ .. toctree:: :maxdepth: 1 -- GitLab