Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
机器未来
Paddle
提交
7c542c29
P
Paddle
项目概览
机器未来
/
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看板
未验证
提交
7c542c29
编写于
9月 02, 2022
作者:
Z
zhangbo9674
提交者:
GitHub
9月 02, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Improve some control conditions of bfloat16 OP unittest (#45639)
上级
b12c27eb
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
16 addition
and
8 deletion
+16
-8
python/paddle/fluid/tests/unittests/test_elementwise_add_op.py
...n/paddle/fluid/tests/unittests/test_elementwise_add_op.py
+4
-2
python/paddle/fluid/tests/unittests/test_elementwise_max_op.py
...n/paddle/fluid/tests/unittests/test_elementwise_max_op.py
+5
-3
python/paddle/fluid/tests/unittests/test_layer_norm_op.py
python/paddle/fluid/tests/unittests/test_layer_norm_op.py
+3
-1
python/paddle/fluid/tests/unittests/test_softmax_op.py
python/paddle/fluid/tests/unittests/test_softmax_op.py
+4
-2
未找到文件。
python/paddle/fluid/tests/unittests/test_elementwise_add_op.py
浏览文件 @
7c542c29
...
...
@@ -108,8 +108,10 @@ class TestFP16ElementwiseAddOp(TestElementwiseAddOp):
@
unittest
.
skipIf
(
not
core
.
is_compiled_with_cuda
()
or
core
.
cudnn_version
()
<
8100
,
"core is not compiled with CUDA and cudnn version need larger than 8.1.0"
)
not
core
.
is_compiled_with_cuda
()
or
core
.
cudnn_version
()
<
8100
or
paddle
.
device
.
cuda
.
get_device_capability
()[
0
]
<
8
,
"only support compiled with CUDA and cudnn version need larger than 8.1.0 and device's compute capability is at least 8.0"
)
class
TestBF16ElementwiseAddOp
(
OpTest
):
def
setUp
(
self
):
...
...
python/paddle/fluid/tests/unittests/test_elementwise_max_op.py
浏览文件 @
7c542c29
...
...
@@ -62,9 +62,11 @@ class TestElementwiseOp(OpTest):
no_grad_set
=
set
(
'Y'
))
@
unittest
.
skipIf
(
core
.
is_compiled_with_cuda
()
and
core
.
cudnn_version
()
<
8100
,
"run test when gpu is availble and the minimum cudnn version is 8.1.0."
)
@
unittest
.
skipIf
(
core
.
is_compiled_with_cuda
()
and
(
core
.
cudnn_version
()
<
8100
or
paddle
.
device
.
cuda
.
get_device_capability
()[
0
]
<
8
),
"run test when gpu is availble and the minimum cudnn version is 8.1.0 and gpu's compute capability is at least 8.0."
)
class
TestElementwiseBF16Op
(
OpTest
):
def
setUp
(
self
):
...
...
python/paddle/fluid/tests/unittests/test_layer_norm_op.py
浏览文件 @
7c542c29
...
...
@@ -417,7 +417,9 @@ class TestBF16ScaleBiasLayerNorm(unittest.TestCase):
return
y_np
,
x_g_np
,
w_g_np
,
b_g_np
def
test_main
(
self
):
if
(
not
core
.
is_compiled_with_cuda
())
or
(
core
.
cudnn_version
()
<
8100
):
if
(
not
core
.
is_compiled_with_cuda
())
or
(
core
.
cudnn_version
()
<
8100
)
or
(
paddle
.
device
.
cuda
.
get_device_capability
()[
0
]
<
8
):
return
x_np
=
np
.
random
.
random
([
10
,
20
]).
astype
(
'float32'
)
weight_np
=
np
.
random
.
random
([
20
]).
astype
(
'float32'
)
...
...
python/paddle/fluid/tests/unittests/test_softmax_op.py
浏览文件 @
7c542c29
...
...
@@ -360,8 +360,10 @@ class TestSoftmaxBF16Op(OpTest):
@
unittest
.
skipIf
(
not
core
.
is_compiled_with_cuda
()
or
core
.
cudnn_version
()
<
8100
,
"core is not compiled with CUDA and cudnn version need larger than 8.1.0"
)
not
core
.
is_compiled_with_cuda
()
or
core
.
cudnn_version
()
<
8100
or
paddle
.
device
.
cuda
.
get_device_capability
()[
0
]
<
8
,
"only support compiled with CUDA and cudnn version need larger than 8.1.0 and device's compute capability is at least 8.0"
)
class
TestSoftmaxBF16CUDNNOp
(
TestSoftmaxBF16Op
):
def
init_cudnn
(
self
):
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录