Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
magicwindyyd
mindspore
提交
521e351d
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看板
提交
521e351d
编写于
8月 31, 2020
作者:
M
mindspore-ci-bot
提交者:
Gitee
8月 31, 2020
浏览文件
操作
浏览文件
下载
差异文件
!5593 fix some mistake of codex
Merge pull request !5593 from liuwenhao/master
上级
236952ca
51b3409a
变更
12
隐藏空白更改
内联
并排
Showing
12 changed file
with
24 addition
and
14 deletion
+24
-14
mindspore/lite/nnacl/fp16/conv_fp16.c
mindspore/lite/nnacl/fp16/conv_fp16.c
+1
-1
mindspore/lite/nnacl/fp32/common_func.c
mindspore/lite/nnacl/fp32/common_func.c
+7
-1
mindspore/lite/nnacl/fp32/roi_pooling.c
mindspore/lite/nnacl/fp32/roi_pooling.c
+1
-1
mindspore/lite/nnacl/int8/leaky_relu_int8.c
mindspore/lite/nnacl/int8/leaky_relu_int8.c
+3
-0
mindspore/lite/nnacl/int8/matmul_int8.c
mindspore/lite/nnacl/int8/matmul_int8.c
+1
-1
mindspore/lite/src/ops/conv2d.cc
mindspore/lite/src/ops/conv2d.cc
+2
-2
mindspore/lite/src/ops/depthwise_conv2d.cc
mindspore/lite/src/ops/depthwise_conv2d.cc
+2
-2
mindspore/lite/src/ops/matmul.cc
mindspore/lite/src/ops/matmul.cc
+2
-2
mindspore/lite/src/runtime/kernel/opencl/kernel/to_format.cc
mindspore/lite/src/runtime/kernel/opencl/kernel/to_format.cc
+2
-2
mindspore/lite/src/runtime/kernel/opencl/subgraph_opencl_kernel.cc
.../lite/src/runtime/kernel/opencl/subgraph_opencl_kernel.cc
+1
-1
mindspore/lite/src/runtime/opencl/opencl_runtime.cc
mindspore/lite/src/runtime/opencl/opencl_runtime.cc
+1
-1
mindspore/lite/tools/converter/parser/onnx/onnx_model_parser.cc
...ore/lite/tools/converter/parser/onnx/onnx_model_parser.cc
+1
-0
未找到文件。
mindspore/lite/nnacl/fp16/conv_fp16.c
浏览文件 @
521e351d
...
...
@@ -279,7 +279,7 @@ void ConvSWFp16(const float16_t *input_data, const float16_t *packed_weight, con
bool
relu6
=
conv_param
->
act_type_
==
ActType_Relu6
;
int
oc4_res
=
conv_param
->
output_channel_
%
C4NUM
;
const
float16_t
*
src
=
input_data
;
float16_t
*
dst
;
float16_t
*
dst
=
NULL
;
if
(
oc4_res
==
0
)
{
dst
=
output_data
;
}
else
{
...
...
mindspore/lite/nnacl/fp32/common_func.c
浏览文件 @
521e351d
...
...
@@ -17,8 +17,14 @@
#include "nnacl/fp32/common_func.h"
void
PostConvFuncComm
(
const
float
*
src_ptr_
,
float
*
out_ptr
,
const
float
*
bias_ptr
,
size_t
output_channel
,
size_t
plane_size
,
size_t
stride
,
bool
is_relu
,
bool
is_relu6
,
int
size
)
{
int
oc_div
=
0
,
oc_mod
=
0
;
for
(
int
oc
=
0
;
oc
<
output_channel
;
oc
++
)
{
int
oc_div
=
oc
/
size
,
oc_mod
=
oc
%
size
;
if
(
size
!=
0
)
{
oc_div
=
oc
/
size
;
oc_mod
=
oc
%
size
;
}
else
{
return
;
}
for
(
int
hw
=
0
;
hw
<
plane_size
;
hw
++
)
{
int
src_index
=
oc_div
*
size
*
plane_size
+
hw
*
size
+
oc_mod
;
int
dst_index
=
hw
*
stride
+
oc
;
...
...
mindspore/lite/nnacl/fp32/roi_pooling.c
浏览文件 @
521e351d
...
...
@@ -35,7 +35,7 @@ int ROIPooling(float *in_ptr, float *out_ptr, float *roi, int tid, ROIPoolingPar
int
scale
=
param
->
scale_
;
int
pooled_height
=
param
->
pooledH_
;
int
pooled_width
=
param
->
pooledW_
;
int
roi_stride
=
5
;
const
int
roi_stride
=
5
;
int
roi_ind_st
=
roi_st
*
roi_stride
;
float
*
max_c
=
malloc
(
channels_
*
sizeof
(
float
));
for
(
int
i
=
roi_st
;
i
<
roi_end
;
++
i
)
{
...
...
mindspore/lite/nnacl/int8/leaky_relu_int8.c
浏览文件 @
521e351d
...
...
@@ -17,6 +17,9 @@
#include "nnacl/int8/leaky_relu_int8.h"
void
DoLeakReluInt8
(
int8_t
*
inputs
,
int8_t
*
output_ptr
,
LeakyReluQuantArg
*
quant_prelu_parm
,
int
task_id
)
{
if
(
quant_prelu_parm
==
NULL
)
{
return
;
}
float
output_scale
=
quant_prelu_parm
->
quant_arg
.
out_args_
.
scale_
;
int
output_zp
=
quant_prelu_parm
->
quant_arg
.
out_args_
.
zp_
;
const
float
output_inverse_scale
=
1
.
f
/
output_scale
;
...
...
mindspore/lite/nnacl/int8/matmul_int8.c
浏览文件 @
521e351d
...
...
@@ -328,7 +328,7 @@ void CalcWeightBiasSums(int8_t *weight, int row, int col, int input_zp, int weig
}
}
dst
[
c
]
=
row
*
input_zp
*
weight_zp
-
input_zp
*
sum
;
if
(
bias
)
{
if
(
bias
!=
NULL
)
{
dst
[
c
]
+=
bias
[
c
];
}
}
...
...
mindspore/lite/src/ops/conv2d.cc
浏览文件 @
521e351d
...
...
@@ -218,8 +218,8 @@ void Conv2D::PopulaterConv2DSingleGroup(const Primitive &prim, schema::Primitive
}
void
Conv2D
::
CalQuantParam
(
const
double
&
mean
,
const
double
&
stdDev
,
float
*
mMin
,
float
*
mMax
)
{
const
expr
float
qmin
=
0
;
const
expr
float
qmax
=
255
;
const
float
qmin
=
0
;
const
float
qmax
=
255
;
*
mMin
=
static_cast
<
float
>
((
qmin
-
mean
)
/
stdDev
);
*
mMax
=
static_cast
<
float
>
((
qmax
-
mean
)
/
stdDev
);
}
...
...
mindspore/lite/src/ops/depthwise_conv2d.cc
浏览文件 @
521e351d
...
...
@@ -70,8 +70,8 @@ void DepthwiseConv2D::SetActivationType(int activation_type) {
}
void
DepthwiseConv2D
::
CalQuantParam
(
const
double
&
mean
,
const
double
&
stdDev
,
float
*
mMin
,
float
*
mMax
)
{
const
expr
float
qmin
=
0
;
const
expr
float
qmax
=
255
;
const
float
qmin
=
0
;
const
float
qmax
=
255
;
*
mMin
=
static_cast
<
float
>
((
qmin
-
mean
)
/
stdDev
);
*
mMax
=
static_cast
<
float
>
((
qmax
-
mean
)
/
stdDev
);
}
...
...
mindspore/lite/src/ops/matmul.cc
浏览文件 @
521e351d
...
...
@@ -31,8 +31,8 @@ void MatMul::SetTransposeA(bool transpose_a) { this->primitive_->value.AsMatMul(
void
MatMul
::
SetTransposeB
(
bool
transpose_b
)
{
this
->
primitive_
->
value
.
AsMatMul
()
->
transposeB
=
transpose_b
;
}
void
MatMul
::
CalQuantParam
(
const
double
&
mean
,
const
double
&
stdDev
,
float
*
mMin
,
float
*
mMax
)
{
const
expr
float
qmin
=
0
;
const
expr
float
qmax
=
255
;
const
float
qmin
=
0
;
const
float
qmax
=
255
;
*
mMin
=
static_cast
<
float
>
((
qmin
-
mean
)
/
stdDev
);
*
mMax
=
static_cast
<
float
>
((
qmax
-
mean
)
/
stdDev
);
}
...
...
mindspore/lite/src/runtime/kernel/opencl/kernel/to_format.cc
浏览文件 @
521e351d
...
...
@@ -119,8 +119,8 @@ int ToFormatOpenCLKernel::GetImageSize(size_t idx, std::vector<size_t> *img_size
im_dst_x
=
w
*
UP_DIV
(
c
,
C4NUM
);
im_dst_y
=
h
;
}
else
if
(
out_tensors_
[
0
]
->
GetFormat
()
==
schema
::
Format_NC4
)
{
int
h
=
1
;
int
w
=
1
;
const
int
h
=
1
;
const
int
w
=
1
;
int
c
=
shapex
[
1
];
im_dst_x
=
w
*
UP_DIV
(
c
,
C4NUM
);
im_dst_y
=
h
;
...
...
mindspore/lite/src/runtime/kernel/opencl/subgraph_opencl_kernel.cc
浏览文件 @
521e351d
...
...
@@ -109,7 +109,7 @@ int SubGraphOpenCLKernel::GenToFormatOp(const std::vector<lite::tensor::Tensor *
parameter
->
dst_format
=
dst_format
;
parameter
->
out_mem_type
=
mem_type
;
out_parameters
->
emplace_back
(
parameter
);
LiteKernel
*
in_convert_op
;
LiteKernel
*
in_convert_op
=
nullptr
;
if
(
mem_type
==
OpenCLMemType
::
IMG
)
{
in_convert_op
=
lite
::
GetOpenCLKernel
({
in_tensors
[
i
]},
{
new_tensor
},
reinterpret_cast
<
OpParameter
*>
(
parameter
),
nullptr
,
desc
);
...
...
mindspore/lite/src/runtime/opencl/opencl_runtime.cc
浏览文件 @
521e351d
...
...
@@ -198,7 +198,7 @@ int OpenCLRuntime::Init() {
MS_LOG
(
INFO
)
<<
"Compute Unit: "
<<
compute_units_
;
MS_LOG
(
INFO
)
<<
"Clock Frequency: "
<<
max_freq_
<<
" MHz"
;
cl_command_queue_properties
properties
=
0
;
c
onst
c
l_command_queue_properties
properties
=
0
;
#if MS_OPENCL_PROFILE
properties
|=
CL_QUEUE_PROFILING_ENABLE
;
#endif
...
...
mindspore/lite/tools/converter/parser/onnx/onnx_model_parser.cc
浏览文件 @
521e351d
...
...
@@ -402,6 +402,7 @@ STATUS OnnxModelParser::CopyOnnxTensorData(const onnx::TensorProto &onnx_const_v
data_size
=
data_count
*
sizeof
(
int32_t
);
buffer
=
std
::
make_unique
<
int32_t
[]
>
(
data_count
);
const
int64_t
*
in_data
;
in_data
=
nullptr
;
if
(
onnx_const_value
.
int64_data_size
()
==
0
)
{
in_data
=
reinterpret_cast
<
const
int64_t
*>
(
onnx_const_value
.
raw_data
().
data
());
}
else
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录