Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
magicwindyyd
mindspore
提交
81004f5e
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看板
提交
81004f5e
编写于
8月 29, 2020
作者:
M
mindspore-ci-bot
提交者:
Gitee
8月 29, 2020
浏览文件
操作
浏览文件
下载
差异文件
!5472 [MS][LITE][Develop]fix log info bug
Merge pull request !5472 from ling/conv1x1
上级
135cfc6a
e9f75a2b
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
27 addition
and
13 deletion
+27
-13
mindspore/lite/include/context.h
mindspore/lite/include/context.h
+1
-1
mindspore/lite/nnacl/optimized_kernel.h
mindspore/lite/nnacl/optimized_kernel.h
+3
-3
mindspore/lite/src/runtime/kernel/arm/fp16/convolution_1x1_fp16.cc
.../lite/src/runtime/kernel/arm/fp16/convolution_1x1_fp16.cc
+2
-1
mindspore/lite/src/runtime/kernel/arm/fp16/deconvolution_fp16.cc
...re/lite/src/runtime/kernel/arm/fp16/deconvolution_fp16.cc
+4
-2
mindspore/lite/src/runtime/kernel/arm/fp32/convolution_1x1.cc
...spore/lite/src/runtime/kernel/arm/fp32/convolution_1x1.cc
+2
-1
mindspore/lite/src/runtime/kernel/arm/fp32/deconvolution.cc
mindspore/lite/src/runtime/kernel/arm/fp32/deconvolution.cc
+5
-2
mindspore/lite/src/runtime/kernel/arm/int8/convolution_1x1_int8.cc
.../lite/src/runtime/kernel/arm/int8/convolution_1x1_int8.cc
+3
-1
mindspore/lite/src/runtime/kernel/arm/int8/deconvolution_int8.cc
...re/lite/src/runtime/kernel/arm/int8/deconvolution_int8.cc
+7
-2
未找到文件。
mindspore/lite/include/context.h
浏览文件 @
81004f5e
...
...
@@ -65,7 +65,7 @@ class MS_API Context {
virtual
~
Context
();
public:
bool
float16_priority
=
false
;
/**<
allow priority select float16 kernel
*/
bool
float16_priority
=
false
;
/**<
prior enable float16 inference
*/
DeviceContext
device_ctx_
{
DT_CPU
};
int
thread_num_
=
2
;
/**< thread number config for thread pool */
std
::
shared_ptr
<
Allocator
>
allocator
=
nullptr
;
...
...
mindspore/lite/nnacl/optimized_kernel.h
浏览文件 @
81004f5e
...
...
@@ -50,10 +50,10 @@ class OptimizeModule {
#ifdef ENABLE_ARM64
if
(
hwcap
&
HWCAP_ASIMDDP
)
{
printf
(
"Hw cap support SMID Dot Product, hwcap: 0x%x
\n
"
,
hwcap
)
;
MS_LOG
(
INFO
)
<<
"Hw cap support SMID Dot Product, hwcap: 0x"
<<
hwcap
;
support_optimize_ops
=
true
;
}
else
{
printf
(
"Hw cap NOT support SIMD Dot Product, hwcap: 0x%x
\n
"
,
hwcap
)
;
MS_LOG
(
INFO
)
<<
"Hw cap NOT support SIMD Dot Product, hwcap: 0x"
<<
hwcap
;
}
#endif
#endif
...
...
@@ -63,7 +63,7 @@ class OptimizeModule {
#ifndef _WIN32
optimized_op_handler_
=
dlopen
(
OPTIMIZE_SHARED_LIBRARY_PATH
,
RTLD_LAZY
);
if
(
optimized_op_handler_
==
nullptr
)
{
printf
(
"Open optimize shared library failed: %s
\n
"
,
dlerror
()
);
MS_LOG
(
INFO
)
<<
"Open optimize shared library failed: "
<<
dlerror
(
);
}
#endif
}
...
...
mindspore/lite/src/runtime/kernel/arm/fp16/convolution_1x1_fp16.cc
浏览文件 @
81004f5e
...
...
@@ -178,7 +178,8 @@ void Convolution1x1FP16CPUKernel::Pre1x1Trans(float16_t *src_input, float16_t *s
}
int
Convolution1x1FP16CPUKernel
::
RunImpl
(
int
task_id
)
{
int
cur_oc
=
MSMIN
(
thread_stride_
,
matmul_param_
->
col_
-
task_id
*
thread_stride_
);
int
cur_stride
=
matmul_param_
->
col_
-
task_id
*
thread_stride_
;
int
cur_oc
=
MSMIN
(
thread_stride_
,
cur_stride
);
if
(
cur_oc
<=
0
)
{
return
RET_OK
;
}
...
...
mindspore/lite/src/runtime/kernel/arm/fp16/deconvolution_fp16.cc
浏览文件 @
81004f5e
...
...
@@ -148,8 +148,10 @@ static int DeConvFp16Run(void *cdata, int task_id) {
}
int
DeConvolutionFp16CPUKernel
::
DoDeconv
(
int
task_id
)
{
int
oc
=
MSMIN
(
thread_stride_
,
UP_DIV
(
conv_param_
->
output_channel_
,
C8NUM
)
-
task_id
*
thread_stride_
);
int
oc_res
=
MSMIN
(
thread_stride_
*
C8NUM
,
conv_param_
->
output_channel_
-
task_id
*
thread_stride_
*
C8NUM
);
int
cur_stride
=
UP_DIV
(
conv_param_
->
output_channel_
,
C8NUM
)
-
task_id
*
thread_stride_
;
int
oc
=
MSMIN
(
thread_stride_
,
cur_stride
);
cur_stride
=
conv_param_
->
output_channel_
-
task_id
*
thread_stride_
*
C8NUM
;
int
oc_res
=
MSMIN
(
thread_stride_
*
C8NUM
,
cur_stride
);
if
(
oc
<=
0
)
{
return
RET_OK
;
}
...
...
mindspore/lite/src/runtime/kernel/arm/fp32/convolution_1x1.cc
浏览文件 @
81004f5e
...
...
@@ -137,7 +137,8 @@ int Convolution1x1CPUKernel::Init() {
}
int
Convolution1x1CPUKernel
::
DoConv1x1
(
int
task_id
)
{
int
cur_oc
=
MSMIN
(
thread_stride_
,
matmul_param_
->
col_
-
task_id
*
thread_stride_
);
int
res_stride
=
matmul_param_
->
col_
-
task_id
*
thread_stride_
;
int
cur_oc
=
MSMIN
(
thread_stride_
,
res_stride
);
if
(
cur_oc
<=
0
)
{
return
RET_OK
;
}
...
...
mindspore/lite/src/runtime/kernel/arm/fp32/deconvolution.cc
浏览文件 @
81004f5e
...
...
@@ -103,8 +103,11 @@ int DeConvFp32Run(void *cdata, int task_id) {
}
int
DeConvolutionCPUKernel
::
DoDeconv
(
int
task_id
)
{
int
oc
=
MSMIN
(
thread_stride_
,
UP_DIV
(
conv_param_
->
output_channel_
,
C8NUM
)
-
task_id
*
thread_stride_
);
int
oc_res
=
MSMIN
(
thread_stride_
*
C8NUM
,
conv_param_
->
output_channel_
-
task_id
*
thread_stride_
*
C8NUM
);
int
res_stride
=
UP_DIV
(
conv_param_
->
output_channel_
,
C8NUM
)
-
task_id
*
thread_stride_
;
int
oc
=
MSMIN
(
thread_stride_
,
res_stride
);
int
cur_stride
=
thread_stride_
*
C8NUM
;
res_stride
=
conv_param_
->
output_channel_
-
task_id
*
thread_stride_
*
C8NUM
;
int
oc_res
=
MSMIN
(
cur_stride
,
res_stride
);
if
(
oc
<=
0
||
oc_res
<=
0
)
{
return
RET_OK
;
}
...
...
mindspore/lite/src/runtime/kernel/arm/int8/convolution_1x1_int8.cc
浏览文件 @
81004f5e
...
...
@@ -272,7 +272,9 @@ int Convolution1x1Int8CPUKernel::RunImpl(int task_id) {
}
int
Convolution1x1Int8CPUKernel
::
RunPre
(
int
task_id
)
{
int
cur_hw
=
MSMIN
(
thread_stride_hw_
*
C8NUM
,
matmul_param_
->
row_
-
task_id
*
thread_stride_hw_
*
C8NUM
);
int
cur_stride
=
thread_stride_hw_
*
C8NUM
;
int
res_stride
=
matmul_param_
->
row_
-
task_id
*
thread_stride_hw_
*
C8NUM
;
int
cur_hw
=
MSMIN
(
cur_stride
,
res_stride
);
if
(
cur_hw
<=
0
)
{
return
RET_OK
;
}
...
...
mindspore/lite/src/runtime/kernel/arm/int8/deconvolution_int8.cc
浏览文件 @
81004f5e
...
...
@@ -227,8 +227,13 @@ int DeConvInt8Run(void *cdata, int task_id) {
}
int
DeConvInt8CPUKernel
::
DoDeconv
(
int
task_id
)
{
int
cur_oc
=
MSMIN
(
thread_stride_
,
UP_DIV
(
conv_param_
->
output_channel_
,
C8NUM
)
-
task_id
*
thread_stride_
);
int
cur_oc_res
=
MSMIN
(
thread_stride_
*
C4NUM
,
conv_param_
->
output_channel_
-
task_id
*
thread_stride_
*
C4NUM
);
int
cur_stride
=
thread_stride_
;
int
res_stride
=
UP_DIV
(
conv_param_
->
output_channel_
,
C8NUM
)
-
task_id
*
thread_stride_
;
int
cur_oc
=
MSMIN
(
cur_stride
,
res_stride
);
cur_stride
=
thread_stride_
*
C4NUM
;
res_stride
=
conv_param_
->
output_channel_
-
task_id
*
thread_stride_
*
C4NUM
;
int
cur_oc_res
=
MSMIN
(
cur_stride
,
res_stride
);
if
(
cur_oc
<=
0
)
{
return
RET_OK
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录