diff --git a/docs/api/api_python/ops/mindspore.ops.AllReduce.rst b/docs/api/api_python/ops/mindspore.ops.AllReduce.rst index 4b36b597b6b..487b1af9567 100644 --- a/docs/api/api_python/ops/mindspore.ops.AllReduce.rst +++ b/docs/api/api_python/ops/mindspore.ops.AllReduce.rst @@ -9,7 +9,7 @@ 集合中的所有进程的Tensor必须具有相同的shape和格式。 参数: - - **op** (str) - 规约的具体操作,如"sum"、"max"、和"min"。默认值:ReduceOp.SUM。 + - **op** (str) - 规约的具体操作,如"sum"、"prod"、"max"、和"min"。默认值:ReduceOp.SUM。 - **group** (str) - 工作的通信组。默认值:"GlobalComm.WORLD_COMM_GROUP"(即Ascend平台为"hccl_world_group",GPU平台为"nccl_world_group" )。 输入: diff --git a/mindspore/python/mindspore/ops/operations/comm_ops.py b/mindspore/python/mindspore/ops/operations/comm_ops.py index 57e1f1d43be..b522bddf1ee 100644 --- a/mindspore/python/mindspore/ops/operations/comm_ops.py +++ b/mindspore/python/mindspore/ops/operations/comm_ops.py @@ -117,7 +117,7 @@ class AllReduce(Primitive): The tensors must have the same shape and format in all processes of the collection. Args: - op (str): Specifies an operation used for element-wise reductions, like sum, max, and min. + op (str): Specifies an operation used for element-wise reductions, like sum, prod, max, and min. On the CPU, only 'sum' is supported. Default: ReduceOp.SUM. group (str): The communication group to work on. Default: "GlobalComm.WORLD_COMM_GROUP".