Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
项目经理老王
Mace
提交
1279e8ef
Mace
项目概览
项目经理老王
/
Mace
与 Fork 源项目一致
Fork自
Xiaomi / Mace
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Mace
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
1279e8ef
编写于
5月 24, 2018
作者:
Y
yejianwu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix host build
上级
bf62c769
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
9 addition
and
3 deletion
+9
-3
mace/kernels/arm/conv_2d_neon_3x3.cc
mace/kernels/arm/conv_2d_neon_3x3.cc
+9
-3
未找到文件。
mace/kernels/arm/conv_2d_neon_3x3.cc
浏览文件 @
1279e8ef
...
...
@@ -16,6 +16,7 @@
#include <arm_neon.h>
#endif
#include "mace/core/macros.h"
#include "mace/kernels/arm/conv_2d_neon.h"
namespace
mace
{
...
...
@@ -47,7 +48,6 @@ void Conv2dNeonK3x3S1(const float *input,
output
+
b
*
out_batch_size
+
(
m
+
1
)
*
out_image_size
;
#endif
for
(
index_t
c
=
0
;
c
<
in_channels
;
++
c
)
{
float
*
out_ptr0
=
out_ptr0_base
;
const
float
*
in_ptr0
=
input
+
b
*
in_batch_size
+
c
*
in_image_size
;
const
float
*
filter_ptr0
=
filter
+
m
*
in_channels
*
9
+
c
*
9
;
...
...
@@ -62,6 +62,8 @@ void Conv2dNeonK3x3S1(const float *input,
const
float
*
filter_ptr1
=
filter
+
(
m
+
1
)
*
in_channels
*
9
+
c
*
9
;
#endif
#if defined(MACE_ENABLE_NEON) && defined(__aarch64__)
float
*
out_ptr0
=
out_ptr0_base
;
// load filter (2 outch x 3 height x 3 width): vf_outch_height
float32x4_t
vf00
,
vf01
,
vf02
;
float32x4_t
vf10
,
vf11
,
vf12
;
...
...
@@ -179,6 +181,8 @@ void Conv2dNeonK3x3S1(const float *input,
out_ptr1
+=
out_width
;
}
// h
#elif defined(MACE_ENABLE_NEON) // arm v7
float
*
out_ptr0
=
out_ptr0_base
;
// load filter (2 outch x 3 height x 3 width): vf_outch_height
float32x2_t
vf001
,
vf023
,
vf045
,
vf067
,
vf089
;
float32x2_t
vf101
,
vf123
,
vf145
,
vf167
,
vf189
;
...
...
@@ -312,8 +316,6 @@ void Conv2dNeonK3x3S1(const float *input,
float
*
out_ptr0_base
=
output
+
b
*
out_batch_size
+
mm
*
out_image_size
;
for
(
index_t
c
=
0
;
c
<
in_channels
;
++
c
)
{
float
*
out_ptr0
=
out_ptr0_base
;
const
float
*
in_ptr0
=
input
+
b
*
in_batch_size
+
c
*
in_image_size
;
#if defined(MACE_ENABLE_NEON)
...
...
@@ -327,6 +329,8 @@ void Conv2dNeonK3x3S1(const float *input,
const
float
*
filter_ptr0
=
filter
+
mm
*
in_channels
*
9
+
c
*
9
;
#if defined(MACE_ENABLE_NEON) && defined(__aarch64__)
float
*
out_ptr0
=
out_ptr0_base
;
// load filter (1 outch x 3 height x 3 width): vf_outch_height
float32x4_t
vf00
,
vf01
,
vf02
;
vf00
=
vld1q_f32
(
filter_ptr0
);
...
...
@@ -409,6 +413,8 @@ void Conv2dNeonK3x3S1(const float *input,
out_ptr0
+=
out_width
;
}
// h
#elif defined(MACE_ENABLE_NEON) // arm v7
float
*
out_ptr0
=
out_ptr0_base
;
// load filter (1 outch x 3 height x 3 width): vf_outch_height
float32x2_t
vf01
,
vf23
,
vf45
,
vf67
,
vf78
;
vf01
=
vld1_f32
(
filter_ptr0
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录