未验证 提交 67c6cfe0 编写于 作者: K Kim Yann 提交者: GitHub

rem hccl keywords (#53058)

上级 e6def1eb
...@@ -29,7 +29,7 @@ phi::ccl::CCLReduceOp ToCustomCCLRedType(ReduceOp reduction) { ...@@ -29,7 +29,7 @@ phi::ccl::CCLReduceOp ToCustomCCLRedType(ReduceOp reduction) {
PADDLE_ENFORCE_EQ( PADDLE_ENFORCE_EQ(
it != red_type.end(), it != red_type.end(),
true, true,
platform::errors::InvalidArgument("Invalid hccl reduction. " platform::errors::InvalidArgument("Invalid CustomCCL reduction. "
"Must be Min | Max | Prod | Sum")); "Must be Min | Max | Prod | Sum"));
return it->second; return it->second;
} }
......
...@@ -139,11 +139,12 @@ void ProcessGroupCustom::BroadcastUniqueCustomID( ...@@ -139,11 +139,12 @@ void ProcessGroupCustom::BroadcastUniqueCustomID(
// create CustomCCLManager cache for places_key // create CustomCCLManager cache for places_key
void ProcessGroupCustom::CreateCustomManagerCache( void ProcessGroupCustom::CreateCustomManagerCache(
const std::string& places_key, const std::vector<Place>& places) { const std::string& places_key, const std::vector<Place>& places) {
PADDLE_ENFORCE_EQ(places_key.empty(), PADDLE_ENFORCE_EQ(
false, places_key.empty(),
platform::errors::PreconditionNotMet( false,
"Not able to create/get the HCCL Communicator since " platform::errors::PreconditionNotMet(
"the NPU place are not known")); "Not able to create/get the CustomCCL Communicator since "
"the NPU place are not known"));
const std::string device_type = places.back().GetDeviceType(); const std::string device_type = places.back().GetDeviceType();
std::vector<std::shared_ptr<CustomCCLCommManager>> ccl_comms; std::vector<std::shared_ptr<CustomCCLCommManager>> ccl_comms;
......
...@@ -250,10 +250,6 @@ void Group::ConcatTensors(const platform::DeviceContext &context) { ...@@ -250,10 +250,6 @@ void Group::ConcatTensors(const platform::DeviceContext &context) {
"Paddle can't concat xpu grads since it's not compiled with BKCL," "Paddle can't concat xpu grads since it's not compiled with BKCL,"
"Please recompile or reinstall Paddle with BKCL support.")); "Please recompile or reinstall Paddle with BKCL support."));
#endif #endif
} else if (platform::is_npu_place(place)) {
PADDLE_THROW(platform::errors::PermissionDenied(
"Paddle can't concat npu grads since it's not compiled with HCCL,"
"Please recompile or reinstall Paddle with HCCL support."));
} else if (platform::is_cpu_place(place)) { } else if (platform::is_cpu_place(place)) {
ConcatTensorsWithType(static_cast<const phi::CPUContext &>(context), ConcatTensorsWithType(static_cast<const phi::CPUContext &>(context),
dense_tensors_, dense_tensors_,
...@@ -290,10 +286,6 @@ void Group::SplitTensors(const platform::DeviceContext &context) { ...@@ -290,10 +286,6 @@ void Group::SplitTensors(const platform::DeviceContext &context) {
"Paddle can't split xpu grad since it's not compiled with BKCL," "Paddle can't split xpu grad since it's not compiled with BKCL,"
"Please recompile or reinstall Paddle with BKCL support.")); "Please recompile or reinstall Paddle with BKCL support."));
#endif #endif
} else if (platform::is_npu_place(place)) {
PADDLE_THROW(platform::errors::PermissionDenied(
"Paddle can't split npu grad since it's not compiled with HCCL,"
"Please recompile or reinstall Paddle with HCCL support."));
} else if (platform::is_cpu_place(place)) { } else if (platform::is_cpu_place(place)) {
SplitTensorsWithType(static_cast<const phi::CPUContext &>(context), SplitTensorsWithType(static_cast<const phi::CPUContext &>(context),
&dense_contents_, &dense_contents_,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册