Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle-Lite
提交
94947acf
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看板
未验证
提交
94947acf
编写于
7月 17, 2019
作者:
Y
Yanzhan Yang
提交者:
GitHub
7月 17, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
prune faster depthwise (#1752)
* prune faster depthwise * fix style
上级
74a309cb
变更
6
展开全部
显示空白变更内容
内联
并排
Showing
6 changed file
with
156 addition
and
6094 deletion
+156
-6094
src/operators/kernel/arm/convolution/conv_add_bn_relu_kernel.cpp
...rators/kernel/arm/convolution/conv_add_bn_relu_kernel.cpp
+7
-5
src/operators/kernel/central-arm-func/conv_arm_func.cpp
src/operators/kernel/central-arm-func/conv_arm_func.cpp
+1
-5
src/operators/math/depthwise/faster_depthwise_conv3x3.h
src/operators/math/depthwise/faster_depthwise_conv3x3.h
+0
-5
src/operators/math/depthwise/faster_depthwise_conv3x3p0.cpp
src/operators/math/depthwise/faster_depthwise_conv3x3p0.cpp
+0
-3631
src/operators/math/depthwise/faster_depthwise_conv3x3p1.cpp
src/operators/math/depthwise/faster_depthwise_conv3x3p1.cpp
+146
-2447
tools/python/fluidtools/run.py
tools/python/fluidtools/run.py
+2
-1
未找到文件。
src/operators/kernel/arm/convolution/conv_add_bn_relu_kernel.cpp
浏览文件 @
94947acf
...
@@ -72,13 +72,15 @@ bool ConvAddBNReluKernel<CPU, float>::Init(
...
@@ -72,13 +72,15 @@ bool ConvAddBNReluKernel<CPU, float>::Init(
strides
.
size
()
==
2
&&
strides
[
0
]
==
strides
[
1
])
{
strides
.
size
()
==
2
&&
strides
[
0
]
==
strides
[
1
])
{
int
pad
=
paddings
[
0
];
int
pad
=
paddings
[
0
];
int
stride
=
strides
[
0
];
int
stride
=
strides
[
0
];
const
int
hin
=
param
->
Input
()
->
dims
()[
2
];
const
int
win
=
param
->
Input
()
->
dims
()[
3
];
if
(
pad
==
0
&&
hin
>
2
)
{
if
(
pad
==
1
)
{
if
(
stride
==
1
)
{
could_use_faster_depthwise_conv_
=
true
;
could_use_faster_depthwise_conv_
=
true
;
}
else
if
(
pad
==
1
)
{
}
else
if
(
stride
==
2
&&
win
>
7
)
{
could_use_faster_depthwise_conv_
=
true
;
could_use_faster_depthwise_conv_
=
true
;
}
}
}
}
}
break
;
break
;
}
}
...
...
src/operators/kernel/central-arm-func/conv_arm_func.cpp
浏览文件 @
94947acf
...
@@ -292,11 +292,7 @@ void FasterDepthwiseConv3x3_bias_relu(const ConvParam<CPU> ¶m,
...
@@ -292,11 +292,7 @@ void FasterDepthwiseConv3x3_bias_relu(const ConvParam<CPU> ¶m,
const
int
hout
=
output
->
dims
()[
2
];
const
int
hout
=
output
->
dims
()[
2
];
const
int
wout
=
output
->
dims
()[
3
];
const
int
wout
=
output
->
dims
()[
3
];
bool
flag_bias
=
bias
!=
nullptr
;
bool
flag_bias
=
bias
!=
nullptr
;
if
(
pad
==
0
&&
hin
>
2
)
{
if
(
pad
==
1
)
{
math
::
depthwise
::
conv_depthwise_3x3p0
(
din
,
dout
,
num
,
chout
,
hout
,
wout
,
chin
,
hin
,
win
,
weights
,
bias
,
stride
,
flag_bias
,
flag_relu
);
}
else
if
(
pad
==
1
)
{
math
::
depthwise
::
conv_depthwise_3x3p1
(
din
,
dout
,
num
,
chout
,
hout
,
wout
,
math
::
depthwise
::
conv_depthwise_3x3p1
(
din
,
dout
,
num
,
chout
,
hout
,
wout
,
chin
,
hin
,
win
,
weights
,
bias
,
stride
,
chin
,
hin
,
win
,
weights
,
bias
,
stride
,
flag_bias
,
flag_relu
);
flag_bias
,
flag_relu
);
...
...
src/operators/math/depthwise/faster_depthwise_conv3x3.h
浏览文件 @
94947acf
...
@@ -23,11 +23,6 @@ namespace operators {
...
@@ -23,11 +23,6 @@ namespace operators {
namespace
math
{
namespace
math
{
namespace
depthwise
{
namespace
depthwise
{
void
conv_depthwise_3x3p0
(
const
float
*
din
,
float
*
dout
,
int
num
,
int
ch_out
,
int
h_out
,
int
w_out
,
int
ch_in
,
int
h_in
,
int
w_in
,
const
float
*
weights
,
const
float
*
bias
,
int
stride
,
bool
flag_bias
,
bool
flag_relu
);
void
conv_depthwise_3x3p1
(
const
float
*
din
,
float
*
dout
,
int
num
,
int
ch_out
,
void
conv_depthwise_3x3p1
(
const
float
*
din
,
float
*
dout
,
int
num
,
int
ch_out
,
int
h_out
,
int
w_out
,
int
ch_in
,
int
h_in
,
int
w_in
,
int
h_out
,
int
w_out
,
int
ch_in
,
int
h_in
,
int
w_in
,
const
float
*
weights
,
const
float
*
bias
,
int
stride
,
const
float
*
weights
,
const
float
*
bias
,
int
stride
,
...
...
src/operators/math/depthwise/faster_depthwise_conv3x3p0.cpp
已删除
100644 → 0
浏览文件 @
74a309cb
此差异已折叠。
点击以展开。
src/operators/math/depthwise/faster_depthwise_conv3x3p1.cpp
浏览文件 @
94947acf
此差异已折叠。
点击以展开。
tools/python/fluidtools/run.py
浏览文件 @
94947acf
...
@@ -295,7 +295,8 @@ def check_mobile_results(args, fuse, mem_opt):
...
@@ -295,7 +295,8 @@ def check_mobile_results(args, fuse, mem_opt):
args
=
"{} {} {}"
.
format
(
"1"
if
fuse
else
"0"
,
"1"
if
mem_opt
else
"0"
,
args
)
args
=
"{} {} {}"
.
format
(
"1"
if
fuse
else
"0"
,
"1"
if
mem_opt
else
"0"
,
args
)
res
=
sh
(
"adb shell
\"
cd {} && export LD_LIBRARY_PATH=. && ./test-net {}
\"
"
.
format
(
mobile_exec_root
,
args
))
res
=
sh
(
"adb shell
\"
cd {} && export LD_LIBRARY_PATH=. && ./test-net {}
\"
"
.
format
(
mobile_exec_root
,
args
))
lines
=
res
.
split
(
"
\n
"
)
lines
=
res
.
split
(
"
\n
"
)
# print(lines)
# for line in lines:
# print(line)
for
line
in
lines
:
for
line
in
lines
:
if
line
.
startswith
(
"auto-test-debug"
):
if
line
.
startswith
(
"auto-test-debug"
):
print
(
line
)
print
(
line
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录