Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle-Lite
提交
992f29cf
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看板
提交
992f29cf
编写于
7月 27, 2020
作者:
Y
yongqiang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
change pool3x3s2p1_max to intrinsic. test=develop
上级
49ec0244
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
76 addition
and
0 deletion
+76
-0
lite/backends/arm/math/pooling.cc
lite/backends/arm/math/pooling.cc
+76
-0
未找到文件。
lite/backends/arm/math/pooling.cc
浏览文件 @
992f29cf
...
...
@@ -2235,6 +2235,7 @@ void pooling3x3s2p1_max(const float* din,
int
cnt_num
=
w_unroll_size
;
if
(
w_unroll_size
>
0
)
{
#ifdef __aarch64__
#if 0
asm volatile(
/* preocess left */
P3x3S2_INIT P3x3S2P1_MAX P3x3S2P0_MAX "2: \n" /* end */
...
...
@@ -2259,6 +2260,81 @@ void pooling3x3s2p1_max(const float* din,
"v10",
"v11",
"v31");
#else
float32x4_t
vr0_1234
=
vld1q_f32
(
dr0
);
float32x4_t
vr0_5678
=
vld1q_f32
(
dr0
+=
4
);
float32x4_t
vr0_9101112
=
vld1q_f32
(
dr0
+=
4
);
float32x4_t
vr1_1234
=
vld1q_f32
(
dr1
);
float32x4_t
vr1_5678
=
vld1q_f32
(
dr1
+=
4
);
float32x4_t
vr1_9101112
=
vld1q_f32
(
dr1
+=
4
);
float32x4_t
vr2_1234
=
vld1q_f32
(
dr2
);
float32x4_t
vr2_5678
=
vld1q_f32
(
dr2
+=
4
);
float32x4_t
vr2_9101112
=
vld1q_f32
(
dr2
+=
4
);
float32x4_t
vmax_1234
=
vmaxq_f32
(
vr0_1234
,
vr1_1234
);
vmax_1234
=
vmaxq_f32
(
vmax_1234
,
vr2_1234
);
float32x4_t
vmax_5678
=
vmaxq_f32
(
vr0_5678
,
vr1_5678
);
vmax_5678
=
vmaxq_f32
(
vmax_5678
,
vr2_5678
);
float32x4_t
vmax_9101112
=
vmaxq_f32
(
vr0_9101112
,
vr1_9101112
);
vmax_9101112
=
vmaxq_f32
(
vmax_9101112
,
vr2_9101112
);
float32x4_t
vmax_0123
=
vextq_f32
(
vmin
,
vmax_1234
,
1
);
float32x4_t
vmax_4567
=
vextq_f32
(
vmax_1234
,
vmax_5678
,
1
);
float32x2_t
vmax_12_34
=
vpmax_f32
(
vget_low_f32
(
vmax_1234
),
vget_high_f32
(
vmax_1234
));
float32x2_t
vmax_01_23
=
vpmax_f32
(
vget_low_f32
(
vmax_0123
),
vget_high_f32
(
vmax_0123
));
float32x2_t
vmax_56_78
=
vpmax_f32
(
vget_low_f32
(
vmax_5678
),
vget_high_f32
(
vmax_5678
));
float32x2_t
vmax_45_67
=
vpmax_f32
(
vget_low_f32
(
vmax_4567
),
vget_high_f32
(
vmax_4567
));
float32x2_t
vmax_012_234
=
vmax_f32
(
vmax_12_34
,
vmax_01_23
);
float32x2_t
vmax_456_678
=
vmax_f32
(
vmax_56_78
,
vmax_45_67
);
vst1_f32
(
dr_out
,
vmax_012_234
);
dr_out
+=
2
;
vst1_f32
(
dr_out
,
vmax_456_678
);
dr_out
+=
2
;
cnt_num
--
;
dr0
--
;
dr1
--
;
dr2
--
;
while
(
cnt_num
--
)
{
float32x4_t
vr0_1234
=
vld1q_f32
(
dr0
);
float32x4_t
vr0_5678
=
vld1q_f32
(
dr0
+=
4
);
float32x4_t
vr0_9101112
=
vld1q_f32
(
dr0
+=
4
);
float32x4_t
vr1_1234
=
vld1q_f32
(
dr1
);
float32x4_t
vr1_5678
=
vld1q_f32
(
dr1
+=
4
);
float32x4_t
vr1_9101112
=
vld1q_f32
(
dr1
+=
4
);
float32x4_t
vr2_1234
=
vld1q_f32
(
dr2
);
float32x4_t
vr2_5678
=
vld1q_f32
(
dr2
+=
4
);
float32x4_t
vr2_9101112
=
vld1q_f32
(
dr2
+=
4
);
float32x4_t
vmax_1234
=
vmaxq_f32
(
vr0_1234
,
vr1_1234
);
vmax_1234
=
vmaxq_f32
(
vmax_1234
,
vr2_1234
);
float32x4_t
vmax_5678
=
vmaxq_f32
(
vr0_5678
,
vr1_5678
);
vmax_5678
=
vmaxq_f32
(
vmax_5678
,
vr2_5678
);
float32x4_t
vmax_9101112
=
vmaxq_f32
(
vr0_9101112
,
vr1_9101112
);
vmax_9101112
=
vmaxq_f32
(
vmax_9101112
,
vr2_9101112
);
float32x4_t
vmax_2345
=
vextq_f32
(
vmax_1234
,
vmax_5678
,
1
);
float32x4_t
vmax_6789
=
vextq_f32
(
vmax_5678
,
vmax_9101112
,
1
);
float32x2_t
vmax_12_34
=
vpmax_f32
(
vget_low_f32
(
vmax_1234
),
vget_high_f32
(
vmax_1234
));
float32x2_t
vmax_23_45
=
vpmax_f32
(
vget_low_f32
(
vmax_2345
),
vget_high_f32
(
vmax_2345
));
float32x2_t
vmax_56_78
=
vpmax_f32
(
vget_low_f32
(
vmax_5678
),
vget_high_f32
(
vmax_5678
));
float32x2_t
vmax_67_89
=
vpmax_f32
(
vget_low_f32
(
vmax_6789
),
vget_high_f32
(
vmax_6789
));
float32x2_t
vmax_123_345
=
vmax_f32
(
vmax_12_34
,
vmax_23_45
);
float32x2_t
vmax_567_789
=
vmax_f32
(
vmax_56_78
,
vmax_67_89
);
vst1_f32
(
dr_out
,
vmax_123_345
);
dr_out
+=
2
;
vst1_f32
(
dr_out
,
vmax_567_789
);
dr_out
+=
2
;
}
dr0
+=
8
;
dr1
+=
8
;
dr2
+=
8
;
#endif
#else
asm
volatile
(
/* preocess left */
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录