From b9cf88e79449c1276878216c984924cf741da3fc Mon Sep 17 00:00:00 2001 From: cclworkaccount <8266062+cclworkaccount@user.noreply.gitee.com> Date: Sat, 28 Nov 2020 14:55:30 +0800 Subject: [PATCH 01/13] update ge/common/types.cc. --- ge/common/types.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/ge/common/types.cc b/ge/common/types.cc index d56cb5ed..54dc769f 100644 --- a/ge/common/types.cc +++ b/ge/common/types.cc @@ -382,6 +382,7 @@ REGISTER_OPTYPE_DEFINE(HCOMBROADCAST, "HcomBroadcast"); REGISTER_OPTYPE_DEFINE(HCOMALLGATHER, "HcomAllGather"); REGISTER_OPTYPE_DEFINE(HCOMALLREDUCE, "HcomAllReduce"); REGISTER_OPTYPE_DEFINE(HCOMREDUCESCATTER, "HcomReduceScatter"); +REGISTER_OPTYPE_DEFINE(HCOMREDUCE, "HcomReduce"); REGISTER_OPTYPE_DEFINE(HCOMSEND, "HcomSend"); REGISTER_OPTYPE_DEFINE(HCOMRECEIVE, "HcomReceive"); REGISTER_OPTYPE_DEFINE(HCOMREMOTEREAD, "HcomRemoteRead"); From 6d3bd4dc40a705efedb3c75c41cb28c45ef54633 Mon Sep 17 00:00:00 2001 From: cclworkaccount <8266062+cclworkaccount@user.noreply.gitee.com> Date: Sat, 28 Nov 2020 14:56:55 +0800 Subject: [PATCH 02/13] update ge/graph/build/stream_allocator.cc. --- ge/graph/build/stream_allocator.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ge/graph/build/stream_allocator.cc b/ge/graph/build/stream_allocator.cc index 2f32eb73..4378f71b 100644 --- a/ge/graph/build/stream_allocator.cc +++ b/ge/graph/build/stream_allocator.cc @@ -49,7 +49,7 @@ inline bool HasContinuousStreamLabel(const ge::OpDescPtr &op_desc, std::string & } bool IsHcclOp(const string &op_type) { - const set hccl_op_types({ge::HCOMBROADCAST, ge::HCOMALLGATHER, ge::HCOMALLREDUCE, ge::HCOMREDUCESCATTER}); + const set hccl_op_types({ge::HCOMBROADCAST, ge::HCOMALLGATHER, ge::HCOMALLREDUCE, ge::HCOMREDUCESCATTER, ge::HCOMREDUCE}); return hccl_op_types.find(op_type) != hccl_op_types.end(); } } // namespace From 4b323bf043bf54a60a0a5d9977539dcf7c40167b Mon Sep 17 00:00:00 2001 From: cclworkaccount Date: Tue, 1 Dec 2020 14:19:46 +0800 Subject: [PATCH 03/13] update ge/graph/build/stream_allocator.cc. --- ge/graph/build/stream_allocator.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ge/graph/build/stream_allocator.cc b/ge/graph/build/stream_allocator.cc index 4378f71b..bbbc138c 100644 --- a/ge/graph/build/stream_allocator.cc +++ b/ge/graph/build/stream_allocator.cc @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - +, #include "graph/build/stream_allocator.h" #include #include From d4a1d2e23f95487e862102125320568154ca0edb Mon Sep 17 00:00:00 2001 From: cclworkaccount Date: Tue, 1 Dec 2020 14:42:04 +0800 Subject: [PATCH 04/13] update ge/graph/load/new_model_manager/task_info/hccl_task_info.cc. --- ge/graph/load/new_model_manager/task_info/hccl_task_info.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ge/graph/load/new_model_manager/task_info/hccl_task_info.cc b/ge/graph/load/new_model_manager/task_info/hccl_task_info.cc index 6679c980..b09a4fce 100644 --- a/ge/graph/load/new_model_manager/task_info/hccl_task_info.cc +++ b/ge/graph/load/new_model_manager/task_info/hccl_task_info.cc @@ -279,7 +279,7 @@ Status HcclTaskInfo::SetAddrs(const std::shared_ptr &op_desc, output_data_addr = output_data_addrs_.empty() ? nullptr : output_data_addrs_[i]; } kernel_hccl_infos[i].inputDataAddr = input_data_addr; - if (hccl_type == HCOMALLGATHER || hccl_type == HCOMRECEIVE || hccl_type == HVDCALLBACKALLGATHER) { + if (hccl_type == HCOMALLGATHER || hccl_type == HCOMRECEIVE || hccl_type == HVDCALLBACKALLGATHER || hccl_type == HCOMREDUCE) { kernel_hccl_infos[i].outputDataAddr = output_data_addr; } else if (hccl_type == HCOMALLREDUCE || hccl_type == HCOMREDUCESCATTER || hccl_type == HVDCALLBACKALLREDUCE) { GE_CHK_STATUS_RET(HcomOmeUtil::GetHcclOperationType(op_desc, op_type), From b29e1d5017416eb8d885f3685d8eabaa33efbc4c Mon Sep 17 00:00:00 2001 From: cclworkaccount Date: Tue, 1 Dec 2020 14:43:37 +0800 Subject: [PATCH 05/13] update ge/graph/manager/util/hcom_util.cc. --- ge/graph/manager/util/hcom_util.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ge/graph/manager/util/hcom_util.cc b/ge/graph/manager/util/hcom_util.cc index d865b40e..ae4c5838 100644 --- a/ge/graph/manager/util/hcom_util.cc +++ b/ge/graph/manager/util/hcom_util.cc @@ -263,7 +263,7 @@ Status HcomOmeUtil::GetHcclRootId(const ge::ConstOpDescPtr &op_desc, int64_t &ro Status HcomOmeUtil::GetAllRootId(const ge::ConstOpDescPtr &op_desc, std::vector &kernel_hccl_infos) { GE_CHECK_NOTNULL(op_desc); - if (op_desc->GetType() == HCOMBROADCAST || op_desc->GetType() == HVDCALLBACKBROADCAST) { + if (op_desc->GetType() == HCOMBROADCAST || op_desc->GetType() == HVDCALLBACKBROADCAST || op_desc->GetType() == HCOMREDUCE) { GELOGI("GetAllRootId Node[%s] opType[%s] get hccl rootId.", op_desc->GetName().c_str(), op_desc->GetType().c_str()); int64_t root_id = 0; Status dmrt = GetHcclRootId(op_desc, root_id); @@ -281,7 +281,7 @@ Status HcomOmeUtil::GetAllRootId(const ge::ConstOpDescPtr &op_desc, bool HcomOmeUtil::IsHCOMOp(const string &op_type) { return (op_type == HCOMALLREDUCE) || (op_type == HCOMALLGATHER) || (op_type == HCOMBROADCAST) || - (op_type == HCOMSEND) || (op_type == HCOMRECEIVE) || (op_type == HCOMREDUCESCATTER); + (op_type == HCOMSEND) || (op_type == HCOMRECEIVE) || (op_type == HCOMREDUCESCATTER || op_desc->GetType() == HCOMREDUCE); } bool HcomOmeUtil::IsHorovodOp(const string &op_type) { From cbe19ed8d6ed373b96a2300f7b980044dc00a879 Mon Sep 17 00:00:00 2001 From: cclworkaccount Date: Tue, 1 Dec 2020 14:44:56 +0800 Subject: [PATCH 06/13] update ge/graph/optimize/mem_rw_conflict_optimize.cc. --- ge/graph/optimize/mem_rw_conflict_optimize.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ge/graph/optimize/mem_rw_conflict_optimize.cc b/ge/graph/optimize/mem_rw_conflict_optimize.cc index 8d8e48ad..e0b4b52c 100644 --- a/ge/graph/optimize/mem_rw_conflict_optimize.cc +++ b/ge/graph/optimize/mem_rw_conflict_optimize.cc @@ -234,7 +234,7 @@ InputRWType GetSingleNodeInputRWTypeByIndex(const Node &node, uint32_t index) { return InputRWType::kInvalidRWType; } if (op_desc->GetType() == HCOMALLREDUCE || op_desc->GetType() == HCOMALLGATHER - || op_desc->GetType() == HCOMREDUCESCATTER) { + || op_desc->GetType() == HCOMREDUCESCATTER || op_desc->GetType() == HCOMREDUCE) { return InputRWType::kScopeWriteable; } // check if it is ref input From b4b4432128b08b43c627e1bf26f0029909ee792e Mon Sep 17 00:00:00 2001 From: cclworkaccount Date: Tue, 1 Dec 2020 14:45:47 +0800 Subject: [PATCH 07/13] update ge/hybrid/node_executor/hccl/hccl_node_executor.cc. --- ge/hybrid/node_executor/hccl/hccl_node_executor.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ge/hybrid/node_executor/hccl/hccl_node_executor.cc b/ge/hybrid/node_executor/hccl/hccl_node_executor.cc index 723cb7bc..9c3acc53 100644 --- a/ge/hybrid/node_executor/hccl/hccl_node_executor.cc +++ b/ge/hybrid/node_executor/hccl/hccl_node_executor.cc @@ -83,7 +83,7 @@ Status HcclNodeTask::ExecuteAsync(TaskContext &context, std::function do op_info.dataType = iter->second; HcclReduceOp op_type = HCCL_REDUCE_SUM; if (op_desc->GetType() == HCOMALLREDUCE || op_desc->GetType() == HCOMREDUCESCATTER || - op_desc->GetType() == HVDCALLBACKALLREDUCE) { + op_desc->GetType() == HVDCALLBACKALLREDUCE || op_desc->GetType() == HCOMREDUCE) { GE_CHK_STATUS_RET(HcomOmeUtil::GetHcclOperationType(op_desc, op_type), "GetHcclOperationType failed"); op_info.opType = op_type; } From 431e79e744ce73397e6ba80964b23e66ca500230 Mon Sep 17 00:00:00 2001 From: cclworkaccount Date: Tue, 1 Dec 2020 14:46:47 +0800 Subject: [PATCH 08/13] update inc/framework/common/types.h. --- inc/framework/common/types.h | 1 + 1 file changed, 1 insertion(+) diff --git a/inc/framework/common/types.h b/inc/framework/common/types.h index 22e85e0b..441d0757 100644 --- a/inc/framework/common/types.h +++ b/inc/framework/common/types.h @@ -431,6 +431,7 @@ REGISTER_OPTYPE_DECLARE(HCOMBROADCAST, "HcomBroadcast"); REGISTER_OPTYPE_DECLARE(HCOMALLGATHER, "HcomAllGather"); REGISTER_OPTYPE_DECLARE(HCOMALLREDUCE, "HcomAllReduce"); REGISTER_OPTYPE_DECLARE(HCOMREDUCESCATTER, "HcomReduceScatter"); +REGISTER_OPTYPE_DECLARE(HCOMREDUCE, "HcomReduce"); REGISTER_OPTYPE_DECLARE(HCOMSEND, "HcomSend"); REGISTER_OPTYPE_DECLARE(HCOMRECEIVE, "HcomReceive"); REGISTER_OPTYPE_DECLARE(HCOMREMOTEREAD, "HcomRemoteRead"); From 12bb35b0a5228e28c93826b10448408d374439d7 Mon Sep 17 00:00:00 2001 From: cclworkaccount Date: Tue, 1 Dec 2020 15:24:19 +0800 Subject: [PATCH 09/13] update ge/graph/manager/util/hcom_util.cc. --- ge/graph/manager/util/hcom_util.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ge/graph/manager/util/hcom_util.cc b/ge/graph/manager/util/hcom_util.cc index ae4c5838..76427635 100644 --- a/ge/graph/manager/util/hcom_util.cc +++ b/ge/graph/manager/util/hcom_util.cc @@ -281,7 +281,7 @@ Status HcomOmeUtil::GetAllRootId(const ge::ConstOpDescPtr &op_desc, bool HcomOmeUtil::IsHCOMOp(const string &op_type) { return (op_type == HCOMALLREDUCE) || (op_type == HCOMALLGATHER) || (op_type == HCOMBROADCAST) || - (op_type == HCOMSEND) || (op_type == HCOMRECEIVE) || (op_type == HCOMREDUCESCATTER || op_desc->GetType() == HCOMREDUCE); + (op_type == HCOMSEND) || (op_type == HCOMRECEIVE) || (op_type == HCOMREDUCESCATTER) || (op_type == HCOMREDUCESCATTER); } bool HcomOmeUtil::IsHorovodOp(const string &op_type) { From 2c032115092741000daaa5bdac1dc44ebad62c8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E7=AC=91=E5=A4=A9?= Date: Tue, 1 Dec 2020 15:40:58 +0800 Subject: [PATCH 10/13] update ge/graph/load/new_model_manager/davinci_model.cc. --- ge/graph/load/new_model_manager/davinci_model.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ge/graph/load/new_model_manager/davinci_model.cc b/ge/graph/load/new_model_manager/davinci_model.cc index 0344fd7e..93cb8d89 100755 --- a/ge/graph/load/new_model_manager/davinci_model.cc +++ b/ge/graph/load/new_model_manager/davinci_model.cc @@ -411,7 +411,8 @@ void DavinciModel::CheckHasHcomOp() { (op_desc->GetType() == HCOMALLREDUCE) || (op_desc->GetType() == HCOMSEND) || (op_desc->GetType() == HCOMRECEIVE) || (op_desc->GetType() == HCOMREDUCESCATTER) || (op_desc->GetType() == HVDCALLBACKALLREDUCE) || (op_desc->GetType() == HVDCALLBACKALLGATHER) || - (op_desc->GetType() == HVDCALLBACKBROADCAST) || (op_desc->GetType() == HVDWAIT)), + (op_desc->GetType() == HVDCALLBACKBROADCAST) || (op_desc->GetType() == HVDWAIT) || + (op_desc->GetType() == HCOMREDUCE)), uint32_t stream_id = static_cast(op_desc->GetStreamId()); (void)hcom_streams_.emplace(stream_id); GELOGD("hcom stream: %u.", stream_id); continue); } From d20a393c2678a403469c838fc4eb57049ac77191 Mon Sep 17 00:00:00 2001 From: cclworkaccount Date: Tue, 1 Dec 2020 17:00:49 +0800 Subject: [PATCH 11/13] update ge/graph/build/stream_allocator.cc. --- ge/graph/build/stream_allocator.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ge/graph/build/stream_allocator.cc b/ge/graph/build/stream_allocator.cc index bbbc138c..4378f71b 100644 --- a/ge/graph/build/stream_allocator.cc +++ b/ge/graph/build/stream_allocator.cc @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -, + #include "graph/build/stream_allocator.h" #include #include From d01fb1a9e0800ef6cb1fd82684edfb926a7b7c62 Mon Sep 17 00:00:00 2001 From: cclworkaccount Date: Tue, 1 Dec 2020 19:04:39 +0800 Subject: [PATCH 12/13] update ge/graph/manager/util/hcom_util.cc. --- ge/graph/manager/util/hcom_util.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ge/graph/manager/util/hcom_util.cc b/ge/graph/manager/util/hcom_util.cc index 76427635..487b24af 100644 --- a/ge/graph/manager/util/hcom_util.cc +++ b/ge/graph/manager/util/hcom_util.cc @@ -281,7 +281,7 @@ Status HcomOmeUtil::GetAllRootId(const ge::ConstOpDescPtr &op_desc, bool HcomOmeUtil::IsHCOMOp(const string &op_type) { return (op_type == HCOMALLREDUCE) || (op_type == HCOMALLGATHER) || (op_type == HCOMBROADCAST) || - (op_type == HCOMSEND) || (op_type == HCOMRECEIVE) || (op_type == HCOMREDUCESCATTER) || (op_type == HCOMREDUCESCATTER); + (op_type == HCOMSEND) || (op_type == HCOMRECEIVE) || (op_type == HCOMREDUCESCATTER) || (op_type == HCOMREDUCE); } bool HcomOmeUtil::IsHorovodOp(const string &op_type) { From 3e1591b788f7652834c046e0abecd91001f5b7a6 Mon Sep 17 00:00:00 2001 From: cclworkaccount Date: Fri, 4 Dec 2020 15:52:58 +0800 Subject: [PATCH 13/13] update ge/graph/load/new_model_manager/task_info/hccl_task_info.cc. --- ge/graph/load/new_model_manager/task_info/hccl_task_info.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ge/graph/load/new_model_manager/task_info/hccl_task_info.cc b/ge/graph/load/new_model_manager/task_info/hccl_task_info.cc index b09a4fce..442a1383 100644 --- a/ge/graph/load/new_model_manager/task_info/hccl_task_info.cc +++ b/ge/graph/load/new_model_manager/task_info/hccl_task_info.cc @@ -279,9 +279,9 @@ Status HcclTaskInfo::SetAddrs(const std::shared_ptr &op_desc, output_data_addr = output_data_addrs_.empty() ? nullptr : output_data_addrs_[i]; } kernel_hccl_infos[i].inputDataAddr = input_data_addr; - if (hccl_type == HCOMALLGATHER || hccl_type == HCOMRECEIVE || hccl_type == HVDCALLBACKALLGATHER || hccl_type == HCOMREDUCE) { + if (hccl_type == HCOMALLGATHER || hccl_type == HCOMRECEIVE || hccl_type == HVDCALLBACKALLGATHER) { kernel_hccl_infos[i].outputDataAddr = output_data_addr; - } else if (hccl_type == HCOMALLREDUCE || hccl_type == HCOMREDUCESCATTER || hccl_type == HVDCALLBACKALLREDUCE) { + } else if (hccl_type == HCOMALLREDUCE || hccl_type == HCOMREDUCESCATTER || hccl_type == HVDCALLBACKALLREDUCE || hccl_type == HCOMREDUCE) { GE_CHK_STATUS_RET(HcomOmeUtil::GetHcclOperationType(op_desc, op_type), "davinci_model: GetHcomOperationType fail!"); kernel_hccl_infos[i].outputDataAddr = output_data_addr;