Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
7fe7eebc
P
Paddle
项目概览
PaddlePaddle
/
Paddle
1 年多 前同步成功
通知
2302
Star
20931
Fork
5422
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1423
列表
看板
标记
里程碑
合并请求
543
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1,423
Issue
1,423
列表
看板
标记
里程碑
合并请求
543
合并请求
543
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
7fe7eebc
编写于
11月 04, 2022
作者:
L
LiYuRio
提交者:
GitHub
11月 04, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
remove global var (#47659)
上级
f53e920d
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
9 addition
and
31 deletion
+9
-31
paddle/fluid/distributed/collective/ProcessGroup.h
paddle/fluid/distributed/collective/ProcessGroup.h
+1
-1
paddle/fluid/distributed/collective/ProcessGroupCustom.h
paddle/fluid/distributed/collective/ProcessGroupCustom.h
+1
-3
paddle/fluid/distributed/collective/ProcessGroupGloo.h
paddle/fluid/distributed/collective/ProcessGroupGloo.h
+1
-5
paddle/fluid/distributed/collective/ProcessGroupHCCL.h
paddle/fluid/distributed/collective/ProcessGroupHCCL.h
+3
-7
paddle/fluid/distributed/collective/ProcessGroupHeter.h
paddle/fluid/distributed/collective/ProcessGroupHeter.h
+1
-5
paddle/fluid/distributed/collective/ProcessGroupMPI.h
paddle/fluid/distributed/collective/ProcessGroupMPI.h
+1
-5
paddle/fluid/distributed/collective/ProcessGroupNCCL.h
paddle/fluid/distributed/collective/ProcessGroupNCCL.h
+1
-5
未找到文件。
paddle/fluid/distributed/collective/ProcessGroup.h
浏览文件 @
7fe7eebc
...
...
@@ -92,7 +92,7 @@ class ProcessGroup {
int
GetSize
()
const
{
return
size_
;
}
virtual
const
std
::
string
GetBackendName
()
const
=
0
;
virtual
std
::
string
GetBackendName
()
const
=
0
;
virtual
const
phi
::
DeviceContext
&
GetDeviceContext
(
const
Place
&
place
)
const
{
PADDLE_THROW
(
platform
::
errors
::
InvalidArgument
(
"Does not support to get device_context from ProcessGroup%s."
,
...
...
paddle/fluid/distributed/collective/ProcessGroupCustom.h
浏览文件 @
7fe7eebc
...
...
@@ -69,9 +69,7 @@ class ProcessGroupCustom : public ProcessGroup {
const
platform
::
Place
&
place
,
int
gid
);
const
std
::
string
GetBackendName
()
const
override
{
return
"XCCL_"
+
device_type_
;
}
std
::
string
GetBackendName
()
const
override
{
return
"XCCL_"
+
device_type_
;
}
std
::
shared_ptr
<
ProcessGroup
::
Task
>
AllGather
(
std
::
vector
<
phi
::
DenseTensor
>&
in_tensors
,
...
...
paddle/fluid/distributed/collective/ProcessGroupGloo.h
浏览文件 @
7fe7eebc
...
...
@@ -26,8 +26,6 @@
#include "paddle/fluid/distributed/store/store.h"
#include "paddle/fluid/distributed/store/tcp_store.h"
constexpr
const
char
*
GLOO_BACKEND_NAME
=
"GLOO"
;
namespace
paddle
{
namespace
distributed
{
...
...
@@ -146,9 +144,7 @@ class ProcessGroupGloo : public ProcessGroup {
std
::
shared_ptr
<::
gloo
::
Context
>
get_context
()
{
return
_context
;
}
uint64_t
next_tag
()
{
return
_tag
++
;
}
const
std
::
string
GetBackendName
()
const
override
{
return
GLOO_BACKEND_NAME
;
}
std
::
string
GetBackendName
()
const
override
{
return
"GLOO"
;
}
const
phi
::
DeviceContext
&
GetDeviceContext
(
const
Place
&
place
)
const
override
{
...
...
paddle/fluid/distributed/collective/ProcessGroupHCCL.h
浏览文件 @
7fe7eebc
...
...
@@ -30,8 +30,6 @@
#include "paddle/fluid/platform/gen_comm_id_helper.h"
#include "paddle/fluid/platform/place.h"
constexpr
const
char
*
HCCL_BACKEND_NAME
=
"HCCL"
;
namespace
paddle
{
namespace
distributed
{
...
...
@@ -77,9 +75,7 @@ class ProcessGroupHCCL : public ProcessGroup {
const
platform
::
Place
&
place
,
int
gid
);
const
std
::
string
GetBackendName
()
const
override
{
return
std
::
string
(
HCCL_BACKEND_NAME
);
}
std
::
string
GetBackendName
()
const
override
{
return
"HCCL"
;
}
std
::
shared_ptr
<
ProcessGroup
::
Task
>
AllReduce
(
std
::
vector
<
phi
::
DenseTensor
>&
in_tensors
,
...
...
@@ -114,8 +110,8 @@ class ProcessGroupHCCL : public ProcessGroup {
std
::
set
<
int
>
used_place_ids_
;
private:
void
BcastHCCLId
(
std
::
vector
<
HcclRootInfo
>&
hccl_ids
,
int
root
,
// NOLINT
void
BcastHCCLId
(
std
::
vector
<
HcclRootInfo
>&
hccl_ids
,
// NOLINT
int
root
,
// NOLINT
int
server_fd
);
void
BroadcastUniqueHCCLID
(
std
::
vector
<
HcclRootInfo
>&
hccl_ids
);
// NOLINT
...
...
paddle/fluid/distributed/collective/ProcessGroupHeter.h
浏览文件 @
7fe7eebc
...
...
@@ -58,8 +58,6 @@
#include "paddle/fluid/distributed/collective/Common.h"
constexpr
const
char
*
HETER_BACKEND_NAME
=
"HETER_BACKEND"
;
namespace
paddle
{
namespace
distributed
{
...
...
@@ -99,9 +97,7 @@ class ProcessGroupHeter : public ProcessGroup {
int
src_rank
,
int
dst_rank
);
const
std
::
string
GetBackendName
()
const
override
{
return
std
::
string
(
HETER_BACKEND_NAME
);
}
std
::
string
GetBackendName
()
const
override
{
return
"HETER_BACKEND"
;
}
std
::
shared_ptr
<
ProcessGroup
::
Task
>
AllReduce
(
std
::
vector
<
phi
::
DenseTensor
>&
,
...
...
paddle/fluid/distributed/collective/ProcessGroupMPI.h
浏览文件 @
7fe7eebc
...
...
@@ -33,8 +33,6 @@
#include "paddle/fluid/distributed/collective/MPITools.h"
#endif
constexpr
const
char
*
MPI_BACKEND_NAME
=
"MPI"
;
namespace
paddle
{
namespace
distributed
{
...
...
@@ -137,9 +135,7 @@ class ProcessGroupMPI : public ProcessGroup {
virtual
~
ProcessGroupMPI
();
const
std
::
string
GetBackendName
()
const
override
{
return
std
::
string
(
MPI_BACKEND_NAME
);
}
std
::
string
GetBackendName
()
const
override
{
return
"MPI"
;
}
std
::
shared_ptr
<
ProcessGroup
::
Task
>
AllReduce
(
std
::
vector
<
phi
::
DenseTensor
>&
in_tensors
,
...
...
paddle/fluid/distributed/collective/ProcessGroupNCCL.h
浏览文件 @
7fe7eebc
...
...
@@ -39,8 +39,6 @@
#include "paddle/fluid/platform/dynload/nccl.h"
#endif
constexpr
const
char
*
NCCL_BACKEND_NAME
=
"NCCL"
;
namespace
paddle
{
namespace
distributed
{
...
...
@@ -94,9 +92,7 @@ class ProcessGroupNCCL : public ProcessGroupStream {
const
platform
::
Place
&
place
,
int
gid
);
const
std
::
string
GetBackendName
()
const
override
{
return
std
::
string
(
NCCL_BACKEND_NAME
);
}
std
::
string
GetBackendName
()
const
override
{
return
"NCCL"
;
}
const
phi
::
DeviceContext
&
GetDeviceContext
(
const
Place
&
place
)
const
override
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录