Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle-Lite
提交
ba54e537
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看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
ba54e537
编写于
3月 13, 2020
作者:
H
HappyAngel
提交者:
GitHub
3月 13, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
【arm】resize nv12 bug (#3155)
* fix clang v7 error * change ut, test=develop * fix conv ut, test=develop
上级
3501f3c2
变更
6
展开全部
隐藏空白更改
内联
并排
Showing
6 changed file
with
833 addition
and
324 deletion
+833
-324
lite/backends/arm/math/conv3x3s1px_depthwise_fp32.cc
lite/backends/arm/math/conv3x3s1px_depthwise_fp32.cc
+5
-5
lite/demo/cxx/makefiles/test_cv/Makefile.android.armv7
lite/demo/cxx/makefiles/test_cv/Makefile.android.armv7
+1
-1
lite/demo/cxx/test_cv/test_img_prepross.cc
lite/demo/cxx/test_cv/test_img_prepross.cc
+810
-311
lite/kernels/arm/conv_compute.cc
lite/kernels/arm/conv_compute.cc
+4
-2
lite/tests/math/conv_compute_test.cc
lite/tests/math/conv_compute_test.cc
+8
-1
lite/utils/cv/image_resize.cc
lite/utils/cv/image_resize.cc
+5
-4
未找到文件。
lite/backends/arm/math/conv3x3s1px_depthwise_fp32.cc
浏览文件 @
ba54e537
...
...
@@ -509,7 +509,7 @@ void act_switch_3x3s1(const float* inr0,
"x6"
,
"x7"
);
#else
#ifdef LITE_WITH_ARM_CLANG
#if
1 //
def LITE_WITH_ARM_CLANG
#else
asm
volatile
(
COMPUTE
RELU
STORE
:
[
r0
]
"+r"
(
inr0
),
...
...
@@ -597,7 +597,7 @@ void act_switch_3x3s1(const float* inr0,
"x6"
,
"x7"
);
#else
#ifdef LITE_WITH_ARM_CLANG
#if
1 //
def LITE_WITH_ARM_CLANG
#else
asm
volatile
(
COMPUTE
RELU
RELU6
STORE
:
[
r0
]
"+r"
(
inr0
),
...
...
@@ -685,7 +685,7 @@ void act_switch_3x3s1(const float* inr0,
"x6"
,
"x7"
);
#else
#ifdef LITE_WITH_ARM_CLANG
#if
1 //
def LITE_WITH_ARM_CLANG
#else
asm
volatile
(
COMPUTE
LEAKY_RELU
STORE
:
[
r0
]
"+r"
(
inr0
),
...
...
@@ -778,7 +778,7 @@ void act_switch_3x3s1(const float* inr0,
"x6"
,
"x7"
);
#else
#ifdef LITE_WITH_ARM_CLANG
#if
1 //
def LITE_WITH_ARM_CLANG
#else
asm
volatile
(
COMPUTE
STORE
:
[
r0
]
"+r"
(
inr0
),
...
...
@@ -1001,7 +1001,7 @@ void conv_3x3s1_depthwise_fp32(const float* i_data,
vbias
,
act_param
);
#else
#ifdef LITE_WITH_ARM_CLANG
#if
1 //
def LITE_WITH_ARM_CLANG
#else
act_switch_3x3s1
(
inr0
,
inr1
,
...
...
lite/demo/cxx/makefiles/test_cv/Makefile.android.armv7
浏览文件 @
ba54e537
...
...
@@ -40,7 +40,7 @@ CXX_INCLUDES = $(INCLUDES) ${OPENCV_INCLUDE} -I$(LITE_ROOT)/cxx/include
# 1. Comment above line using `libpaddle_light_api_shared.so`
# 2. Undo comment below line using `libpaddle_api_light_bundled.a`
CXX_LIBS
=
$(LITE_ROOT)
/cxx/lib/libpaddle_api_light_bundled.a
$(SYSTEM_LIBS)
CXX_LIBS
=
$
{OPENCV_LIBS}
$
(LITE_ROOT)
/cxx/lib/libpaddle_api_light_bundled.a
$(SYSTEM_LIBS)
test_model_cv
:
fetch_opencv test_model_cv.o
$(CC)
$(SYSROOT_LINK)
$(CXXFLAGS_LINK)
test_model_cv.o
-o
test_model_cv
$(CXX_LIBS)
$(LDFLAGS)
...
...
lite/demo/cxx/test_cv/test_img_prepross.cc
浏览文件 @
ba54e537
此差异已折叠。
点击以展开。
lite/kernels/arm/conv_compute.cc
浏览文件 @
ba54e537
...
...
@@ -59,9 +59,11 @@ void ConvCompute<PRECISION(kFloat), PRECISION(kFloat)>::PrepareForRun() {
bool
flag_dw_3x3
=
(
kw
==
3
)
&&
(
kh
==
3
)
&&
(
stride
==
1
||
stride
==
2
);
bool
flag_dw_5x5
=
(
kw
==
5
)
&&
(
kh
==
5
)
&&
(
stride
==
1
||
stride
==
2
);
#ifdef LITE_WITH_ARM_CLANG // clang
flag_dw_3x3
=
#ifdef __aarch64__
#else
bool
flag
=
(
stride
==
1
&&
(
paddings
[
0
]
>
1
||
paddings
[
2
]
>
1
))
?
false
:
true
;
flag_dw_3x3
=
flag_dw_3x3
&&
flag
;
#endif
bool
flag_dw
=
flag_dw_3x3
||
flag_dw_5x5
;
...
...
lite/tests/math/conv_compute_test.cc
浏览文件 @
ba54e537
...
...
@@ -307,7 +307,7 @@ void test_conv_fp32(const std::vector<DDim>& input_dims,
#endif // LITE_WITH_ARM
// TODO(chenjiaoAngel): fix multi-threds, diff: 3x3 depthwise conv
#if
1
// 3x3dw
#if
0
// 3x3dw
TEST(TestConv3x3DW, test_conv3x3_depthwise) {
if (FLAGS_basic_test) {
for (auto& stride : {1, 2}) {
...
...
@@ -325,6 +325,13 @@ TEST(TestConv3x3DW, test_conv3x3_depthwise) {
dims.push_back(DDim({batch, c, h, h}));
}
}
#ifdef __aarch64__
#else
if (stride == 1 && (pad_bottom == 2 || pad_right == 2 ||
pad_top == 2 || pad_left == 2)) {
continue;
}
#endif
const
float
leakey_relu_scale
=
8.88
;
test_conv_fp32
(
dims
,
weights_dim
,
...
...
lite/utils/cv/image_resize.cc
浏览文件 @
ba54e537
...
...
@@ -125,7 +125,7 @@ void resize(const uint8_t* src,
srch
/
2
,
w
,
tmp
,
num
,
2
,
scale_x
,
scale_y
,
xofs1
,
...
...
@@ -146,6 +146,8 @@ void resize(const uint8_t* src,
xofs
=
xofs1
;
yofs
=
yofs1
;
ialpha
=
ialpha1
;
num
=
2
;
sy
=
yofs1
[
dy
-
orih
];
}
// hresize two rows
...
...
@@ -154,8 +156,8 @@ void resize(const uint8_t* src,
const
int16_t
*
ialphap
=
ialpha
;
int16_t
*
rows0p
=
rowsbuf0
;
int16_t
*
rows1p
=
rowsbuf1
;
for
(
int
dx
=
0
;
dx
<
dstw
;
dx
++
)
{
int
sx
=
xofs
[
dx
];
for
(
int
dx
=
0
;
dx
<
w_out
;
dx
+=
num
)
{
int
sx
=
xofs
[
dx
/
num
];
int16_t
a0
=
ialphap
[
0
];
int16_t
a1
=
ialphap
[
1
];
...
...
@@ -314,7 +316,6 @@ void compute_xy(int srcw,
float
a0
=
(
1.
f
-
fx
)
*
resize_coef_scale
;
float
a1
=
fx
*
resize_coef_scale
;
ialpha
[
dx
*
2
]
=
SATURATE_CAST_SHORT
(
a0
);
ialpha
[
dx
*
2
+
1
]
=
SATURATE_CAST_SHORT
(
a1
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录