Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle-Lite
提交
213d628d
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看板
提交
213d628d
编写于
8月 21, 2020
作者:
C
chenjiaoAngel
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix format. test=develop
上级
6a6301f3
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
168 addition
and
90 deletion
+168
-90
lite/backends/arm/math/conv5x5s2_depthwise_fp32.cc
lite/backends/arm/math/conv5x5s2_depthwise_fp32.cc
+168
-90
未找到文件。
lite/backends/arm/math/conv5x5s2_depthwise_fp32.cc
浏览文件 @
213d628d
...
...
@@ -1558,8 +1558,11 @@ inline void compute_all_padding_pre(float* dout,
}
// right
for
(
int
i
=
0
;
i
<
pad_right
;
i
++
)
{
float
sum
=
compute_one_data_post
(
din_ptr_arr
[
num
],
weights
[
4
],
bias
[
0
],
weights
[
4
][
num_index_right
],
num_index_right
);
float
sum
=
compute_one_data_post
(
din_ptr_arr
[
num
],
weights
[
4
],
bias
[
0
],
weights
[
4
][
num_index_right
],
num_index_right
);
din_ptr_arr
[
num
]
+=
2
;
for
(
int
k
=
0
;
k
<
num
;
k
++
)
{
sum
+=
compute_one_data_post
(
din_ptr_arr
[
tmp_index
-
k
],
...
...
@@ -1681,8 +1684,11 @@ inline void compute_all_padding_mid(float* dout,
}
// right
for
(
int
i
=
0
;
i
<
pad_right
;
i
++
)
{
float
sum
=
compute_one_data_post
(
din_ptr_arr
[
num
],
weights
[
num
],
bias
[
0
],
weights
[
num
][
num_index_right
],
num_index_right
);
float
sum
=
compute_one_data_post
(
din_ptr_arr
[
num
],
weights
[
num
],
bias
[
0
],
weights
[
num
][
num_index_right
],
num_index_right
);
din_ptr_arr
[
num
]
+=
2
;
for
(
int
k
=
0
;
k
<
num
;
k
++
)
{
sum
+=
compute_one_data_post
(
din_ptr_arr
[
tmp
-
k
],
...
...
@@ -1716,8 +1722,11 @@ inline void compute_all_padding_mid_out2(float* dout0,
for
(
int
i
=
pad_left
;
i
>
0
;
i
--
)
{
float
sum
=
compute_one_data_pre
(
din_ptr_arr
[
num
],
weights
[
num
],
bias
[
0
],
weights
[
6
][
0
],
num_index_left
);
float
sum1
=
compute_one_data_pre
(
din_ptr_arr
[
tmp1
],
weights
[
num
],
bias
[
0
],
weights
[
6
][
0
],
num_index_left
);
float
sum1
=
compute_one_data_pre
(
din_ptr_arr
[
tmp1
],
weights
[
num
],
bias
[
0
],
weights
[
6
][
0
],
num_index_left
);
for
(
int
k
=
0
;
k
<
num
;
k
++
)
{
sum
+=
compute_one_data_pre
(
din_ptr_arr
[
tmp
-
k
],
weights
[
tmp
-
k
],
...
...
@@ -1832,10 +1841,16 @@ inline void compute_all_padding_mid_out2(float* dout0,
}
// right
for
(
int
i
=
0
;
i
<
pad_right
;
i
++
)
{
float
sum
=
compute_one_data_post
(
din_ptr_arr
[
num
],
weights
[
num
],
bias
[
0
],
weights
[
num
][
num_index_right
],
num_index_right
);
float
sum1
=
compute_one_data_post
(
din_ptr_arr
[
tmp1
],
weights
[
num
],
bias
[
0
],
weights
[
num
][
num_index_right
],
num_index_right
);
float
sum
=
compute_one_data_post
(
din_ptr_arr
[
num
],
weights
[
num
],
bias
[
0
],
weights
[
num
][
num_index_right
],
num_index_right
);
float
sum1
=
compute_one_data_post
(
din_ptr_arr
[
tmp1
],
weights
[
num
],
bias
[
0
],
weights
[
num
][
num_index_right
],
num_index_right
);
din_ptr_arr
[
tmp1
]
+=
2
;
for
(
int
k
=
0
;
k
<
num
;
k
++
)
{
sum
+=
compute_one_data_post
(
din_ptr_arr
[
tmp
-
k
],
...
...
@@ -1873,8 +1888,11 @@ inline void compute_all_padding_post(float* dout,
// left
int
tmp
=
num
-
1
;
for
(
int
i
=
pad_left
;
i
>
0
;
i
--
)
{
float
sum
=
compute_one_data_pre
(
din_ptr_arr
[
num
],
weights
[
num
],
bias
[
0
],
weights
[
5
][
num
],
num_index_left
);
float
sum
=
compute_one_data_pre
(
din_ptr_arr
[
num
],
weights
[
num
],
bias
[
0
],
weights
[
5
][
num
],
num_index_left
);
for
(
int
k
=
0
;
k
<
num
;
k
++
)
{
sum
+=
compute_one_data_pre
(
din_ptr_arr
[
tmp
-
k
],
weights
[
tmp
-
k
],
...
...
@@ -2098,8 +2116,11 @@ inline void compute_all_padding_post(float* dout,
}
// right
for
(
int
i
=
0
;
i
<
pad_right
;
i
++
)
{
float
sum
=
compute_one_data_post
(
din_ptr_arr
[
num
],
weights
[
num
],
bias
[
0
],
weights
[
num
][
num_index_right
],
num_index_right
);
float
sum
=
compute_one_data_post
(
din_ptr_arr
[
num
],
weights
[
num
],
bias
[
0
],
weights
[
num
][
num_index_right
],
num_index_right
);
din_ptr_arr
[
num
]
+=
2
;
for
(
int
k
=
0
;
k
<
num
;
k
++
)
{
sum
+=
compute_one_data_post
(
din_ptr_arr
[
tmp
-
k
],
...
...
@@ -2146,7 +2167,7 @@ void conv_depthwise_5x5s2_bias(float* dout,
int
n_left_w
=
4
-
pad_left
;
int
n_right_w
=
4
;
int
n_bottom_h
=
4
;
int
in_w_cnt
=
(
win
-
4
)
>>
1
;
int
in_w_cnt
=
(
win
-
4
)
>>
1
;
int
in_h_cnt
=
(
hin
-
4
)
>>
1
;
int
in_w_remain
=
win
-
(
in_w_cnt
<<
1
);
int
in_h_remain
=
hin
-
(
in_h_cnt
<<
1
);
...
...
@@ -2588,8 +2609,11 @@ inline void compute_all_padding_pre_relu(float* dout,
}
// right
for
(
int
i
=
0
;
i
<
pad_right
;
i
++
)
{
float
sum
=
compute_one_data_post
(
din_ptr_arr
[
num
],
weights
[
4
],
bias
[
0
],
weights
[
4
][
num_index_right
],
num_index_right
);
float
sum
=
compute_one_data_post
(
din_ptr_arr
[
num
],
weights
[
4
],
bias
[
0
],
weights
[
4
][
num_index_right
],
num_index_right
);
din_ptr_arr
[
num
]
+=
2
;
for
(
int
k
=
0
;
k
<
num
;
k
++
)
{
sum
+=
compute_one_data_post
(
din_ptr_arr
[
tmp_index
-
k
],
...
...
@@ -2712,8 +2736,11 @@ inline void compute_all_padding_mid_relu(float* dout,
}
// right
for
(
int
i
=
0
;
i
<
pad_right
;
i
++
)
{
float
sum
=
compute_one_data_post
(
din_ptr_arr
[
num
],
weights
[
num
],
bias
[
0
],
weights
[
num
][
num_index_right
],
num_index_right
);
float
sum
=
compute_one_data_post
(
din_ptr_arr
[
num
],
weights
[
num
],
bias
[
0
],
weights
[
num
][
num_index_right
],
num_index_right
);
din_ptr_arr
[
num
]
+=
2
;
for
(
int
k
=
0
;
k
<
num
;
k
++
)
{
sum
+=
compute_one_data_post
(
din_ptr_arr
[
tmp
-
k
],
...
...
@@ -2748,8 +2775,11 @@ inline void compute_all_padding_mid_relu_out2(float* dout0,
for
(
int
i
=
pad_left
;
i
>
0
;
i
--
)
{
float
sum
=
compute_one_data_pre
(
din_ptr_arr
[
num
],
weights
[
num
],
bias
[
0
],
weights
[
6
][
0
],
num_index_left
);
float
sum1
=
compute_one_data_pre
(
din_ptr_arr
[
tmp1
],
weights
[
num
],
bias
[
0
],
weights
[
6
][
0
],
num_index_left
);
float
sum1
=
compute_one_data_pre
(
din_ptr_arr
[
tmp1
],
weights
[
num
],
bias
[
0
],
weights
[
6
][
0
],
num_index_left
);
for
(
int
k
=
0
;
k
<
num
;
k
++
)
{
sum
+=
compute_one_data_pre
(
din_ptr_arr
[
tmp
-
k
],
weights
[
tmp
-
k
],
...
...
@@ -2865,10 +2895,16 @@ inline void compute_all_padding_mid_relu_out2(float* dout0,
}
// right
for
(
int
i
=
0
;
i
<
pad_right
;
i
++
)
{
float
sum
=
compute_one_data_post
(
din_ptr_arr
[
num
],
weights
[
num
],
bias
[
0
],
weights
[
num
][
num_index_right
],
num_index_right
);
float
sum1
=
compute_one_data_post
(
din_ptr_arr
[
tmp1
],
weights
[
num
],
bias
[
0
],
weights
[
num
][
num_index_right
],
num_index_right
);
float
sum
=
compute_one_data_post
(
din_ptr_arr
[
num
],
weights
[
num
],
bias
[
0
],
weights
[
num
][
num_index_right
],
num_index_right
);
float
sum1
=
compute_one_data_post
(
din_ptr_arr
[
tmp1
],
weights
[
num
],
bias
[
0
],
weights
[
num
][
num_index_right
],
num_index_right
);
din_ptr_arr
[
tmp1
]
+=
2
;
for
(
int
k
=
0
;
k
<
num
;
k
++
)
{
sum
+=
compute_one_data_post
(
din_ptr_arr
[
tmp
-
k
],
...
...
@@ -2906,8 +2942,11 @@ inline void compute_all_padding_post_relu(float* dout,
// left
int
tmp
=
num
-
1
;
for
(
int
i
=
pad_left
;
i
>
0
;
i
--
)
{
float
sum
=
compute_one_data_pre
(
din_ptr_arr
[
num
],
weights
[
num
],
bias
[
0
],
weights
[
5
][
num
],
num_index_left
);
float
sum
=
compute_one_data_pre
(
din_ptr_arr
[
num
],
weights
[
num
],
bias
[
0
],
weights
[
5
][
num
],
num_index_left
);
for
(
int
k
=
0
;
k
<
num
;
k
++
)
{
sum
+=
compute_one_data_pre
(
din_ptr_arr
[
tmp
-
k
],
weights
[
tmp
-
k
],
...
...
@@ -3139,8 +3178,11 @@ inline void compute_all_padding_post_relu(float* dout,
}
// right
for
(
int
i
=
0
;
i
<
pad_right
;
i
++
)
{
float
sum
=
compute_one_data_post
(
din_ptr_arr
[
num
],
weights
[
num
],
bias
[
0
],
weights
[
num
][
num_index_right
],
num_index_right
);
float
sum
=
compute_one_data_post
(
din_ptr_arr
[
num
],
weights
[
num
],
bias
[
0
],
weights
[
num
][
num_index_right
],
num_index_right
);
din_ptr_arr
[
num
]
+=
2
;
for
(
int
k
=
0
;
k
<
num
;
k
++
)
{
sum
+=
compute_one_data_post
(
din_ptr_arr
[
tmp
-
k
],
...
...
@@ -3187,7 +3229,7 @@ void conv_depthwise_5x5s2_bias_relu(float* dout,
int
n_left_w
=
4
-
pad_left
;
int
n_right_w
=
4
;
int
n_bottom_h
=
4
;
int
in_w_cnt
=
(
win
-
4
)
>>
1
;
int
in_w_cnt
=
(
win
-
4
)
>>
1
;
int
in_h_cnt
=
(
hin
-
4
)
>>
1
;
int
in_w_remain
=
win
-
(
in_w_cnt
<<
1
);
int
in_h_remain
=
hin
-
(
in_h_cnt
<<
1
);
...
...
@@ -3647,8 +3689,11 @@ inline void compute_all_padding_pre_relu6(float* dout,
}
// right
for
(
int
i
=
0
;
i
<
pad_right
;
i
++
)
{
float
sum
=
compute_one_data_post
(
din_ptr_arr
[
num
],
weights
[
4
],
bias
[
0
],
weights
[
4
][
num_index_right
],
num_index_right
);
float
sum
=
compute_one_data_post
(
din_ptr_arr
[
num
],
weights
[
4
],
bias
[
0
],
weights
[
4
][
num_index_right
],
num_index_right
);
din_ptr_arr
[
num
]
+=
2
;
for
(
int
k
=
0
;
k
<
num
;
k
++
)
{
sum
+=
compute_one_data_post
(
din_ptr_arr
[
tmp_index
-
k
],
...
...
@@ -3778,8 +3823,11 @@ inline void compute_all_padding_mid_relu6(float* dout,
}
// right
for
(
int
i
=
0
;
i
<
pad_right
;
i
++
)
{
float
sum
=
compute_one_data_post
(
din_ptr_arr
[
num
],
weights
[
num
],
bias
[
0
],
weights
[
num
][
num_index_right
],
num_index_right
);
float
sum
=
compute_one_data_post
(
din_ptr_arr
[
num
],
weights
[
num
],
bias
[
0
],
weights
[
num
][
num_index_right
],
num_index_right
);
din_ptr_arr
[
num
]
+=
2
;
for
(
int
k
=
0
;
k
<
num
;
k
++
)
{
sum
+=
compute_one_data_post
(
din_ptr_arr
[
tmp
-
k
],
...
...
@@ -3938,10 +3986,16 @@ inline void compute_all_padding_mid_relu6_out2(float* dout0,
}
// right
for
(
int
i
=
0
;
i
<
pad_right
;
i
++
)
{
float
sum
=
compute_one_data_post
(
din_ptr_arr
[
num
],
weights
[
num
],
bias
[
0
],
weights
[
num
][
num_index_right
],
num_index_right
);
float
sum1
=
compute_one_data_post
(
din_ptr_arr
[
tmp1
],
weights
[
num
],
bias
[
0
],
weights
[
num
][
num_index_right
],
num_index_right
);
float
sum
=
compute_one_data_post
(
din_ptr_arr
[
num
],
weights
[
num
],
bias
[
0
],
weights
[
num
][
num_index_right
],
num_index_right
);
float
sum1
=
compute_one_data_post
(
din_ptr_arr
[
tmp1
],
weights
[
num
],
bias
[
0
],
weights
[
num
][
num_index_right
],
num_index_right
);
din_ptr_arr
[
tmp1
]
+=
2
;
for
(
int
k
=
0
;
k
<
num
;
k
++
)
{
sum
+=
compute_one_data_post
(
din_ptr_arr
[
tmp
-
k
],
...
...
@@ -4224,8 +4278,11 @@ inline void compute_all_padding_post_relu6(float* dout,
}
// right
for
(
int
i
=
0
;
i
<
pad_right
;
i
++
)
{
float
sum
=
compute_one_data_post
(
din_ptr_arr
[
num
],
weights
[
num
],
bias
[
0
],
weights
[
num
][
num_index_right
],
num_index_right
);
float
sum
=
compute_one_data_post
(
din_ptr_arr
[
num
],
weights
[
num
],
bias
[
0
],
weights
[
num
][
num_index_right
],
num_index_right
);
din_ptr_arr
[
num
]
+=
2
;
for
(
int
k
=
0
;
k
<
num
;
k
++
)
{
sum
+=
compute_one_data_post
(
din_ptr_arr
[
tmp
-
k
],
...
...
@@ -4273,7 +4330,7 @@ void conv_depthwise_5x5s2_bias_relu6(float* dout,
int
n_left_w
=
4
-
pad_left
;
int
n_right_w
=
4
;
int
n_bottom_h
=
4
;
int
in_w_cnt
=
(
win
-
4
)
>>
1
;
int
in_w_cnt
=
(
win
-
4
)
>>
1
;
int
in_h_cnt
=
(
hin
-
4
)
>>
1
;
int
in_w_remain
=
win
-
(
in_w_cnt
<<
1
);
int
in_h_remain
=
hin
-
(
in_h_cnt
<<
1
);
...
...
@@ -4745,8 +4802,11 @@ inline void compute_all_padding_pre_leakyRelu(float* dout,
}
// right
for
(
int
i
=
0
;
i
<
pad_right
;
i
++
)
{
float
sum
=
compute_one_data_post
(
din_ptr_arr
[
num
],
weights
[
4
],
bias
[
0
],
weights
[
4
][
num_index_right
],
num_index_right
);
float
sum
=
compute_one_data_post
(
din_ptr_arr
[
num
],
weights
[
4
],
bias
[
0
],
weights
[
4
][
num_index_right
],
num_index_right
);
din_ptr_arr
[
num
]
+=
2
;
for
(
int
k
=
0
;
k
<
num
;
k
++
)
{
sum
+=
compute_one_data_post
(
din_ptr_arr
[
tmp_index
-
k
],
...
...
@@ -4878,8 +4938,11 @@ inline void compute_all_padding_mid_leakyRelu(float* dout,
}
// right
for
(
int
i
=
0
;
i
<
pad_right
;
i
++
)
{
float
sum
=
compute_one_data_post
(
din_ptr_arr
[
num
],
weights
[
num
],
bias
[
0
],
weights
[
num
][
num_index_right
],
num_index_right
);
float
sum
=
compute_one_data_post
(
din_ptr_arr
[
num
],
weights
[
num
],
bias
[
0
],
weights
[
num
][
num_index_right
],
num_index_right
);
din_ptr_arr
[
num
]
+=
2
;
for
(
int
k
=
0
;
k
<
num
;
k
++
)
{
sum
+=
compute_one_data_post
(
din_ptr_arr
[
tmp
-
k
],
...
...
@@ -4918,8 +4981,11 @@ inline void compute_all_padding_mid_leakyRelu_out2(float* dout0,
for
(
int
i
=
pad_left
;
i
>
0
;
i
--
)
{
float
sum
=
compute_one_data_pre
(
din_ptr_arr
[
num
],
weights
[
num
],
bias
[
0
],
weights
[
6
][
0
],
num_index_left
);
float
sum1
=
compute_one_data_pre
(
din_ptr_arr
[
tmp1
],
weights
[
num
],
bias
[
0
],
weights
[
6
][
0
],
num_index_left
);
float
sum1
=
compute_one_data_pre
(
din_ptr_arr
[
tmp1
],
weights
[
num
],
bias
[
0
],
weights
[
6
][
0
],
num_index_left
);
for
(
int
k
=
0
;
k
<
num
;
k
++
)
{
sum
+=
compute_one_data_pre
(
din_ptr_arr
[
tmp
-
k
],
weights
[
tmp
-
k
],
...
...
@@ -5041,10 +5107,16 @@ inline void compute_all_padding_mid_leakyRelu_out2(float* dout0,
}
// right
for
(
int
i
=
0
;
i
<
pad_right
;
i
++
)
{
float
sum
=
compute_one_data_post
(
din_ptr_arr
[
num
],
weights
[
num
],
bias
[
0
],
weights
[
num
][
num_index_right
],
num_index_right
);
float
sum1
=
compute_one_data_post
(
din_ptr_arr
[
tmp1
],
weights
[
num
],
bias
[
0
],
weights
[
num
][
num_index_right
],
num_index_right
);
float
sum
=
compute_one_data_post
(
din_ptr_arr
[
num
],
weights
[
num
],
bias
[
0
],
weights
[
num
][
num_index_right
],
num_index_right
);
float
sum1
=
compute_one_data_post
(
din_ptr_arr
[
tmp1
],
weights
[
num
],
bias
[
0
],
weights
[
num
][
num_index_right
],
num_index_right
);
din_ptr_arr
[
tmp1
]
+=
2
;
for
(
int
k
=
0
;
k
<
num
;
k
++
)
{
sum
+=
compute_one_data_post
(
din_ptr_arr
[
tmp
-
k
],
...
...
@@ -5086,8 +5158,11 @@ inline void compute_all_padding_post_leakyRelu(float* dout,
// left
int
tmp
=
num
-
1
;
for
(
int
i
=
pad_left
;
i
>
0
;
i
--
)
{
float
sum
=
compute_one_data_pre
(
din_ptr_arr
[
num
],
weights
[
num
],
bias
[
0
],
weights
[
5
][
num
],
num_index_left
);
float
sum
=
compute_one_data_pre
(
din_ptr_arr
[
num
],
weights
[
num
],
bias
[
0
],
weights
[
5
][
num
],
num_index_left
);
for
(
int
k
=
0
;
k
<
num
;
k
++
)
{
sum
+=
compute_one_data_pre
(
din_ptr_arr
[
tmp
-
k
],
weights
[
tmp
-
k
],
...
...
@@ -5335,8 +5410,11 @@ inline void compute_all_padding_post_leakyRelu(float* dout,
}
// right
for
(
int
i
=
0
;
i
<
pad_right
;
i
++
)
{
float
sum
=
compute_one_data_post
(
din_ptr_arr
[
num
],
weights
[
num
],
bias
[
0
],
weights
[
num
][
num_index_right
],
num_index_right
);
float
sum
=
compute_one_data_post
(
din_ptr_arr
[
num
],
weights
[
num
],
bias
[
0
],
weights
[
num
][
num_index_right
],
num_index_right
);
din_ptr_arr
[
num
]
+=
2
;
for
(
int
k
=
0
;
k
<
num
;
k
++
)
{
sum
+=
compute_one_data_post
(
din_ptr_arr
[
tmp
-
k
],
...
...
@@ -5384,7 +5462,7 @@ void conv_depthwise_5x5s2_bias_leakyRelu(float* dout,
int
n_left_w
=
4
-
pad_left
;
int
n_right_w
=
4
;
int
n_bottom_h
=
4
;
int
in_w_cnt
=
(
win
-
4
)
>>
1
;
int
in_w_cnt
=
(
win
-
4
)
>>
1
;
int
in_h_cnt
=
(
hin
-
4
)
>>
1
;
int
in_w_remain
=
win
-
(
in_w_cnt
<<
1
);
int
in_h_remain
=
hin
-
(
in_h_cnt
<<
1
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录