Skip to content

Commit

Permalink
[docs] fix paddle.CUDAPlace Parameter error (PaddlePaddle#5261)
Browse files Browse the repository at this point in the history
* rm unnecessary pronouns

* Update basic_usage_cn.md

* rm Macos GPU docker

* Update macos-docker_en.md

* Update macos-docker.md

* rm unnecessary pronouns

* Update grammar_list_cn.md

* fix format

* Update case_analysis_cn.md

* add GPU architecture comparison table link

* Update windows-pip.md

* Update windows-pip_en.md

* Update linux-pip.md

* Update linux-pip_en.md

* fix format docs

* fix url lose

* [docs] fix paddle.CUDAPlace Parameter error

* Update CUDAPlace_cn.rst

* [docs] fix Synchronous English documentation

* Update take_along_axis_cn.rst

* [dosc] Supplementary index description:

* ipu_shard_guard_cn.rst

* set_ipu_shard_cn.rst

Modify note Format:

* mlu_places_cn.rst

* [docs] fix note、returns format

* fix put_along_axis_cn.rst returns format

* fix ipu_shard_guard_cn.rst note format

* fix mlu_places_cn.rst note format

* fix set_ipu_shard_cn.rst note format
  • Loading branch information
gouzil authored and sunzhongkai588 committed Nov 3, 2022
1 parent 7ddb947 commit 89b788b
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 20 deletions.
2 changes: 1 addition & 1 deletion docs/api/paddle/CUDAPlace_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ CUDAPlace
参数
::::::::::::

- **id** (int,可选) - GPU 的设备 ID。如果为 ``None``,则默认会使用 id 为 0 的设备。默认值为 ``None``
- **id** (int) - GPU 的设备 ID。

代码示例
::::::::::::
Expand Down
2 changes: 1 addition & 1 deletion docs/api/paddle/put_along_axis_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ put_along_axis
返回
:::::::::

- **out** (Tensor) - 输出 Tensor,indeces 矩阵选定的下标会被插入 value,与 ``arr`` 数据类型相同。
输出 Tensor,indeces 矩阵选定的下标会被插入 value,与 ``arr`` 数据类型相同。

代码示例
:::::::::
Expand Down
9 changes: 4 additions & 5 deletions docs/api/paddle/static/ipu_shard_guard_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,14 @@ ipu_shard_guard
对模型进行切分。用于指定 Op 在哪个 ipu 上进行计算以及模型被切分之后的计算顺序。

.. note::

仅支持当 enable_manual_shard=True,index 设置才有效。请参阅 :ref:`cn_api_fluid_IpuStrategy` 。
仅支持当 enable_pipelining=True,stage 设置才有效。请参阅 :ref:`cn_api_fluid_IpuStrategy` 。
仅支持当 enable_manual_shard=True,才能将 index 设置为非-1 的值。请参阅 :ref:`cn_api_fluid_IpuStrategy` 。
仅支持当 enable_pipelining=True,才能将 stage 设置为非-1 的值。请参阅 :ref:`cn_api_fluid_IpuStrategy` 。
一个 index 支持对应 None stage 或一个 stage,一个 stage 仅支持对应一个新的 index 或者一个重复的 index。

参数
:::::::::
- **index** (int,可选) - 指定 Op 在哪个 ipu 上计算,(如‘0, 1, 2, 3’),默认值-1,表示 Op 没有指定 ipu。
- **stage** (int,可选) 指定被切分的模型的计算顺序,(如‘0, 1, 2, 3’),按照数值大小顺序对被切分的模型进行计算,默认值-1,表示没有数据流水计算顺序并按照计算图顺序计算 Op。
- **index** (int,可选) - 指定 Op 在哪个 ipu 上计算,(如‘0, 1, 2, 3’),默认值-1,表示 Op 仅在 ipu 0 上运行
- **stage** (int,可选) - 指定被切分的模型的计算顺序,(如‘0, 1, 2, 3’),按照数值大小顺序对被切分的模型进行计算,默认值-1,表示没有数据流水计算顺序并按照计算图顺序计算 Op。

返回
:::::::::
Expand Down
12 changes: 6 additions & 6 deletions docs/api/paddle/static/mlu_places_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@ mlu_places

.. py:function:: paddle.static.mlu_places(device_ids=None)
.. note::
多卡任务请先使用 FLAGS_selected_mlus 环境变量设置可见的 MLU 设备。

该接口根据 ``device_ids`` 创建一个或多个 ``paddle.device.MLUPlace`` 对象,并返回所创建的对象列表。

如果 ``device_ids`` 为 ``None``,则首先检查 ``FLAGS_selected_mlus`` 标志
如果 ``device_ids`` 为 ``None``,则首先检查 ``FLAGS_selected_mlus`` 环境变量
例如:``FLAGS_selected_mlus=0,1,2``,则返回的列表将为 ``[paddle.device.MLUPlace(0), paddle.device.MLUPlace(1), paddle.device.MLUPlace(2)]``。
如果未设置标志 ``FLAGS_selected_mlus``,则返回所有可见的 MLU places。

如果未设置环境变量 ``FLAGS_selected_mlus``,则返回所有可见的 MLU 位置。

如果 ``device_ids`` 不是 ``None``,它应该是使用的 MLU 设备 ID 的列表或元组。
例如:``device_id=[0,1,2]``,返回的列表将是 ``[paddle.device.MLUPlace(0), paddle.device.MLUPlace(1), paddle.device.MLUPlace(2)]``。

.. note::
多卡任务请先使用 FLAGS_selected_mlus 环境变量设置可见的 MLU 设备。

参数
:::::::::
- **device_ids** (list(int)|tuple(int),可选) - MLU 的设备 ID 列表或元组。默认值为 ``None``。
Expand Down
11 changes: 5 additions & 6 deletions docs/api/paddle/static/set_ipu_shard_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,19 @@ set_ipu_shard
通过设置输入的函数或计算层内每个算子的流水线属性实现对模型的切分。

.. note::

仅支持当 enable_manual_shard=True,index 设置才有效。请参阅 :ref:`cn_api_fluid_IpuStrategy` 。
仅支持当 enable_pipelining=True,stage 设置才有效。请参阅 :ref:`cn_api_fluid_IpuStrategy` 。
仅支持当 enable_manual_shard=True,才能将 index 设置为非-1 的值。请参阅 :ref:`cn_api_fluid_IpuStrategy` 。
仅支持当 enable_pipelining=True,才能将 stage 设置为非-1 的值。请参阅 :ref:`cn_api_fluid_IpuStrategy` 。
一个 index 支持对应 None stage 或一个 stage,一个 stage 仅支持对应一个新的 index 或者一个重复的 index。

参数
:::::::::
- **call_func** (Layer|function) - 静态图下的函数或者计算层。
- **index** (int,可选) - 指定 Op 在哪个 ipu 上计算,(如‘0, 1, 2, 3’),默认值-1,表示不指定 ipu。
- **stage** (int,可选) 指定被切分的模型的计算顺序,(如‘0, 1, 2, 3’),按照数值大小顺序对被切分的模型进行计算,默认值-1,表示没有数据流水计算顺序并按照计算图顺序计算 Op。
- **index** (int,可选) - 指定 Op 在哪个 ipu 上计算,(如‘0, 1, 2, 3’),默认值-1,表示 Op 仅在 ipu 0 上运行
- **stage** (int,可选) - 指定被切分的模型的计算顺序,(如‘0, 1, 2, 3’),按照数值大小顺序对被切分的模型进行计算,默认值-1,表示没有数据流水计算顺序并按照计算图顺序计算 Op。

返回
:::::::::
包装后的调用函数

代码示例
::::::::::
Expand Down
2 changes: 1 addition & 1 deletion docs/api/paddle/take_along_axis_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ take_along_axis
返回
:::::::::

- **out** (Tensor) - 输出 Tensor,包含 indeces 矩阵选定的元素,与 ``arr`` 数据类型相同。
输出 Tensor,包含 indeces 矩阵选定的元素,与 ``arr`` 数据类型相同。

代码示例
:::::::::
Expand Down

0 comments on commit 89b788b

Please sign in to comment.