Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
magicwindyyd
mindspore
提交
b488c34b
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看板
提交
b488c34b
编写于
8月 18, 2020
作者:
M
mindspore-ci-bot
提交者:
Gitee
8月 18, 2020
浏览文件
操作
浏览文件
下载
差异文件
!4661 [MS][LITE][Develop]fp16 conv1x1 deconv resize func bug
Merge pull request !4661 from ling/conv1x1_fp16
上级
cca09eeb
3798a0bb
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
38 addition
and
23 deletion
+38
-23
mindspore/lite/src/runtime/kernel/arm/fp16/convolution_1x1_fp16.cc
.../lite/src/runtime/kernel/arm/fp16/convolution_1x1_fp16.cc
+14
-6
mindspore/lite/src/runtime/kernel/arm/fp16/convolution_1x1_fp16.h
...e/lite/src/runtime/kernel/arm/fp16/convolution_1x1_fp16.h
+10
-16
mindspore/lite/src/runtime/kernel/arm/fp16/deconvolution_fp16.cc
...re/lite/src/runtime/kernel/arm/fp16/deconvolution_fp16.cc
+4
-0
mindspore/lite/src/runtime/kernel/arm/fp32/convolution_1x1.cc
...spore/lite/src/runtime/kernel/arm/fp32/convolution_1x1.cc
+2
-0
mindspore/lite/src/runtime/kernel/arm/fp32/deconvolution.cc
mindspore/lite/src/runtime/kernel/arm/fp32/deconvolution.cc
+8
-1
未找到文件。
mindspore/lite/src/runtime/kernel/arm/fp16/convolution_1x1_fp16.cc
浏览文件 @
b488c34b
...
...
@@ -105,16 +105,24 @@ int Convolution1x1FP16CPUKernel::Init() {
return
ReSize
();
}
int
Convolution1x1FP16CPUKernel
::
ReSize
()
{
FreeTmpBuffer
();
if
(
fp16_weight_
!=
nullptr
)
{
free
(
fp16_weight_
);
fp16_weight_
=
nullptr
;
void
Convolution1x1FP16CPUKernel
::
FreeTmpBuffer
()
{
if
(
weight_ptr_
!=
nullptr
)
{
free
(
weight_ptr_
);
weight_ptr_
=
nullptr
;
}
if
(
input_ptr_
!=
nullptr
)
{
if
(
pack_input_
!=
nullptr
)
{
free
(
pack_input_
);
pack_input_
=
nullptr
;
}
if
(
pre_trans_input_
&&
input_ptr_
!=
nullptr
)
{
free
(
input_ptr_
);
input_ptr_
=
nullptr
;
}
return
;
}
int
Convolution1x1FP16CPUKernel
::
ReSize
()
{
FreeTmpBuffer
();
auto
ret
=
ConvolutionBaseCPUKernel
::
Init
();
if
(
ret
!=
RET_OK
)
{
...
...
mindspore/lite/src/runtime/kernel/arm/fp16/convolution_1x1_fp16.h
浏览文件 @
b488c34b
...
...
@@ -34,33 +34,27 @@ class Convolution1x1FP16CPUKernel : public ConvolutionBaseFP16CPUKernel {
:
ConvolutionBaseFP16CPUKernel
(
parameter
,
inputs
,
outputs
,
ctx
,
primitive
)
{
matmul_param_
=
new
MatMulParameter
();
}
~
Convolution1x1FP16CPUKernel
()
override
{
FreeTmpBuffer
();
}
~
Convolution1x1FP16CPUKernel
()
override
{
FreeTmpBuffer
();
if
(
matmul_param_
!=
nullptr
)
{
delete
matmul_param_
;
matmul_param_
=
nullptr
;
}
}
int
Init
()
override
;
int
ReSize
()
override
;
int
Run
()
override
;
int
RunImpl
(
int
task_id
);
int
InitBuffer
();
private:
void
FreeTmpBuffer
();
int
InitConv1x1Param
();
int
InitMatmulParam
();
int
InitWeightBias
();
void
Pre1x1Trans
(
float16_t
*
src_input
,
float16_t
*
src_output
);
private:
void
FreeTmpBuffer
()
{
if
(
weight_ptr_
!=
nullptr
)
{
free
(
weight_ptr_
);
weight_ptr_
=
nullptr
;
}
if
(
matmul_param_
!=
nullptr
)
{
delete
matmul_param_
;
matmul_param_
=
nullptr
;
}
if
(
pack_input_
!=
nullptr
)
{
free
(
pack_input_
);
pack_input_
=
nullptr
;
}
}
bool
pre_trans_input_
=
false
;
int
thread_count_
=
0
;
int
thread_stride_
=
0
;
...
...
mindspore/lite/src/runtime/kernel/arm/fp16/deconvolution_fp16.cc
浏览文件 @
b488c34b
...
...
@@ -27,6 +27,10 @@ using mindspore::schema::PrimitiveType_DeConv2D;
namespace
mindspore
::
kernel
{
DeConvolutionFp16CPUKernel
::~
DeConvolutionFp16CPUKernel
()
{
FreeParam
();
if
(
matmul_param_
!=
nullptr
)
{
delete
matmul_param_
;
matmul_param_
=
nullptr
;
}
return
;
}
...
...
mindspore/lite/src/runtime/kernel/arm/fp32/convolution_1x1.cc
浏览文件 @
b488c34b
...
...
@@ -26,6 +26,7 @@ Convolution1x1CPUKernel::~Convolution1x1CPUKernel() {
FreeTmpBuffer
();
if
(
matmul_param_
!=
nullptr
)
{
delete
matmul_param_
;
matmul_param_
=
nullptr
;
}
}
...
...
@@ -42,6 +43,7 @@ void Convolution1x1CPUKernel::FreeTmpBuffer() {
free
(
input_ptr_
);
input_ptr_
=
nullptr
;
}
return
;
}
int
Convolution1x1CPUKernel
::
ReSize
()
{
...
...
mindspore/lite/src/runtime/kernel/arm/fp32/deconvolution.cc
浏览文件 @
b488c34b
...
...
@@ -25,7 +25,13 @@ using mindspore::lite::RET_OK;
using
mindspore
::
schema
::
PrimitiveType_DeConv2D
;
namespace
mindspore
::
kernel
{
DeConvolutionCPUKernel
::~
DeConvolutionCPUKernel
()
{
FreeTmpBuffer
();
}
DeConvolutionCPUKernel
::~
DeConvolutionCPUKernel
()
{
FreeTmpBuffer
();
if
(
matmul_param_
!=
nullptr
)
{
delete
matmul_param_
;
matmul_param_
=
nullptr
;
}
}
void
DeConvolutionCPUKernel
::
FreeTmpBuffer
()
{
if
(
weight_ptr_
!=
nullptr
)
{
...
...
@@ -44,6 +50,7 @@ void DeConvolutionCPUKernel::FreeTmpBuffer() {
free
(
pack_output_
);
pack_output_
=
nullptr
;
}
return
;
}
int
DeConvolutionCPUKernel
::
ReSize
()
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录