Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
67c6cfe0
P
Paddle
项目概览
PaddlePaddle
/
Paddle
大约 1 年 前同步成功
通知
2299
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看板
未验证
提交
67c6cfe0
编写于
4月 20, 2023
作者:
K
Kim Yann
提交者:
GitHub
4月 20, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
rem hccl keywords (#53058)
上级
e6def1eb
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
7 addition
and
14 deletion
+7
-14
paddle/fluid/distributed/collective/custom_ccl_tools.cc
paddle/fluid/distributed/collective/custom_ccl_tools.cc
+1
-1
paddle/fluid/distributed/collective/process_group_custom.cc
paddle/fluid/distributed/collective/process_group_custom.cc
+6
-5
paddle/fluid/imperative/reducer.cc
paddle/fluid/imperative/reducer.cc
+0
-8
未找到文件。
paddle/fluid/distributed/collective/custom_ccl_tools.cc
浏览文件 @
67c6cfe0
...
@@ -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
;
}
}
...
...
paddle/fluid/distributed/collective/process_group_custom.cc
浏览文件 @
67c6cfe0
...
@@ -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
;
...
...
paddle/fluid/imperative/reducer.cc
浏览文件 @
67c6cfe0
...
@@ -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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录