Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
6626c6a6
P
Paddle
项目概览
PaddlePaddle
/
Paddle
11 个月 前同步成功
通知
2290
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看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
6626c6a6
编写于
3月 03, 2021
作者:
Q
Qi Li
提交者:
GitHub
3月 03, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix bert cu file compiler error, test=develop (#31389)
上级
c1bc2236
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
3 addition
and
3 deletion
+3
-3
paddle/fluid/operators/math/bert_encoder_functor.cu
paddle/fluid/operators/math/bert_encoder_functor.cu
+3
-3
未找到文件。
paddle/fluid/operators/math/bert_encoder_functor.cu
浏览文件 @
6626c6a6
...
@@ -289,7 +289,7 @@ __global__ void SoftmaxKernelWithEltadd2<half2>(
...
@@ -289,7 +289,7 @@ __global__ void SoftmaxKernelWithEltadd2<half2>(
const
int
head_num
,
const
int
seq_len
,
const
unsigned
mask
)
{
const
int
head_num
,
const
int
seq_len
,
const
unsigned
mask
)
{
// operator "+" of half only suppotted after cuda version 10.0
// operator "+" of half only suppotted after cuda version 10.0
// HIP defined __HIP_NO_HALF_CONVERSIONS__ in hip.cmake
// HIP defined __HIP_NO_HALF_CONVERSIONS__ in hip.cmake
#if defined(PADDLE_WITH_CUDA)
||
\
#if defined(PADDLE_WITH_CUDA)
&&
\
(CUDA_ARCH_FP16_SUPPORTED(__CUDA_ARCH__) && CUDA_VERSION >= 10000)
(CUDA_ARCH_FP16_SUPPORTED(__CUDA_ARCH__) && CUDA_VERSION >= 10000)
int
qk_offset
=
blockIdx
.
x
*
seq_len
;
int
qk_offset
=
blockIdx
.
x
*
seq_len
;
int
idx
=
threadIdx
.
x
;
int
idx
=
threadIdx
.
x
;
...
@@ -407,7 +407,7 @@ template class MultiHeadGPUComputeFunctor<float>;
...
@@ -407,7 +407,7 @@ template class MultiHeadGPUComputeFunctor<float>;
// device function 'operator()' is not supportted until cuda 10.0
// device function 'operator()' is not supportted until cuda 10.0
// HIP defined __HIP_NO_HALF_CONVERSIONS__ in hip.cmake
// HIP defined __HIP_NO_HALF_CONVERSIONS__ in hip.cmake
#if defined(PADDLE_WITH_CUDA)
||
CUDA_VERSION >= 10000
#if defined(PADDLE_WITH_CUDA)
&&
CUDA_VERSION >= 10000
template
class
MultiHeadGPUComputeFunctor
<
half
>;
template
class
MultiHeadGPUComputeFunctor
<
half
>;
#endif
#endif
...
@@ -646,7 +646,7 @@ template class SkipLayerNormFunctor<float>;
...
@@ -646,7 +646,7 @@ template class SkipLayerNormFunctor<float>;
// device function 'operator()' is not supportted until cuda 10.0
// device function 'operator()' is not supportted until cuda 10.0
// HIP defined __HIP_NO_HALF_CONVERSIONS__ in hip.cmake
// HIP defined __HIP_NO_HALF_CONVERSIONS__ in hip.cmake
#if defined(PADDLE_WITH_CUDA)
||
CUDA_VERSION >= 10000
#if defined(PADDLE_WITH_CUDA)
&&
CUDA_VERSION >= 10000
template
class
SkipLayerNormFunctor
<
half
>;
template
class
SkipLayerNormFunctor
<
half
>;
#endif
#endif
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录