未验证 提交 95e494e0 编写于 作者: R ronnywang 提交者: GitHub

fix cpu build failed (#47833)

* fix cpu build failed

* update
上级 9bda10cd
......@@ -33,6 +33,8 @@ namespace detail {
// In principle, the PHI Kernel cannot use the global singleton internally,
// and the required members need to be passed in from the eucalyptus tree.
ccl::CCLComm GetCCLComm(const Place& place, int global_gid) {
#if defined(PADDLE_WITH_NCCL) || defined(PADDLE_WITH_RCCL) || \
defined(PADDLE_WITH_CUSTOM_DEVICE)
paddle::distributed::ProcessGroup* pg = nullptr;
if (paddle::distributed::ProcessGroupMapFromGid::getInstance()->has(
global_gid)) {
......@@ -41,7 +43,7 @@ ccl::CCLComm GetCCLComm(const Place& place, int global_gid) {
} else {
return nullptr;
}
#endif
if (paddle::platform::is_gpu_place(place)) {
#if defined(PADDLE_WITH_NCCL) || defined(PADDLE_WITH_RCCL)
return static_cast<paddle::distributed::ProcessGroupNCCL*>(pg)->NCCLComm(
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册