Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle-Lite
提交
a12c9bfd
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看板
未验证
提交
a12c9bfd
编写于
8月 15, 2018
作者:
Z
zhangyang0701
提交者:
GitHub
8月 15, 2018
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'develop' into develop
上级
727cc8dc
e62404ec
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
32 addition
and
25 deletion
+32
-25
README.md
README.md
+5
-5
src/io/executor.cpp
src/io/executor.cpp
+8
-2
src/operators/math/gemm.cpp
src/operators/math/gemm.cpp
+16
-16
test/net/test_squeezenet.cpp
test/net/test_squeezenet.cpp
+1
-1
test/net/test_yolo.cpp
test/net/test_yolo.cpp
+1
-1
test/operators/test_fusion_conv_add_bn_relu_op.cpp
test/operators/test_fusion_conv_add_bn_relu_op.cpp
+1
-0
未找到文件。
README.md
浏览文件 @
a12c9bfd
...
...
@@ -28,19 +28,19 @@ Paddle-Moible是PaddlePaddle组织下的项目,是一个致力于嵌入式平
|mobilenet arm v7|1线程|2线程|4线程|
|------------|----|-----|-----|
|麒麟960(ms)|110.586|
70.897|47.474
|
|麒麟960(ms)|110.586|
63.285|38.215
|
|||||
|mobilenetssd arm v7|1线程|2线程|4线程|
|麒麟960(ms)|22
2.124|138.952|90.856
|
|麒麟960(ms)|22
0.248|128.473|79.334
|
|||||
|googlenet(v1) arm v7|1线程|2线程|4线程|
|麒麟960(ms)|34
8.018|240.304|169.998
|
|麒麟960(ms)|34
1.965|228.724|161.531
|
|||||
|squeezenet arm v7|1线程|2线程|4线程|
|麒麟960(ms)|84.
685|56.544|38.833
|
|麒麟960(ms)|84.
080|55.641|37.182
|
|||||
|yolo arm v7|1线程|2线程|4线程|
|麒麟960(ms)|1
31.831|88.990|60.905
|
|麒麟960(ms)|1
29.445|80.627|50.936
|
arm cpu是paddle-mobile的主要支持方向,cpu的通用性一直是其优势。嵌入式深度学习,需要大量的cpu汇编实现。我们正在紧锣密鼓的编码,为的是能充分硬件的每一点加速能力。
arm cpu的优化工作还在进行中,现在使用了常规的cpu优化。在arm a73上paddle-mobile arm-v7现在单核运行一次mobilenet1.0是110+ms,显然这不是我们的最终目标,我们正在用大量的汇编改写,后续性能仍会有巨大提升空间, 目前只支持armv7, 未来我们也会支持armv8。
...
...
src/io/executor.cpp
浏览文件 @
a12c9bfd
...
...
@@ -192,8 +192,14 @@ void Executor<Dtype, P>::LoadMemory(const framework::VarDesc var_desc,
}
*
data
+=
(
memory_size
*
sizeof
(
uint8_t
));
}
else
{
for
(
int
n
=
0
;
n
<
memory_size
*
type_size
;
++
n
)
{
static_cast
<
char
*>
(
memory
)[
n
]
=
(
*
data
)[
n
];
for
(
int
n
=
0
;
n
<
memory_size
;
n
++
)
{
float
value
;
memcpy
(
&
value
,
*
data
+
n
*
type_size
,
type_size
);
if
(
value
<
1e-30
&&
value
>
-
1e-30
)
{
static_cast
<
float
*>
(
memory
)[
n
]
=
0.0
;
}
else
{
static_cast
<
float
*>
(
memory
)[
n
]
=
value
;
}
}
(
*
data
)
+=
(
sizeof
(
char
)
*
memory_size
*
type_size
);
}
...
...
src/operators/math/gemm.cpp
浏览文件 @
a12c9bfd
...
...
@@ -2957,8 +2957,8 @@ void AddDot6x8(int k, const float *a, const float *b, float *c, int ldc) {
"vmov.f32 q15, #0.0
\n\t
"
"subs %[kc1], %[kc1], #1
\n\t
"
"blt
end_kc1_%=
\n\t
"
"
loop_kc1_%=:
\n\t
"
"blt
2f
\n\t
"
"
1:
\n\t
"
// "pld [%[a_ptr], #128] \n\t"
// "pld [%[b_ptr], #128] \n\t"
...
...
@@ -3030,12 +3030,12 @@ void AddDot6x8(int k, const float *a, const float *b, float *c, int ldc) {
"vmla.f32 q15, q3, d2[1]
\n\t
"
"subs %[kc1], %[kc1], #1
\n\t
"
"bge
loop_kc1_%=
\n\t
"
"
end_kc1_%=:
\n\t
"
"bge
1b
\n\t
"
"
2:
\n\t
"
"subs %[kc2], %[kc2], #1
\n\t
"
"blt
end_kc2_%=
\n\t
"
"
loop_kc2_%=:
\n\t
"
"blt
4f
\n\t
"
"
3:
\n\t
"
"vld1.32 {d0-d2}, [%[a_ptr]]!
\n\t
"
"vld1.32 {q2, q3}, [%[b_ptr]]!
\n\t
"
...
...
@@ -3054,8 +3054,8 @@ void AddDot6x8(int k, const float *a, const float *b, float *c, int ldc) {
"vmla.f32 q15, q3, d2[1]
\n\t
"
"subs %[kc2], %[kc2], #1
\n\t
"
"bge
loop_kc2_%=
\n\t
"
"
end_kc2_%=:
\n\t
"
"bge
3b
\n\t
"
"
4:
\n\t
"
"mov r5, %[c]
\n\t
"
"mov r6, %[step]
\n\t
"
...
...
@@ -3113,8 +3113,8 @@ void AddDot8x12(int k, const float *a, const float *b, float *c, int ldc) {
"dup v28.4s, wzr
\n\t
"
"subs %[kc1], %[kc1], #1
\n\t
"
"blt
end_kc1_%=
\n\t
"
"
loop_kc1_%=:
\n\t
"
"blt
2f
\n\t
"
"
1:
\n\t
"
"prfm pldl1keep, [%[a_ptr], #32]
\n\t
"
"prfm pldl1keep, [%[b_ptr], #48]
\n\t
"
...
...
@@ -3149,8 +3149,8 @@ void AddDot8x12(int k, const float *a, const float *b, float *c, int ldc) {
"fmla v28.4s, v4.4s, v1.s[3]
\n\t
"
"subs %[kc1], %[kc1], #1
\n\t
"
"bge
loop_kc1_%=
\n\t
"
"
end_kc1_%=:
\n\t
"
"bge
1b
\n\t
"
"
2:
\n\t
"
"st1 {v5.4s, v6.4s, v7.4s}, [%[c]], %[step]
\n\t
"
"st1 {v8.4s, v9.4s, v10.4s}, [%[c]], %[step]
\n\t
"
...
...
@@ -3205,8 +3205,8 @@ void AddDot6x16(int k, const float *a, const float *b, float *c, int ldc) {
"dup v29.4s, wzr
\n\t
"
"subs %[kc1], %[kc1], #1
\n\t
"
"blt
end_kc1_%=
\n\t
"
"
loop_kc1_%=:
\n\t
"
"blt
2f
\n\t
"
"
1:
\n\t
"
"prfm pldl1keep, [%[a_ptr], #24]
\n\t
"
"prfm pldl1keep, [%[b_ptr], #64]
\n\t
"
...
...
@@ -3245,8 +3245,8 @@ void AddDot6x16(int k, const float *a, const float *b, float *c, int ldc) {
"fmla v29.4s, v5.4s, v1.s[1]
\n\t
"
"subs %[kc1], %[kc1], #1
\n\t
"
"bge
loop_kc1_%=
\n\t
"
"
end_kc1_%=:
\n\t
"
"bge
1b
\n\t
"
"
2:
\n\t
"
"st1 {v6.4s, v7.4s, v8.4s, v9.4s}, [%[c]], %[step]
\n\t
"
"st1 {v10.4s, v11.4s, v12.4s, v13.4s}, [%[c]], %[step]
\n\t
"
...
...
test/net/test_squeezenet.cpp
浏览文件 @
a12c9bfd
...
...
@@ -18,7 +18,7 @@ limitations under the License. */
int
main
()
{
paddle_mobile
::
PaddleMobile
<
paddle_mobile
::
CPU
>
paddle_mobile
;
paddle_mobile
.
SetThreadNum
(
2
);
paddle_mobile
.
SetThreadNum
(
4
);
// ../../../test/models/googlenet
// ../../../test/models/mobilenet
auto
time1
=
time
();
...
...
test/net/test_yolo.cpp
浏览文件 @
a12c9bfd
...
...
@@ -18,7 +18,7 @@ limitations under the License. */
int
main
()
{
paddle_mobile
::
PaddleMobile
<
paddle_mobile
::
CPU
>
paddle_mobile
;
paddle_mobile
.
SetThreadNum
(
2
);
paddle_mobile
.
SetThreadNum
(
4
);
// ../../../test/models/googlenet
// ../../../test/models/mobilenet
auto
time1
=
time
();
...
...
test/operators/test_fusion_conv_add_bn_relu_op.cpp
浏览文件 @
a12c9bfd
...
...
@@ -12,6 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. */
#include <iostream>
#include "../test_include.h"
#include "operators/fusion_conv_add_bn_relu_op.h"
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录