Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
7b0692a6
P
Paddle
项目概览
PaddlePaddle
/
Paddle
大约 1 年 前同步成功
通知
2299
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看板
未验证
提交
7b0692a6
编写于
1月 21, 2020
作者:
J
juncaipeng
提交者:
GitHub
1月 21, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
remove skip_check in test_activation_mkldnn_op, test=develop (#22376)
* remove skip_check in test_activation_mkldnn_op, test=develop
上级
5f655d2c
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
10 addition
and
12 deletion
+10
-12
python/paddle/fluid/tests/unittests/mkldnn/test_activation_mkldnn_op.py
...fluid/tests/unittests/mkldnn/test_activation_mkldnn_op.py
+1
-2
python/paddle/fluid/tests/unittests/op_test.py
python/paddle/fluid/tests/unittests/op_test.py
+9
-10
未找到文件。
python/paddle/fluid/tests/unittests/mkldnn/test_activation_mkldnn_op.py
浏览文件 @
7b0692a6
...
...
@@ -17,7 +17,7 @@ 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
,
skip_check_grad_ci
from
paddle.fluid.tests.unittests.op_test
import
OpTest
from
paddle.fluid.tests.unittests.test_activation_op
import
TestRelu
,
TestTanh
,
TestSqrt
,
TestAbs
,
TestLeakyRelu
from
mkldnn_op_test
import
check_if_mkldnn_primitives_exist_in_bwd
...
...
@@ -111,7 +111,6 @@ class TestMKLDNNAbsDim2(TestAbs):
[
'X'
],
'Out'
,
max_relative_error
=
0.007
,
check_dygraph
=
False
)
@
skip_check_grad_ci
(
reason
=
"Use float32 in mkldnn relu op."
)
class
TestMKLDNNReluDim4
(
TestRelu
):
def
setUp
(
self
):
super
(
TestMKLDNNReluDim4
,
self
).
setUp
()
...
...
python/paddle/fluid/tests/unittests/op_test.py
浏览文件 @
7b0692a6
...
...
@@ -208,12 +208,7 @@ class OpTest(unittest.TestCase):
return
True
def
is_mkldnn_op_test
():
if
(
hasattr
(
cls
,
"use_mkldnn"
)
and
cls
.
use_mkldnn
==
True
)
or
\
(
hasattr
(
cls
,
"attrs"
)
and
"use_mkldnn"
in
cls
.
attrs
and
\
cls
.
attrs
[
"use_mkldnn"
]
==
True
):
return
True
else
:
return
False
return
hasattr
(
cls
,
"use_mkldnn"
)
and
cls
.
use_mkldnn
==
True
if
not
hasattr
(
cls
,
"op_type"
):
raise
AssertionError
(
...
...
@@ -321,8 +316,10 @@ class OpTest(unittest.TestCase):
def
_append_ops
(
self
,
block
):
self
.
__class__
.
op_type
=
self
.
op_type
# for ci check, please not delete it for now
if
hasattr
(
self
,
"use_mkldnn"
):
self
.
__class__
.
use_mkldnn
=
self
.
use_mkldnn
if
(
hasattr
(
self
,
"use_mkldnn"
)
and
self
.
use_mkldnn
==
True
)
or
\
(
hasattr
(
self
,
"attrs"
)
and
"use_mkldnn"
in
self
.
attrs
and
\
self
.
attrs
[
"use_mkldnn"
]
==
True
):
self
.
__class__
.
use_mkldnn
=
True
op_proto
=
OpProtoHolder
.
instance
().
get_op_proto
(
self
.
op_type
)
"infer datatype from inputs and outputs for this test case"
self
.
infer_dtype_from_inputs_outputs
(
self
.
inputs
,
self
.
outputs
)
...
...
@@ -1189,8 +1186,10 @@ class OpTest(unittest.TestCase):
check_dygraph
=
True
,
inplace_atol
=
None
):
self
.
__class__
.
op_type
=
self
.
op_type
if
hasattr
(
self
,
"use_mkldnn"
):
self
.
__class__
.
use_mkldnn
=
self
.
use_mkldnn
if
(
hasattr
(
self
,
"use_mkldnn"
)
and
self
.
use_mkldnn
==
True
)
or
\
(
hasattr
(
self
,
"attrs"
)
and
"use_mkldnn"
in
self
.
attrs
and
\
self
.
attrs
[
"use_mkldnn"
]
==
True
):
self
.
__class__
.
use_mkldnn
=
True
places
=
self
.
_get_places
()
for
place
in
places
:
res
=
self
.
check_output_with_place
(
place
,
atol
,
no_check_set
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录