Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Crayon鑫
Paddle
提交
8462e2b8
P
Paddle
项目概览
Crayon鑫
/
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看板
提交
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,6 +50,7 @@ void profile(bool use_mkldnn = false) {
...
@@ -48,6 +50,7 @@ void profile(bool use_mkldnn = false) {
if
(
use_mkldnn
)
{
if
(
use_mkldnn
)
{
cfg
.
EnableMKLDNN
();
cfg
.
EnableMKLDNN
();
if
(
!
FLAGS_disable_mkldnn_fc
)
cfg
.
pass_builder
()
->
AppendPass
(
"fc_mkldnn_pass"
);
cfg
.
pass_builder
()
->
AppendPass
(
"fc_mkldnn_pass"
);
}
}
std
::
vector
<
std
::
vector
<
PaddleTensor
>>
outputs
;
std
::
vector
<
std
::
vector
<
PaddleTensor
>>
outputs
;
...
@@ -80,6 +83,7 @@ void compare(bool use_mkldnn = false) {
...
@@ -80,6 +83,7 @@ void compare(bool use_mkldnn = false) {
SetConfig
(
&
cfg
);
SetConfig
(
&
cfg
);
if
(
use_mkldnn
)
{
if
(
use_mkldnn
)
{
cfg
.
EnableMKLDNN
();
cfg
.
EnableMKLDNN
();
if
(
!
FLAGS_disable_mkldnn_fc
)
cfg
.
pass_builder
()
->
AppendPass
(
"fc_mkldnn_pass"
);
cfg
.
pass_builder
()
->
AppendPass
(
"fc_mkldnn_pass"
);
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录