You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

mindspore.ops.AllGather.rst 1.1 kB

1234567891011121314151617181920212223242526
  1. mindspore.ops.AllGather
  2. ========================
  3. .. py:class:: mindspore.ops.AllGather(group=GlobalComm.WORLD_COMM_GROUP)
  4. 在指定的通信组中汇聚Tensor。
  5. .. note::
  6. 集合中所有进程的Tensor必须具有相同的shape和格式。用户在使用之前需要设置环境变量,运行下面的例子。获取详情请点击官方网站 `MindSpore <https://www.mindspore.cn/docs/api/zh-CN/master/api_python/mindspore.ops.html#communication-operators>`_ 。
  7. **参数:**
  8. - **group** (str) - 工作的通信组,默认值:"GlobalComm.WORLD_COMM_GROUP"(即Ascend平台为"hccl_world_group",GPU平台为"nccl_world_group" )。
  9. **输入:**
  10. - **input_x** (Tensor) - AllGather的输入,shape为 :math:`(x_1, x_2, ..., x_R)` 的Tensor。
  11. **输出:**
  12. Tensor,如果组中的device数量为N,则输出的shape为 :math:`(N, x_1, x_2, ..., x_R)` 。
  13. **异常:**
  14. - **TypeError** - `group` 不是str。
  15. - **ValueError** - 调用进程的rank id大于本通信组的rank大小。