Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
b681215a
P
Paddle
项目概览
PaddlePaddle
/
Paddle
1 年多 前同步成功
通知
2302
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看板
未验证
提交
b681215a
编写于
3月 01, 2020
作者:
L
lidanqing
提交者:
GitHub
3月 01, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add @skip_check_grad_ci to UT conv_mkldnn and int8_mul_mkldnn (#22760)
上级
68a92e46
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
15 addition
and
32 deletion
+15
-32
python/paddle/fluid/tests/unittests/mkldnn/test_conv2d_mkldnn_op.py
...dle/fluid/tests/unittests/mkldnn/test_conv2d_mkldnn_op.py
+5
-19
python/paddle/fluid/tests/unittests/mkldnn/test_mul_int8_mkldnn_op.py
...e/fluid/tests/unittests/mkldnn/test_mul_int8_mkldnn_op.py
+4
-10
python/paddle/fluid/tests/unittests/test_conv2d_op.py
python/paddle/fluid/tests/unittests/test_conv2d_op.py
+6
-3
未找到文件。
python/paddle/fluid/tests/unittests/mkldnn/test_conv2d_mkldnn_op.py
浏览文件 @
b681215a
...
...
@@ -18,7 +18,7 @@ import unittest
import
numpy
as
np
import
paddle.fluid.core
as
core
from
paddle.fluid.tests.unittests.op_test
import
OpTest
from
paddle.fluid.tests.unittests.op_test
import
OpTest
,
skip_check_grad_ci
from
paddle.fluid.tests.unittests.test_conv2d_op
import
TestConv2dOp
,
TestConv2dOp_v2
...
...
@@ -104,6 +104,8 @@ class TestConv2dMKLDNNOp(TestConv2dOp):
self
.
outputs
[
'Output'
]
=
output
@
skip_check_grad_ci
(
reason
=
"Fusion is for inference only, check_grad is not required."
)
class
TestWithbreluFusion
(
TestConv2dMKLDNNOp
):
def
init_test_case
(
self
):
TestConv2dMKLDNNOp
.
init_test_case
(
self
)
...
...
@@ -111,16 +113,9 @@ class TestWithbreluFusion(TestConv2dMKLDNNOp):
self
.
fuse_alpha
=
6.0
self
.
dsttype
=
np
.
float32
def
test_check_grad
(
self
):
pass
def
test_check_grad_no_filter
(
self
):
pass
def
test_check_grad_no_input
(
self
):
pass
@
skip_check_grad_ci
(
reason
=
"Fusion is for inference only, check_grad is not required."
)
class
TestWithFuse
(
TestConv2dMKLDNNOp
):
def
init_test_case
(
self
):
TestConv2dMKLDNNOp
.
init_test_case
(
self
)
...
...
@@ -130,15 +125,6 @@ class TestWithFuse(TestConv2dMKLDNNOp):
self
.
fuse_residual_connection
=
True
self
.
input_residual_size
=
[
2
,
6
,
5
,
5
]
def
test_check_grad
(
self
):
pass
def
test_check_grad_no_filter
(
self
):
pass
def
test_check_grad_no_input
(
self
):
pass
class
TestWithPadWithBias
(
TestConv2dMKLDNNOp
):
def
init_test_case
(
self
):
...
...
python/paddle/fluid/tests/unittests/mkldnn/test_mul_int8_mkldnn_op.py
浏览文件 @
b681215a
...
...
@@ -17,12 +17,15 @@ from __future__ import print_function
import
unittest
import
numpy
as
np
import
paddle.fluid.core
as
core
from
paddle.fluid.tests.unittests.op_test
import
OpTest
from
paddle.fluid.tests.unittests.op_test
import
OpTest
,
skip_check_grad_ci
'''
test case for s8 * s8
'''
@
skip_check_grad_ci
(
reason
=
"mul_mkldnn_op does not implement grad operator, check_grad is not required."
)
class
TestMKLDNNMulOpS8S8
(
OpTest
):
def
setUp
(
self
):
self
.
op_type
=
"mul"
...
...
@@ -77,15 +80,6 @@ class TestMKLDNNMulOpS8S8(OpTest):
self
.
check_output_with_place
(
core
.
CPUPlace
(),
atol
=
0
,
check_dygraph
=
False
)
def
test_check_grad_normal
(
self
):
pass
def
test_check_grad_ingore_x
(
self
):
pass
def
test_check_grad_ingore_y
(
self
):
pass
'''
test case for s8 * u8
...
...
python/paddle/fluid/tests/unittests/test_conv2d_op.py
浏览文件 @
b681215a
...
...
@@ -355,7 +355,8 @@ class TestConv2dOp(OpTest):
place
,
atol
=
1e-5
,
check_dygraph
=
(
self
.
use_mkldnn
==
False
))
def
test_check_grad
(
self
):
if
self
.
dtype
==
np
.
float16
:
if
self
.
dtype
==
np
.
float16
or
(
hasattr
(
self
,
"no_need_check_grad"
)
and
self
.
no_need_check_grad
==
True
):
return
place
=
core
.
CUDAPlace
(
0
)
if
self
.
has_cuda
()
else
core
.
CPUPlace
()
# TODO(wangzhongpu): support mkldnn op in dygraph mode
...
...
@@ -366,7 +367,8 @@ class TestConv2dOp(OpTest):
check_dygraph
=
(
self
.
use_mkldnn
==
False
))
def
test_check_grad_no_filter
(
self
):
if
self
.
dtype
==
np
.
float16
:
if
self
.
dtype
==
np
.
float16
or
(
hasattr
(
self
,
"no_need_check_grad"
)
and
self
.
no_need_check_grad
==
True
):
return
place
=
core
.
CUDAPlace
(
0
)
if
self
.
has_cuda
()
else
core
.
CPUPlace
()
# TODO(wangzhongpu): support mkldnn op in dygraph mode
...
...
@@ -378,7 +380,8 @@ class TestConv2dOp(OpTest):
check_dygraph
=
(
self
.
use_mkldnn
==
False
))
def
test_check_grad_no_input
(
self
):
if
self
.
dtype
==
np
.
float16
:
if
self
.
dtype
==
np
.
float16
or
(
hasattr
(
self
,
"no_need_check_grad"
)
and
self
.
no_need_check_grad
==
True
):
return
place
=
core
.
CUDAPlace
(
0
)
if
self
.
has_cuda
()
else
core
.
CPUPlace
()
# TODO(wangzhongpu): support mkldnn op in dygraph mode
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录