Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Crayon鑫
Paddle
提交
67b9b51b
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看板
未验证
提交
67b9b51b
编写于
6月 01, 2022
作者:
G
Guoxia Wang
提交者:
GitHub
6月 01, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
support nccl api for bfloat16, required >= cudnn 10.1, nccl >= 2.10.3 (#43147)
上级
048b0013
变更
8
显示空白变更内容
内联
并排
Showing
8 changed file
with
31 addition
and
0 deletion
+31
-0
paddle/fluid/operators/collective/alltoall_op.cu.cc
paddle/fluid/operators/collective/alltoall_op.cu.cc
+3
-0
paddle/fluid/operators/collective/c_allgather_op.cu.cc
paddle/fluid/operators/collective/c_allgather_op.cu.cc
+3
-0
paddle/fluid/operators/collective/c_allreduce_sum_op.cu.cc
paddle/fluid/operators/collective/c_allreduce_sum_op.cu.cc
+3
-0
paddle/fluid/operators/collective/c_broadcast_op.cu.cc
paddle/fluid/operators/collective/c_broadcast_op.cu.cc
+3
-0
paddle/fluid/operators/collective/c_reducescatter_op.cu.cc
paddle/fluid/operators/collective/c_reducescatter_op.cu.cc
+3
-0
paddle/fluid/operators/collective/recv_v2_op.cu.cc
paddle/fluid/operators/collective/recv_v2_op.cu.cc
+3
-0
paddle/fluid/operators/collective/send_v2_op.cu.cc
paddle/fluid/operators/collective/send_v2_op.cu.cc
+3
-0
paddle/fluid/platform/device/gpu/nccl_helper.h
paddle/fluid/platform/device/gpu/nccl_helper.h
+10
-0
未找到文件。
paddle/fluid/operators/collective/alltoall_op.cu.cc
浏览文件 @
67b9b51b
...
...
@@ -91,6 +91,9 @@ namespace plat = paddle::platform;
REGISTER_OP_CUDA_KERNEL
(
alltoall
,
ops
::
AllToAllOpCUDAKernel
<
float
>
,
ops
::
AllToAllOpCUDAKernel
<
double
>
,
#if CUDNN_VERSION_MIN(8, 1, 0) && NCCL_VERSION_CODE >= 21000
ops
::
AllToAllOpCUDAKernel
<
plat
::
bfloat16
>
,
#endif
ops
::
AllToAllOpCUDAKernel
<
int
>
,
ops
::
AllToAllOpCUDAKernel
<
int64_t
>
,
ops
::
AllToAllOpCUDAKernel
<
plat
::
float16
>
);
paddle/fluid/operators/collective/c_allgather_op.cu.cc
浏览文件 @
67b9b51b
...
...
@@ -90,6 +90,9 @@ namespace plat = paddle::platform;
REGISTER_OP_CUDA_KERNEL
(
c_allgather
,
ops
::
CAllGatherOpCUDAKernel
<
float
>
,
ops
::
CAllGatherOpCUDAKernel
<
double
>
,
#if CUDNN_VERSION_MIN(8, 1, 0) && NCCL_VERSION_CODE >= 21000
ops
::
CAllGatherOpCUDAKernel
<
plat
::
bfloat16
>
,
#endif
ops
::
CAllGatherOpCUDAKernel
<
int
>
,
ops
::
CAllGatherOpCUDAKernel
<
int64_t
>
,
ops
::
CAllGatherOpCUDAKernel
<
plat
::
float16
>
);
paddle/fluid/operators/collective/c_allreduce_sum_op.cu.cc
浏览文件 @
67b9b51b
...
...
@@ -19,6 +19,9 @@ namespace plat = paddle::platform;
REGISTER_OP_CUDA_KERNEL
(
c_allreduce_sum
,
ops
::
CAllReduceOpCUDAKernel
<
ops
::
kRedSum
,
float
>
,
#if CUDNN_VERSION_MIN(8, 1, 0) && NCCL_VERSION_CODE >= 21000
ops
::
CAllReduceOpCUDAKernel
<
ops
::
kRedSum
,
plat
::
bfloat16
>
,
#endif
ops
::
CAllReduceOpCUDAKernel
<
ops
::
kRedSum
,
double
>
,
ops
::
CAllReduceOpCUDAKernel
<
ops
::
kRedSum
,
int
>
,
ops
::
CAllReduceOpCUDAKernel
<
ops
::
kRedSum
,
int64_t
>
,
...
...
paddle/fluid/operators/collective/c_broadcast_op.cu.cc
浏览文件 @
67b9b51b
...
...
@@ -98,6 +98,9 @@ namespace plat = paddle::platform;
REGISTER_OP_CUDA_KERNEL
(
c_broadcast
,
ops
::
CBroadcastOpCUDAKernel
<
float
>
,
ops
::
CBroadcastOpCUDAKernel
<
double
>
,
#if CUDNN_VERSION_MIN(8, 1, 0) && NCCL_VERSION_CODE >= 21000
ops
::
CBroadcastOpCUDAKernel
<
plat
::
bfloat16
>
,
#endif
ops
::
CBroadcastOpCUDAKernel
<
int
>
,
ops
::
CBroadcastOpCUDAKernel
<
int64_t
>
,
ops
::
CBroadcastOpCUDAKernel
<
plat
::
float16
>
);
paddle/fluid/operators/collective/c_reducescatter_op.cu.cc
浏览文件 @
67b9b51b
...
...
@@ -76,6 +76,9 @@ namespace plat = paddle::platform;
REGISTER_OP_CUDA_KERNEL
(
c_reducescatter
,
ops
::
CReduceScatterOpCUDAKernel
<
float
>
,
ops
::
CReduceScatterOpCUDAKernel
<
double
>
,
#if CUDNN_VERSION_MIN(8, 1, 0) && NCCL_VERSION_CODE >= 21000
ops
::
CReduceScatterOpCUDAKernel
<
plat
::
bfloat16
>
,
#endif
ops
::
CReduceScatterOpCUDAKernel
<
int
>
,
ops
::
CReduceScatterOpCUDAKernel
<
int64_t
>
,
ops
::
CReduceScatterOpCUDAKernel
<
plat
::
float16
>
);
paddle/fluid/operators/collective/recv_v2_op.cu.cc
浏览文件 @
67b9b51b
...
...
@@ -224,6 +224,9 @@ namespace plat = paddle::platform;
REGISTER_OP_CUDA_KERNEL
(
recv_v2
,
ops
::
RecvOpV2CUDAKernel
<
float
>
,
ops
::
RecvOpV2CUDAKernel
<
double
>
,
#if CUDNN_VERSION_MIN(8, 1, 0) && NCCL_VERSION_CODE >= 21000
ops
::
RecvOpV2CUDAKernel
<
plat
::
bfloat16
>
,
#endif
ops
::
RecvOpV2CUDAKernel
<
int
>
,
ops
::
RecvOpV2CUDAKernel
<
int64_t
>
,
ops
::
RecvOpV2CUDAKernel
<
int8_t
>
,
...
...
paddle/fluid/operators/collective/send_v2_op.cu.cc
浏览文件 @
67b9b51b
...
...
@@ -197,6 +197,9 @@ namespace plat = paddle::platform;
REGISTER_OP_CUDA_KERNEL
(
send_v2
,
ops
::
SendOpV2CUDAKernel
<
float
>
,
ops
::
SendOpV2CUDAKernel
<
double
>
,
#if CUDNN_VERSION_MIN(8, 1, 0) && NCCL_VERSION_CODE >= 21000
ops
::
SendOpV2CUDAKernel
<
plat
::
bfloat16
>
,
#endif
ops
::
SendOpV2CUDAKernel
<
int
>
,
ops
::
SendOpV2CUDAKernel
<
int64_t
>
,
ops
::
SendOpV2CUDAKernel
<
int8_t
>
,
...
...
paddle/fluid/platform/device/gpu/nccl_helper.h
浏览文件 @
67b9b51b
...
...
@@ -31,6 +31,8 @@
#ifdef PADDLE_WITH_RCCL
#include "paddle/fluid/platform/dynload/rccl.h"
#endif
#include "paddle/fluid/platform/bfloat16.h"
#include "paddle/fluid/platform/device/gpu/gpu_dnn.h"
#include "paddle/fluid/platform/enforce.h"
#include "paddle/fluid/platform/float16.h"
...
...
@@ -52,6 +54,10 @@ inline ncclDataType_t ToNCCLDataType(framework::proto::VarType::Type type) {
return
ncclFloat16
;
}
else
if
(
type
==
framework
::
proto
::
VarType
::
INT8
)
{
return
ncclInt8
;
#if CUDNN_VERSION_MIN(8, 1, 0) && NCCL_VERSION_CODE >= 21000
}
else
if
(
type
==
framework
::
proto
::
VarType
::
BF16
)
{
return
ncclBfloat16
;
#endif
}
else
{
PADDLE_THROW
(
platform
::
errors
::
Unimplemented
(
"This datatype in nccl is not supported."
));
...
...
@@ -69,6 +75,10 @@ inline ncclDataType_t ToNCCLDataType(experimental::DataType type) {
return
ncclInt64
;
}
else
if
(
type
==
experimental
::
DataType
::
FLOAT16
)
{
return
ncclFloat16
;
#if CUDNN_VERSION_MIN(8, 1, 0) && NCCL_VERSION_CODE >= 21000
}
else
if
(
type
==
experimental
::
DataType
::
BFLOAT16
)
{
return
ncclBfloat16
;
#endif
}
else
{
PADDLE_THROW
(
platform
::
errors
::
Unimplemented
(
"This datatype in nccl is not supported."
));
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录