Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
magicwindyyd
mindspore
提交
32eb9c6a
M
mindspore
项目概览
magicwindyyd
/
mindspore
与 Fork 源项目一致
Fork自
MindSpore / mindspore
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
mindspore
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
32eb9c6a
编写于
8月 26, 2020
作者:
M
mindspore-ci-bot
提交者:
Gitee
8月 26, 2020
浏览文件
操作
浏览文件
下载
差异文件
!5211 [MS][LITE][Develop]arm32 build bug
Merge pull request !5211 from ling/bug
上级
c05731b6
36240ec7
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
35 addition
and
15 deletion
+35
-15
mindspore/lite/nnacl/fp32/pooling.c
mindspore/lite/nnacl/fp32/pooling.c
+1
-2
mindspore/lite/nnacl/fp32/scale.c
mindspore/lite/nnacl/fp32/scale.c
+3
-3
mindspore/lite/nnacl/fp32/scale.h
mindspore/lite/nnacl/fp32/scale.h
+30
-0
mindspore/lite/nnacl/scale.h
mindspore/lite/nnacl/scale.h
+0
-9
mindspore/lite/src/runtime/kernel/arm/fp32/scale.h
mindspore/lite/src/runtime/kernel/arm/fp32/scale.h
+1
-1
未找到文件。
mindspore/lite/nnacl/fp32/pooling.c
浏览文件 @
32eb9c6a
...
@@ -488,8 +488,7 @@ void AvgPoolingRelu6(const float *input_ptr, float *output_ptr, PoolingParameter
...
@@ -488,8 +488,7 @@ void AvgPoolingRelu6(const float *input_ptr, float *output_ptr, PoolingParameter
}
// win_w loop
}
// win_w loop
}
// win_h loop
}
// win_h loop
#ifdef ENABLE_NEON
#ifdef ENABLE_NEON
float32x4_t
count
=
vdupq_n_f32
(
real_count
);
tmp_avg
=
tmp_avg
/
vdupq_n_f32
(
real_count
);
tmp_avg
=
vdivq_f32
(
tmp_avg
,
count
);
tmp_avg
=
vmaxq_f32
(
tmp_avg
,
zeros
);
tmp_avg
=
vmaxq_f32
(
tmp_avg
,
zeros
);
tmp_avg
=
vminq_f32
(
tmp_avg
,
bounds
);
tmp_avg
=
vminq_f32
(
tmp_avg
,
bounds
);
vst1q_f32
(
output_ptr
+
out_channel_offset
,
tmp_avg
);
vst1q_f32
(
output_ptr
+
out_channel_offset
,
tmp_avg
);
...
...
mindspore/lite/nnacl/scale.c
→
mindspore/lite/nnacl/
fp32/
scale.c
浏览文件 @
32eb9c6a
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
* limitations under the License.
* limitations under the License.
*/
*/
#include "nnacl/scale.h"
#include "nnacl/
fp32/
scale.h"
#ifdef ENABLE_ARM
#ifdef ENABLE_ARM
#include <arm_neon.h>
#include <arm_neon.h>
#endif
#endif
...
@@ -25,7 +25,7 @@ void ScaleInner(float *in_data, float *out_data, float *scale, float *offset, in
...
@@ -25,7 +25,7 @@ void ScaleInner(float *in_data, float *out_data, float *scale, float *offset, in
for
(
int
i
=
0
;
i
<
axis_size
;
i
++
)
{
for
(
int
i
=
0
;
i
<
axis_size
;
i
++
)
{
int
axis_offset
=
out_offset
+
i
*
inner_size
;
int
axis_offset
=
out_offset
+
i
*
inner_size
;
int
in_index
=
0
;
int
in_index
=
0
;
#ifdef ENABLE_ARM
#ifdef ENABLE_ARM
64
for
(;
in_index
<
inner_size
-
4
;
in_index
+=
4
)
{
for
(;
in_index
<
inner_size
-
4
;
in_index
+=
4
)
{
int
in_offset
=
axis_offset
+
in_index
;
int
in_offset
=
axis_offset
+
in_index
;
float32x4_t
data
=
vld1q_f32
(
in_data
+
in_offset
);
float32x4_t
data
=
vld1q_f32
(
in_data
+
in_offset
);
...
@@ -48,7 +48,7 @@ void ScaleAxis(float *in_data, float *out_data, float *scale, float *offset, int
...
@@ -48,7 +48,7 @@ void ScaleAxis(float *in_data, float *out_data, float *scale, float *offset, int
for
(
int
out
=
outer_start
;
out
<
outer_end
;
out
++
)
{
for
(
int
out
=
outer_start
;
out
<
outer_end
;
out
++
)
{
int
out_offset
=
out
*
axis_size
;
int
out_offset
=
out
*
axis_size
;
int
index
=
0
;
int
index
=
0
;
#ifdef ENABLE_ARM
#ifdef ENABLE_ARM
64
for
(;
index
<
axis_size
-
4
;
index
+=
4
)
{
for
(;
index
<
axis_size
-
4
;
index
+=
4
)
{
int
in_offset
=
out_offset
+
index
;
int
in_offset
=
out_offset
+
index
;
float32x4_t
data
=
vld1q_f32
(
in_data
+
in_offset
);
float32x4_t
data
=
vld1q_f32
(
in_data
+
in_offset
);
...
...
mindspore/lite/nnacl/fp32/scale.h
0 → 100644
浏览文件 @
32eb9c6a
/**
* Copyright 2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef MINDSPORE_LITE_NNACL_SCALE_FP32_H_
#define MINDSPORE_LITE_NNACL_SCALE_FP32_H_
#include "nnacl/op_base.h"
#include "nnacl/scale.h"
#ifdef __cplusplus
extern
"C"
{
#endif
void
DoScale
(
float
*
in_data
,
float
*
out_data
,
float
*
scale
,
float
*
offset
,
int
task_id
,
ScaleParameter
*
scale_param
);
#ifdef __cplusplus
}
#endif
#endif // MINDSPORE_LITE_NNACL_SCALE_FP32_H_
mindspore/lite/nnacl/scale.h
浏览文件 @
32eb9c6a
...
@@ -18,7 +18,6 @@
...
@@ -18,7 +18,6 @@
#define MINDSPORE_LITE_NNACL_SCALE_H_
#define MINDSPORE_LITE_NNACL_SCALE_H_
#include "nnacl/op_base.h"
#include "nnacl/op_base.h"
typedef
struct
ScaleParameter
{
typedef
struct
ScaleParameter
{
OpParameter
op_parameter_
;
OpParameter
op_parameter_
;
int
outer_size_
;
int
outer_size_
;
...
@@ -28,12 +27,4 @@ typedef struct ScaleParameter {
...
@@ -28,12 +27,4 @@ typedef struct ScaleParameter {
bool
const_scale_
;
bool
const_scale_
;
}
ScaleParameter
;
}
ScaleParameter
;
#ifdef __cplusplus
extern
"C"
{
#endif
void
DoScale
(
float
*
in_data
,
float
*
out_data
,
float
*
scale
,
float
*
offset
,
int
task_id
,
ScaleParameter
*
scale_param
);
#ifdef __cplusplus
}
#endif
#endif // MINDSPORE_LITE_NNACL_SCALE_H_
#endif // MINDSPORE_LITE_NNACL_SCALE_H_
mindspore/lite/src/runtime/kernel/arm/fp32/scale.h
浏览文件 @
32eb9c6a
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
#include <vector>
#include <vector>
#include "src/lite_kernel.h"
#include "src/lite_kernel.h"
#include "nnacl/scale.h"
#include "nnacl/
fp32/
scale.h"
namespace
mindspore
::
kernel
{
namespace
mindspore
::
kernel
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录