Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle-Lite
提交
2c380625
P
Paddle-Lite
项目概览
PaddlePaddle
/
Paddle-Lite
通知
331
Star
4
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
271
列表
看板
标记
里程碑
合并请求
78
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle-Lite
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
271
Issue
271
列表
看板
标记
里程碑
合并请求
78
合并请求
78
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
2c380625
编写于
10月 31, 2019
作者:
J
Jiaying Zhao
提交者:
GitHub
10月 31, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add GPU_CL for test_net_benchmark. (#2307)
* add GPU_CL for test_net_benchmark. * test compile * fix mobile build error
上级
f6b38e34
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
14 addition
and
14 deletion
+14
-14
mobile/src/operators/elementwise_mul_op.cpp
mobile/src/operators/elementwise_mul_op.cpp
+1
-1
mobile/test/CMakeLists.txt
mobile/test/CMakeLists.txt
+2
-8
mobile/test/net/test_net_benchmark.cpp
mobile/test/net/test_net_benchmark.cpp
+11
-5
未找到文件。
mobile/src/operators/elementwise_mul_op.cpp
浏览文件 @
2c380625
...
@@ -32,7 +32,7 @@ namespace ops = paddle_mobile::operators;
...
@@ -32,7 +32,7 @@ namespace ops = paddle_mobile::operators;
#ifdef PADDLE_MOBILE_CPU
#ifdef PADDLE_MOBILE_CPU
REGISTER_OPERATOR_CPU
(
elementwise_mul
,
ops
::
ElementwiseMulOp
);
REGISTER_OPERATOR_CPU
(
elementwise_mul
,
ops
::
ElementwiseMulOp
);
#endif
#endif
#ifdef PADDLE_MOBILE_C
PU
#ifdef PADDLE_MOBILE_C
L
REGISTER_OPERATOR_CL
(
elementwise_mul
,
ops
::
ElementwiseMulOp
);
REGISTER_OPERATOR_CL
(
elementwise_mul
,
ops
::
ElementwiseMulOp
);
#endif
#endif
#ifdef PADDLE_MOBILE_FPGA
#ifdef PADDLE_MOBILE_FPGA
...
...
mobile/test/CMakeLists.txt
浏览文件 @
2c380625
...
@@ -544,12 +544,6 @@ else()
...
@@ -544,12 +544,6 @@ else()
ADD_EXECUTABLE
(
test-net net/test_net.cpp test_helper.h test_include.h executor_for_test.h
)
ADD_EXECUTABLE
(
test-net net/test_net.cpp test_helper.h test_include.h executor_for_test.h
)
target_link_libraries
(
test-net paddle-mobile
)
target_link_libraries
(
test-net paddle-mobile
)
ADD_EXECUTABLE
(
test-super net/test_super.cpp test_helper.h test_include.h executor_for_test.h
)
ADD_EXECUTABLE
(
test-net-benchmark net/test_net_benchmark.cpp test_helper.h test_include.h
)
target_link_libraries
(
test-super paddle-mobile
)
target_link_libraries
(
test-net-benchmark paddle-mobile
)
ADD_EXECUTABLE
(
test-inference-pre-post net/test_inference_pre_post.cpp
)
target_link_libraries
(
test-inference-pre-post paddle-mobile
)
ADD_EXECUTABLE
(
test-inference-super net/test_inference_super.cpp
)
target_link_libraries
(
test-inference-super paddle-mobile
)
endif
()
endif
()
mobile/test/net/test_net_benchmark.cpp
浏览文件 @
2c380625
...
@@ -17,20 +17,26 @@ limitations under the License. */
...
@@ -17,20 +17,26 @@ limitations under the License. */
#include "../test_include.h"
#include "../test_include.h"
int
main
()
{
int
main
()
{
#ifdef PADDLE_MOBILE_CL
paddle_mobile
::
PaddleMobileConfigInternal
config
;
config
.
load_when_predict
=
false
;
paddle_mobile
::
PaddleMobile
<
paddle_mobile
::
GPU_CL
>
paddle_mobile
(
config
);
#else
paddle_mobile
::
PaddleMobile
<
paddle_mobile
::
CPU
>
paddle_mobile
;
paddle_mobile
::
PaddleMobile
<
paddle_mobile
::
CPU
>
paddle_mobile
;
#endif
paddle_mobile
.
SetThreadNum
(
1
);
paddle_mobile
.
SetThreadNum
(
1
);
auto
time1
=
paddle_mobile
::
time
();
auto
time1
=
paddle_mobile
::
time
();
auto
isok
=
auto
isok
=
paddle_mobile
.
Load
(
std
::
string
(
g_mobilenet_combined
)
+
"/model"
,
paddle_mobile
.
Load
(
std
::
string
(
g_yolo
)
+
"/model
"
,
std
::
string
(
g_mobilenet_combined
)
+
"/params
"
,
std
::
string
(
g_yolo
)
+
"/params"
,
true
,
false
,
1
,
tru
e
);
true
,
false
,
1
,
fals
e
);
if
(
isok
)
{
if
(
isok
)
{
auto
time2
=
paddle_mobile
::
time
();
auto
time2
=
paddle_mobile
::
time
();
std
::
cout
<<
"load cost :"
<<
paddle_mobile
::
time_diff
(
time1
,
time
1
)
<<
"ms"
std
::
cout
<<
"load cost :"
<<
paddle_mobile
::
time_diff
(
time1
,
time
2
)
<<
"ms"
<<
std
::
endl
;
<<
std
::
endl
;
std
::
vector
<
float
>
input
;
std
::
vector
<
float
>
input
;
std
::
vector
<
int64_t
>
dims
{
1
,
3
,
64
,
6
4
};
std
::
vector
<
int64_t
>
dims
{
1
,
3
,
224
,
22
4
};
GetInput
<
float
>
(
g_test_image_1x3x224x224_banana
,
&
input
,
dims
);
GetInput
<
float
>
(
g_test_image_1x3x224x224_banana
,
&
input
,
dims
);
paddle_mobile
::
framework
::
DDim
ddim
=
paddle_mobile
::
framework
::
DDim
ddim
=
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录