From 89f903da1fba9527dc900266baf5a17e6711d7d8 Mon Sep 17 00:00:00 2001 From: ronnywang <524019753@qq.com> Date: Fri, 21 Jan 2022 13:21:31 +0800 Subject: [PATCH] fix npu c_allgather int64 (#39099) --- paddle/fluid/operators/collective/c_allgather_op_npu.cc | 1 + paddle/fluid/platform/device/npu/hccl_helper.h | 2 ++ 2 files changed, 3 insertions(+) diff --git a/paddle/fluid/operators/collective/c_allgather_op_npu.cc b/paddle/fluid/operators/collective/c_allgather_op_npu.cc index 4fa27f5eb9b..5ebcc9064f7 100644 --- a/paddle/fluid/operators/collective/c_allgather_op_npu.cc +++ b/paddle/fluid/operators/collective/c_allgather_op_npu.cc @@ -79,5 +79,6 @@ namespace plat = paddle::platform; REGISTER_OP_NPU_KERNEL(c_allgather, ops::CAllGatherOpASCENDKernel, ops::CAllGatherOpASCENDKernel, + ops::CAllGatherOpASCENDKernel, ops::CAllGatherOpASCENDKernel, ops::CAllGatherOpASCENDKernel); diff --git a/paddle/fluid/platform/device/npu/hccl_helper.h b/paddle/fluid/platform/device/npu/hccl_helper.h index c2338fff029..efbc56bee72 100644 --- a/paddle/fluid/platform/device/npu/hccl_helper.h +++ b/paddle/fluid/platform/device/npu/hccl_helper.h @@ -41,6 +41,8 @@ inline HcclDataType ToHCCLDataType(framework::proto::VarType::Type type) { return HCCL_DATA_TYPE_FP32; } else if (type == framework::proto::VarType::FP16) { return HCCL_DATA_TYPE_FP16; + } else if (type == framework::proto::VarType::INT64) { + return HCCL_DATA_TYPE_INT64; } else if (type == framework::proto::VarType::INT32) { return HCCL_DATA_TYPE_INT32; } else if (type == framework::proto::VarType::INT8) { -- GitLab