Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
Paddle
提交
215c7ae7
P
Paddle
项目概览
BaiXuePrincess
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
215c7ae7
编写于
1月 06, 2023
作者:
W
Wen Sun
提交者:
GitHub
1月 06, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix hidden overloaded functions in process group (#49576)
* fix: fix hidden virtual funcs * fix: add default impl
上级
6e80b84d
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
130 addition
and
16 deletion
+130
-16
paddle/fluid/distributed/collective/process_group_with_stream.h
.../fluid/distributed/collective/process_group_with_stream.h
+99
-11
paddle/fluid/distributed/collective/process_group_without_stream.h
...uid/distributed/collective/process_group_without_stream.h
+31
-5
未找到文件。
paddle/fluid/distributed/collective/process_group_with_stream.h
浏览文件 @
215c7ae7
...
...
@@ -62,17 +62,6 @@ class ProcessGroupWithStream : public ProcessGroup {
virtual
~
ProcessGroupWithStream
()
=
default
;
// methods from base class
using
ProcessGroup
::
AllGather
;
using
ProcessGroup
::
AllReduce
;
using
ProcessGroup
::
AllToAll
;
using
ProcessGroup
::
Broadcast
;
using
ProcessGroup
::
Recv
;
using
ProcessGroup
::
Reduce
;
using
ProcessGroup
::
ReduceScatter
;
using
ProcessGroup
::
Scatter
;
using
ProcessGroup
::
Send
;
std
::
shared_ptr
<
ProcessGroup
::
Task
>
AllGather
(
phi
::
DenseTensor
*
out_tensor
,
const
phi
::
DenseTensor
&
in_tensor
,
...
...
@@ -111,6 +100,18 @@ class ProcessGroupWithStream : public ProcessGroup {
use_calc_stream
);
}
std
::
shared_ptr
<
ProcessGroup
::
Task
>
AllGather
(
phi
::
DenseTensor
*
out_tensor
,
const
phi
::
DenseTensor
&
in_tensor
,
int64_t
offset
,
int64_t
numel
,
bool
sync_op
,
bool
use_calc_stream
)
override
{
PADDLE_THROW
(
phi
::
errors
::
Unimplemented
(
"ProcessGroupWithStream (%s) does not support all_gather."
,
GetBackendName
()));
}
std
::
shared_ptr
<
ProcessGroup
::
Task
>
AllReduce
(
phi
::
DenseTensor
*
out_tensor
,
const
phi
::
DenseTensor
&
in_tensor
,
...
...
@@ -123,6 +124,17 @@ class ProcessGroupWithStream : public ProcessGroup {
/*use_calc_stream*/
false
);
}
std
::
shared_ptr
<
ProcessGroup
::
Task
>
AllReduce
(
phi
::
DenseTensor
*
out_tensor
,
const
phi
::
DenseTensor
&
in_tensor
,
const
AllreduceOptions
&
opts
,
bool
sync_op
,
bool
use_calc_stream
)
override
{
PADDLE_THROW
(
phi
::
errors
::
Unimplemented
(
"ProcessGroupWithStream (%s) does not support all_reduce."
,
GetBackendName
()));
}
std
::
shared_ptr
<
ProcessGroup
::
Task
>
AllToAll
(
phi
::
DenseTensor
*
out_tensor
,
const
phi
::
DenseTensor
&
in_tensor
,
...
...
@@ -137,6 +149,18 @@ class ProcessGroupWithStream : public ProcessGroup {
/*use_calc_stream*/
false
);
}
std
::
shared_ptr
<
ProcessGroup
::
Task
>
AllToAll
(
phi
::
DenseTensor
*
out_tensor
,
const
phi
::
DenseTensor
&
in_tensor
,
const
std
::
vector
<
int64_t
>&
out_size_each_rank
,
const
std
::
vector
<
int64_t
>&
in_size_each_rank
,
bool
sync_op
,
bool
use_calc_stream
)
override
{
PADDLE_THROW
(
phi
::
errors
::
Unimplemented
(
"ProcessGroupWithStream (%s) does not support all_to_all."
,
GetBackendName
()));
}
std
::
shared_ptr
<
ProcessGroup
::
Task
>
Broadcast
(
phi
::
DenseTensor
*
out_tensor
,
const
phi
::
DenseTensor
&
in_tensor
,
...
...
@@ -149,6 +173,17 @@ class ProcessGroupWithStream : public ProcessGroup {
/*use_calc_stream*/
false
);
}
std
::
shared_ptr
<
ProcessGroup
::
Task
>
Broadcast
(
phi
::
DenseTensor
*
out_tensor
,
const
phi
::
DenseTensor
&
in_tensor
,
const
BroadcastOptions
&
opts
,
bool
sync_op
,
bool
use_calc_stream
)
override
{
PADDLE_THROW
(
phi
::
errors
::
Unimplemented
(
"ProcessGroupWithStream (%s) does not support broadcast."
,
GetBackendName
()));
}
std
::
shared_ptr
<
ProcessGroup
::
Task
>
Reduce
(
phi
::
DenseTensor
*
out_tensor
,
const
phi
::
DenseTensor
&
in_tensor
,
const
ReduceOptions
&
opts
,
...
...
@@ -160,6 +195,16 @@ class ProcessGroupWithStream : public ProcessGroup {
/*use_calc_stream*/
false
);
}
std
::
shared_ptr
<
ProcessGroup
::
Task
>
Reduce
(
phi
::
DenseTensor
*
out_tensor
,
const
phi
::
DenseTensor
&
in_tensor
,
const
ReduceOptions
&
opts
,
bool
sync_op
,
bool
use_calc_stream
)
override
{
PADDLE_THROW
(
phi
::
errors
::
Unimplemented
(
"ProcessGroupWithStream (%s) does not support reduce."
,
GetBackendName
()));
}
std
::
shared_ptr
<
ProcessGroup
::
Task
>
ReduceScatter
(
phi
::
DenseTensor
*
out_tensor
,
const
phi
::
DenseTensor
&
in_tensor
,
...
...
@@ -172,6 +217,17 @@ class ProcessGroupWithStream : public ProcessGroup {
/*use_calc_stream*/
false
);
}
std
::
shared_ptr
<
ProcessGroup
::
Task
>
ReduceScatter
(
phi
::
DenseTensor
*
out_tensor
,
const
phi
::
DenseTensor
&
in_tensor
,
const
ReduceScatterOptions
&
opts
,
bool
sync_op
,
bool
use_calc_stream
)
override
{
PADDLE_THROW
(
phi
::
errors
::
Unimplemented
(
"ProcessGroupWithStream (%s) does not support reduce_scatter."
,
GetBackendName
()));
}
std
::
shared_ptr
<
ProcessGroup
::
Task
>
Scatter
(
phi
::
DenseTensor
*
out_tensor
,
const
phi
::
DenseTensor
&
in_tensor
,
const
ScatterOptions
&
opts
,
...
...
@@ -183,6 +239,16 @@ class ProcessGroupWithStream : public ProcessGroup {
/*use_calc_stream*/
false
);
}
std
::
shared_ptr
<
ProcessGroup
::
Task
>
Scatter
(
phi
::
DenseTensor
*
out_tensor
,
const
phi
::
DenseTensor
&
in_tensor
,
const
ScatterOptions
&
opts
,
bool
sync_op
,
bool
use_calc_stream
)
override
{
PADDLE_THROW
(
phi
::
errors
::
Unimplemented
(
"ProcessGroupWithStream (%s) does not support scatter."
,
GetBackendName
()));
}
std
::
shared_ptr
<
ProcessGroup
::
Task
>
Recv
(
phi
::
DenseTensor
*
tensor
,
int
src_rank
,
bool
sync_op
)
override
{
...
...
@@ -218,6 +284,17 @@ class ProcessGroupWithStream : public ProcessGroup {
use_calc_stream
);
}
std
::
shared_ptr
<
ProcessGroup
::
Task
>
Recv
(
phi
::
DenseTensor
*
tensor
,
int
src_rank
,
int64_t
offset
,
int64_t
numel
,
bool
sync_op
,
bool
use_calc_stream
)
override
{
PADDLE_THROW
(
phi
::
errors
::
Unimplemented
(
"ProcessGroupWithStream (%s) does not support recv."
,
GetBackendName
()));
}
std
::
shared_ptr
<
ProcessGroup
::
Task
>
Send
(
const
phi
::
DenseTensor
&
tensor
,
int
dst_rank
,
bool
sync_op
)
override
{
...
...
@@ -252,6 +329,17 @@ class ProcessGroupWithStream : public ProcessGroup {
sync_op
,
use_calc_stream
);
}
std
::
shared_ptr
<
ProcessGroup
::
Task
>
Send
(
const
phi
::
DenseTensor
&
tensor
,
int
dst_rank
,
int64_t
offset
,
int64_t
numel
,
bool
sync_op
,
bool
use_calc_stream
)
override
{
PADDLE_THROW
(
phi
::
errors
::
Unimplemented
(
"ProcessGroupWithStream (%s) does not support send."
,
GetBackendName
()));
}
};
}
// namespace distributed
...
...
paddle/fluid/distributed/collective/process_group_without_stream.h
浏览文件 @
215c7ae7
...
...
@@ -28,11 +28,6 @@ class ProcessGroupWithoutStream : public ProcessGroup {
virtual
~
ProcessGroupWithoutStream
()
=
default
;
// methods from base class
using
ProcessGroup
::
AllGather
;
using
ProcessGroup
::
Recv
;
using
ProcessGroup
::
Send
;
std
::
shared_ptr
<
ProcessGroup
::
Task
>
AllGather
(
phi
::
DenseTensor
*
out_tensor
,
const
phi
::
DenseTensor
&
in_tensor
,
...
...
@@ -44,6 +39,17 @@ class ProcessGroupWithoutStream : public ProcessGroup {
sync_op
);
}
std
::
shared_ptr
<
ProcessGroup
::
Task
>
AllGather
(
phi
::
DenseTensor
*
out_tensor
,
const
phi
::
DenseTensor
&
in_tensor
,
int64_t
offset
,
int64_t
numel
,
bool
sync_op
)
override
{
PADDLE_THROW
(
phi
::
errors
::
Unimplemented
(
"ProcessGroupWithoutStream (%s) does not support all_gather."
,
GetBackendName
()));
}
std
::
shared_ptr
<
ProcessGroup
::
Task
>
Recv
(
phi
::
DenseTensor
*
tensor
,
int
src_rank
,
bool
sync_op
)
override
{
...
...
@@ -54,6 +60,16 @@ class ProcessGroupWithoutStream : public ProcessGroup {
sync_op
);
}
std
::
shared_ptr
<
ProcessGroup
::
Task
>
Recv
(
phi
::
DenseTensor
*
tensor
,
int
src_rank
,
int64_t
offset
,
int64_t
numel
,
bool
sync_op
)
override
{
PADDLE_THROW
(
phi
::
errors
::
Unimplemented
(
"ProcessGroupWithoutStream (%s) does not support recv."
,
GetBackendName
()));
}
std
::
shared_ptr
<
ProcessGroup
::
Task
>
Send
(
const
phi
::
DenseTensor
&
tensor
,
int
dst_rank
,
bool
sync_op
)
override
{
...
...
@@ -63,6 +79,16 @@ class ProcessGroupWithoutStream : public ProcessGroup {
/*numel*/
-
1
,
// -1 indicates the whole tensor
sync_op
);
}
std
::
shared_ptr
<
ProcessGroup
::
Task
>
Send
(
const
phi
::
DenseTensor
&
tensor
,
int
dst_rank
,
int64_t
offset
,
int64_t
numel
,
bool
sync_op
)
override
{
PADDLE_THROW
(
phi
::
errors
::
Unimplemented
(
"ProcessGroupWithoutStream (%s) does not support send."
,
GetBackendName
()));
}
};
}
// namespace distributed
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录