Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
不被定义的号
mindspore
提交
0ec0ddc8
M
mindspore
项目概览
不被定义的号
/
mindspore
与 Fork 源项目一致
Fork自
MindSpore / mindspore
通知
1
Star
0
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看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
0ec0ddc8
编写于
8月 29, 2020
作者:
Z
zhanyuan
提交者:
liuwenhao4
8月 29, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix the bug of opt matmul int8 working on multiple threadings
上级
1821e98e
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
30 addition
and
5 deletion
+30
-5
mindspore/lite/nnacl/assembly/opt/MatmulDpInt8.S
mindspore/lite/nnacl/assembly/opt/MatmulDpInt8.S
+26
-2
mindspore/lite/nnacl/opt_op_handler.c
mindspore/lite/nnacl/opt_op_handler.c
+1
-1
mindspore/lite/src/runtime/kernel/arm/int8/convolution_1x1_int8.cc
.../lite/src/runtime/kernel/arm/int8/convolution_1x1_int8.cc
+1
-1
mindspore/lite/src/runtime/kernel/arm/int8/convolution_depthwise_int8.cc
...src/runtime/kernel/arm/int8/convolution_depthwise_int8.cc
+1
-0
mindspore/lite/src/runtime/kernel/arm/int8/convolution_int8.cc
...pore/lite/src/runtime/kernel/arm/int8/convolution_int8.cc
+1
-1
未找到文件。
mindspore/lite/nnacl/assembly/opt/MatmulDpInt8.S
浏览文件 @
0ec0ddc8
...
...
@@ -421,13 +421,37 @@ End3:
smax
v17
.4
s
,
v17
.4
s
,
v7
.4
s
smax
v18
.4
s
,
v18
.4
s
,
v7
.4
s
smax
v19
.4
s
,
v19
.4
s
,
v7
.4
s
//
Apply
the
act_min
bound
smax
v20
.4
s
,
v20
.4
s
,
v7
.4
s
smax
v21
.4
s
,
v21
.4
s
,
v7
.4
s
smax
v22
.4
s
,
v22
.4
s
,
v7
.4
s
smax
v23
.4
s
,
v23
.4
s
,
v7
.4
s
smax
v24
.4
s
,
v24
.4
s
,
v7
.4
s
smax
v25
.4
s
,
v25
.4
s
,
v7
.4
s
smax
v26
.4
s
,
v26
.4
s
,
v7
.4
s
smax
v27
.4
s
,
v27
.4
s
,
v7
.4
s
smax
v28
.4
s
,
v28
.4
s
,
v7
.4
s
smax
v29
.4
s
,
v29
.4
s
,
v7
.4
s
smax
v30
.4
s
,
v30
.4
s
,
v7
.4
s
smax
v31
.4
s
,
v31
.4
s
,
v7
.4
s
//
Apply
the
act_max
bound
dup
v6
.4
s
,
w9
smin
v16
.4
s
,
v16
.4
s
,
v6
.4
s
smin
v17
.4
s
,
v17
.4
s
,
v6
.4
s
smin
v18
.4
s
,
v18
.4
s
,
v6
.4
s
smin
v19
.4
s
,
v19
.4
s
,
v6
.4
s
smin
v20
.4
s
,
v20
.4
s
,
v6
.4
s
smin
v21
.4
s
,
v21
.4
s
,
v6
.4
s
smin
v22
.4
s
,
v22
.4
s
,
v6
.4
s
smin
v23
.4
s
,
v23
.4
s
,
v6
.4
s
smin
v24
.4
s
,
v24
.4
s
,
v6
.4
s
smin
v25
.4
s
,
v25
.4
s
,
v6
.4
s
smin
v26
.4
s
,
v26
.4
s
,
v6
.4
s
smin
v27
.4
s
,
v27
.4
s
,
v6
.4
s
smin
v28
.4
s
,
v28
.4
s
,
v6
.4
s
smin
v29
.4
s
,
v29
.4
s
,
v6
.4
s
smin
v30
.4
s
,
v30
.4
s
,
v6
.4
s
smin
v31
.4
s
,
v31
.4
s
,
v6
.4
s
//
int32
->
int16
sqxtn
v0
.4
h
,
v16
.4
s
...
...
mindspore/lite/nnacl/opt_op_handler.c
浏览文件 @
0ec0ddc8
...
...
@@ -57,6 +57,6 @@ void MatMulRInt8_optimize_handler(const int8_t *a, const int8_t *b, int8_t *dst,
int32_t
*
right_shift
,
int32_t
*
multiplier
,
int32_t
output_zp
,
int32_t
mini
,
int32_t
maxi
,
bool
per_channel
)
{
return
MatmulInt8DpNeon64
(
a
,
b
,
dst
,
UP_ROUND
(
row
,
8
),
UP_ROUND
(
col
,
8
),
deep_4
,
input_sum
,
bias
,
mini
,
maxi
,
output_zp
,
multiplier
[
0
],
left_shift
[
0
],
right_shift
[
0
],
row
,
col
,
col
);
output_zp
,
multiplier
[
0
],
left_shift
[
0
],
right_shift
[
0
],
row
,
col
,
stride
);
}
#endif
mindspore/lite/src/runtime/kernel/arm/int8/convolution_1x1_int8.cc
浏览文件 @
0ec0ddc8
...
...
@@ -38,7 +38,7 @@ Convolution1x1Int8CPUKernel::~Convolution1x1Int8CPUKernel() {
matmul_param_
=
nullptr
;
}
if
(
packed_weight_
!=
nullptr
)
{
delete
packed_weight_
;
free
(
packed_weight_
)
;
packed_weight_
=
nullptr
;
}
FreeResizeBuf
();
...
...
mindspore/lite/src/runtime/kernel/arm/int8/convolution_depthwise_int8.cc
浏览文件 @
0ec0ddc8
...
...
@@ -60,6 +60,7 @@ int ConvolutionDepthwiseInt8CPUKernel::InitWeightBias() {
for
(
int
i
=
0
;
i
<
weight_tensor
->
ElementsNum
();
i
++
)
{
packed_weight_
[
i
]
=
(
int16_t
)(
tmp_weight
[
i
]
-
weight_zp
);
}
free
(
tmp_weight
);
bias_data_
=
reinterpret_cast
<
int32_t
*>
(
malloc
(
channel
*
sizeof
(
int32_t
)));
if
(
bias_data_
==
nullptr
)
{
...
...
mindspore/lite/src/runtime/kernel/arm/int8/convolution_int8.cc
浏览文件 @
0ec0ddc8
...
...
@@ -402,7 +402,7 @@ kernel::LiteKernel *CpuConvInt8KernelCreator(const std::vector<lite::tensor::Ten
if
(
kernel_h
==
3
&&
kernel_w
==
3
&&
stride_h
==
1
&&
stride_w
==
1
&&
dilation_h
==
1
&&
dilation_w
==
1
)
{
kernel
=
new
(
std
::
nothrow
)
kernel
::
ConvolutionInt8CPUKernel
(
opParameter
,
inputs
,
outputs
,
ctx
,
primitive
);
}
else
if
(
kernel_h
==
1
&&
kernel_w
==
1
&&
filter_quant_size
==
1
)
{
kernel
=
new
(
std
::
nothrow
)
kernel
::
ConvolutionInt8CPUKernel
(
opParameter
,
inputs
,
outputs
,
ctx
,
primitive
);
kernel
=
new
(
std
::
nothrow
)
kernel
::
Convolution
1x1
Int8CPUKernel
(
opParameter
,
inputs
,
outputs
,
ctx
,
primitive
);
}
else
{
kernel
=
new
(
std
::
nothrow
)
kernel
::
ConvolutionInt8CPUKernel
(
opParameter
,
inputs
,
outputs
,
ctx
,
primitive
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录