Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
MegEngine 天元
MegRay
提交
2ecef6f2
M
MegRay
项目概览
MegEngine 天元
/
MegRay
通知
3
Star
1
Fork
2
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
MegRay
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
2ecef6f2
编写于
8月 13, 2020
作者:
M
Megvii Engine Team
提交者:
liuqingyi
8月 25, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor(nccl): disable cudaStreamSync in nccl opr
GitOrigin-RevId: a2604c9d039c05240be86bcede641f8b730e980e
上级
e14e4f84
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
0 addition
and
13 deletion
+0
-13
src/nccl/communicator.cpp
src/nccl/communicator.cpp
+0
-13
未找到文件。
src/nccl/communicator.cpp
浏览文件 @
2ecef6f2
...
...
@@ -55,7 +55,6 @@ Status NcclCommunicator::send(const void* sendbuff, size_t len, uint32_t rank,
cudaStream_t
stream
=
static_cast
<
CudaContext
*>
(
ctx
.
get
())
->
get_stream
();
// perform nccl send synchronously
NCCL_CHECK
(
ncclSend
(
sendbuff
,
len
,
ncclChar
,
rank
,
m_comm
,
stream
));
CUDA_CHECK
(
cudaStreamSynchronize
(
stream
));
return
MEGRAY_OK
;
}
...
...
@@ -66,7 +65,6 @@ Status NcclCommunicator::recv(void* recvbuff, size_t len, uint32_t rank,
cudaStream_t
stream
=
static_cast
<
CudaContext
*>
(
ctx
.
get
())
->
get_stream
();
// perform nccl send synchronously
NCCL_CHECK
(
ncclRecv
(
recvbuff
,
len
,
ncclChar
,
rank
,
m_comm
,
stream
));
CUDA_CHECK
(
cudaStreamSynchronize
(
stream
));
return
MEGRAY_OK
;
}
...
...
@@ -87,8 +85,6 @@ Status NcclCommunicator::scatter(const void* sendbuff, void* recvbuff,
}
NCCL_CHECK
(
ncclRecv
(
recvbuff
,
recvlen
,
nccl_dtype
,
root
,
m_comm
,
stream
));
ncclGroupEnd
();
// cuda stream synchronize
CUDA_CHECK
(
cudaStreamSynchronize
(
stream
));
return
MEGRAY_OK
;
}
...
...
@@ -109,8 +105,6 @@ Status NcclCommunicator::gather(const void* sendbuff, void* recvbuff,
}
NCCL_CHECK
(
ncclSend
(
sendbuff
,
sendlen
,
nccl_dtype
,
root
,
m_comm
,
stream
));
ncclGroupEnd
();
// cuda stream synchronize
CUDA_CHECK
(
cudaStreamSynchronize
(
stream
));
return
MEGRAY_OK
;
}
...
...
@@ -130,8 +124,6 @@ Status NcclCommunicator::all_to_all(const void* sendbuff, void* recvbuff,
NCCL_CHECK
(
ncclRecv
((
void
*
)
q
,
len
,
nccl_dtype
,
r
,
m_comm
,
stream
));
}
ncclGroupEnd
();
// cuda stream synchronize
CUDA_CHECK
(
cudaStreamSynchronize
(
stream
));
return
MEGRAY_OK
;
}
...
...
@@ -143,7 +135,6 @@ Status NcclCommunicator::all_gather(const void* sendbuff, void* recvbuff, size_t
// perform all gather synchronously
NCCL_CHECK
(
ncclAllGather
(
sendbuff
,
recvbuff
,
sendlen
,
get_nccl_dtype
(
dtype
),
m_comm
,
stream
));
CUDA_CHECK
(
cudaStreamSynchronize
(
stream
));
return
MEGRAY_OK
;
}
...
...
@@ -155,7 +146,6 @@ Status NcclCommunicator::all_reduce(const void* sendbuff, void* recvbuff, size_t
// perform all reduce synchronously
NCCL_CHECK
(
ncclAllReduce
(
sendbuff
,
recvbuff
,
len
,
get_nccl_dtype
(
dtype
),
get_nccl_reduce_op
(
op
),
m_comm
,
stream
));
CUDA_CHECK
(
cudaStreamSynchronize
(
stream
));
return
MEGRAY_OK
;
}
...
...
@@ -167,7 +157,6 @@ Status NcclCommunicator::reduce_scatter(const void* sendbuff, void* recvbuff, si
// perform reduce scatter synchronously
NCCL_CHECK
(
ncclReduceScatter
(
sendbuff
,
recvbuff
,
recvlen
,
get_nccl_dtype
(
dtype
),
get_nccl_reduce_op
(
op
),
m_comm
,
stream
));
CUDA_CHECK
(
cudaStreamSynchronize
(
stream
));
return
MEGRAY_OK
;
}
...
...
@@ -179,7 +168,6 @@ Status NcclCommunicator::broadcast(const void* sendbuff, void* recvbuff, size_t
// perform broadcast synchronously
NCCL_CHECK
(
ncclBroadcast
(
sendbuff
,
recvbuff
,
len
,
get_nccl_dtype
(
dtype
),
root
,
m_comm
,
stream
));
CUDA_CHECK
(
cudaStreamSynchronize
(
stream
));
return
MEGRAY_OK
;
}
...
...
@@ -191,7 +179,6 @@ Status NcclCommunicator::reduce(const void* sendbuff, void* recvbuff, size_t len
// perform reduce synchronously
NCCL_CHECK
(
ncclReduce
(
sendbuff
,
recvbuff
,
len
,
get_nccl_dtype
(
dtype
),
get_nccl_reduce_op
(
op
),
root
,
m_comm
,
stream
));
CUDA_CHECK
(
cudaStreamSynchronize
(
stream
));
return
MEGRAY_OK
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录