Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
8462e2b8
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看板
提交
8462e2b8
编写于
6月 13, 2019
作者:
M
Michał Gallus
提交者:
Tao Luo
6月 13, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Disable MKLDNN FC in Resnet50 test (#18030)
上级
78e93286
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
10 addition
and
8 deletion
+10
-8
cmake/generic.cmake
cmake/generic.cmake
+1
-1
paddle/fluid/inference/tests/api/CMakeLists.txt
paddle/fluid/inference/tests/api/CMakeLists.txt
+3
-5
paddle/fluid/inference/tests/api/analyzer_resnet50_tester.cc
paddle/fluid/inference/tests/api/analyzer_resnet50_tester.cc
+6
-2
未找到文件。
cmake/generic.cmake
浏览文件 @
8462e2b8
...
@@ -385,7 +385,7 @@ function(cc_test TARGET_NAME)
...
@@ -385,7 +385,7 @@ function(cc_test TARGET_NAME)
set_property
(
TEST
${
TARGET_NAME
}
PROPERTY ENVIRONMENT FLAGS_cpu_deterministic=true
)
set_property
(
TEST
${
TARGET_NAME
}
PROPERTY ENVIRONMENT FLAGS_cpu_deterministic=true
)
set_property
(
TEST
${
TARGET_NAME
}
PROPERTY ENVIRONMENT FLAGS_init_allocated_mem=true
)
set_property
(
TEST
${
TARGET_NAME
}
PROPERTY ENVIRONMENT FLAGS_init_allocated_mem=true
)
set_property
(
TEST
${
TARGET_NAME
}
PROPERTY ENVIRONMENT FLAGS_limit_of_tmp_allocation=4294967296
)
# 4G
set_property
(
TEST
${
TARGET_NAME
}
PROPERTY ENVIRONMENT FLAGS_limit_of_tmp_allocation=4294967296
)
# 4G
set_property
(
TEST
${
TARGET_NAME
}
PROPERTY ENVIRONMENT FLAGS_cudnn_deterministic=true
${
MKL_DEBUG_FLAG
}
)
set_property
(
TEST
${
TARGET_NAME
}
PROPERTY ENVIRONMENT FLAGS_cudnn_deterministic=true
)
# No unit test should exceed 10 minutes.
# No unit test should exceed 10 minutes.
set_tests_properties
(
${
TARGET_NAME
}
PROPERTIES TIMEOUT 600
)
set_tests_properties
(
${
TARGET_NAME
}
PROPERTIES TIMEOUT 600
)
endif
()
endif
()
...
...
paddle/fluid/inference/tests/api/CMakeLists.txt
浏览文件 @
8462e2b8
...
@@ -33,14 +33,12 @@ function(inference_analysis_api_int8_test target model_dir data_dir filename)
...
@@ -33,14 +33,12 @@ function(inference_analysis_api_int8_test target model_dir data_dir filename)
--paddle_num_threads=
${
CPU_NUM_THREADS_ON_CI
}
--paddle_num_threads=
${
CPU_NUM_THREADS_ON_CI
}
--iterations=2
)
--iterations=2
)
endfunction
()
endfunction
()
function
(
inference_analysis_api_test_with_fake_data target install_dir filename model_name mkl_debug
)
function
(
inference_analysis_api_test_with_fake_data target install_dir filename model_name disable_fc
)
if
(
mkl_debug
)
set
(
MKL_DEBUG_FLAG MKL_DEBUG_CPU_TYPE=7
)
endif
()
download_model
(
${
install_dir
}
${
model_name
}
)
download_model
(
${
install_dir
}
${
model_name
}
)
inference_analysis_test
(
${
target
}
SRCS
${
filename
}
inference_analysis_test
(
${
target
}
SRCS
${
filename
}
EXTRA_DEPS
${
INFERENCE_EXTRA_DEPS
}
EXTRA_DEPS
${
INFERENCE_EXTRA_DEPS
}
ARGS --infer_model=
${
install_dir
}
/model
)
ARGS --infer_model=
${
install_dir
}
/model
--disable_mkldnn_fc=
${
disable_fc
}
)
endfunction
()
endfunction
()
function
(
inference_analysis_api_test_with_refer_result target install_dir filename
)
function
(
inference_analysis_api_test_with_refer_result target install_dir filename
)
...
...
paddle/fluid/inference/tests/api/analyzer_resnet50_tester.cc
浏览文件 @
8462e2b8
...
@@ -16,6 +16,8 @@ limitations under the License. */
...
@@ -16,6 +16,8 @@ limitations under the License. */
#include <iostream>
#include <iostream>
#include "paddle/fluid/inference/tests/api/tester_helper.h"
#include "paddle/fluid/inference/tests/api/tester_helper.h"
DEFINE_bool
(
disable_mkldnn_fc
,
false
,
"Disable usage of MKL-DNN's FC op"
);
namespace
paddle
{
namespace
paddle
{
namespace
inference
{
namespace
inference
{
namespace
analysis
{
namespace
analysis
{
...
@@ -48,7 +50,8 @@ void profile(bool use_mkldnn = false) {
...
@@ -48,7 +50,8 @@ void profile(bool use_mkldnn = false) {
if
(
use_mkldnn
)
{
if
(
use_mkldnn
)
{
cfg
.
EnableMKLDNN
();
cfg
.
EnableMKLDNN
();
cfg
.
pass_builder
()
->
AppendPass
(
"fc_mkldnn_pass"
);
if
(
!
FLAGS_disable_mkldnn_fc
)
cfg
.
pass_builder
()
->
AppendPass
(
"fc_mkldnn_pass"
);
}
}
std
::
vector
<
std
::
vector
<
PaddleTensor
>>
outputs
;
std
::
vector
<
std
::
vector
<
PaddleTensor
>>
outputs
;
...
@@ -80,7 +83,8 @@ void compare(bool use_mkldnn = false) {
...
@@ -80,7 +83,8 @@ void compare(bool use_mkldnn = false) {
SetConfig
(
&
cfg
);
SetConfig
(
&
cfg
);
if
(
use_mkldnn
)
{
if
(
use_mkldnn
)
{
cfg
.
EnableMKLDNN
();
cfg
.
EnableMKLDNN
();
cfg
.
pass_builder
()
->
AppendPass
(
"fc_mkldnn_pass"
);
if
(
!
FLAGS_disable_mkldnn_fc
)
cfg
.
pass_builder
()
->
AppendPass
(
"fc_mkldnn_pass"
);
}
}
std
::
vector
<
std
::
vector
<
PaddleTensor
>>
input_slots_all
;
std
::
vector
<
std
::
vector
<
PaddleTensor
>>
input_slots_all
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录