Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Crayon鑫
Paddle
提交
1432e3d2
P
Paddle
项目概览
Crayon鑫
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
1432e3d2
编写于
12月 06, 2021
作者:
R
ronnywang
提交者:
GitHub
12月 06, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix bug (#37868)
上级
6a1e4de2
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
5 addition
and
5 deletion
+5
-5
paddle/fluid/imperative/nccl_context.cc
paddle/fluid/imperative/nccl_context.cc
+2
-2
paddle/fluid/imperative/tests/CMakeLists.txt
paddle/fluid/imperative/tests/CMakeLists.txt
+1
-1
paddle/fluid/imperative/tests/heter_ccl_context_test.cc
paddle/fluid/imperative/tests/heter_ccl_context_test.cc
+1
-1
paddle/fluid/imperative/tests/nccl_context_test.cc
paddle/fluid/imperative/tests/nccl_context_test.cc
+1
-1
未找到文件。
paddle/fluid/imperative/nccl_context.cc
浏览文件 @
1432e3d2
...
...
@@ -27,8 +27,8 @@
#include "paddle/fluid/framework/scope.h"
#include "paddle/fluid/framework/variable.h"
#include "paddle/fluid/platform/device/gpu/nccl_helper.h"
#include "paddle/fluid/platform/device_context.h"
#include "paddle/fluid/platform/nccl_helper.h"
#include "paddle/fluid/platform/place.h"
namespace
paddle
{
...
...
@@ -145,7 +145,7 @@ void NCCLParallelContext::Broadcast(framework::Variable *src, int ring_id) {
void
*
src_ptr
=
src_tensor
->
data
<
void
>
();
auto
nccl_dtype
=
platform
::
ToNCCLDataType
(
src_tensor
->
type
());
PADDLE_ENFORCE_
CUDA
_SUCCESS
(
platform
::
dynload
::
ncclBcast
(
PADDLE_ENFORCE_
GPU
_SUCCESS
(
platform
::
dynload
::
ncclBcast
(
src_ptr
,
src_tensor
->
numel
(),
nccl_dtype
,
0
,
comm
->
comm
(),
stream
));
}
...
...
paddle/fluid/imperative/tests/CMakeLists.txt
浏览文件 @
1432e3d2
if
(
WIN32
)
cc_test
(
nccl_context_test SRCS nccl_context_test.cc DEPS device_context
)
else
()
if
(
WITH_
NCCL OR WITH_RCCL
)
if
(
WITH_
GLOO
AND
(
WITH_NCCL OR WITH_RCCL
)
)
cc_test
(
nccl_context_test SRCS nccl_context_test.cc DEPS nccl_context
)
cc_test
(
heter_ccl_context_test SRCS heter_ccl_context_test.cc DEPS heter_ccl_context nccl_context imperative_gloo_context gloo_context gloo_wrapper gloo fs shell
)
#set_tests_properties(heter_ccl_context_test PROPERTIES LABELS "RUN_TYPE=DIST")
...
...
paddle/fluid/imperative/tests/heter_ccl_context_test.cc
浏览文件 @
1432e3d2
...
...
@@ -79,7 +79,7 @@ void AllReduceByStream(int local_rank, int device_id) {
}
TEST
(
AllReduceByStream
,
Run
)
{
if
(
platform
::
Get
CUDA
DeviceCount
()
>=
2
)
{
if
(
platform
::
Get
GPU
DeviceCount
()
>=
2
)
{
std
::
thread
t0
(
AllReduceByStream
,
0
,
0
);
std
::
thread
t1
(
AllReduceByStream
,
1
,
1
);
t0
.
join
();
...
...
paddle/fluid/imperative/tests/nccl_context_test.cc
浏览文件 @
1432e3d2
...
...
@@ -111,7 +111,7 @@ void Broadcast(int local_rank, int device_id) {
}
TEST
(
Broadcast
,
Run
)
{
if
(
platform
::
Get
CUDA
DeviceCount
()
>=
2
)
{
if
(
platform
::
Get
GPU
DeviceCount
()
>=
2
)
{
std
::
thread
t0
(
Broadcast
,
0
,
0
);
std
::
thread
t1
(
Broadcast
,
1
,
1
);
t0
.
join
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录