Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
magicwindyyd
mindspore
提交
a77eddbf
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看板
提交
a77eddbf
编写于
8月 11, 2020
作者:
M
mindspore-ci-bot
提交者:
Gitee
8月 11, 2020
浏览文件
操作
浏览文件
下载
差异文件
!4200 set default log level is WARNING and fix questions according to cppcheck report
Merge pull request !4200 from 徐安越/master
上级
f21ee64f
7fa2145c
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
12 addition
and
12 deletion
+12
-12
mindspore/lite/src/common/log_adapter.cc
mindspore/lite/src/common/log_adapter.cc
+2
-2
mindspore/lite/src/runtime/kernel/arm/nnacl/int8/conv_int8.cc
...spore/lite/src/runtime/kernel/arm/nnacl/int8/conv_int8.cc
+1
-1
mindspore/lite/tools/converter/legacy_optimizer/fusion/format_trans_fusion_pass.cc
...erter/legacy_optimizer/fusion/format_trans_fusion_pass.cc
+8
-2
mindspore/lite/tools/converter/parser/onnx/onnx_model_parser.cc
...ore/lite/tools/converter/parser/onnx/onnx_model_parser.cc
+1
-7
未找到文件。
mindspore/lite/src/common/log_adapter.cc
浏览文件 @
a77eddbf
...
...
@@ -46,9 +46,9 @@ bool IsPrint(int level) {
static
const
char
*
env
=
std
::
getenv
(
"MSLOG"
);
static
int
ms_level
=
EnvToInt
(
env
);
if
(
ms_level
<
0
)
{
ms_level
=
1
;
ms_level
=
2
;
printf
(
"please set env MSLOG DEBUG/INFO/WARNING/ERROR
\n
"
);
printf
(
"the default is
INFO
\n
"
);
printf
(
"the default is
WARNING
\n
"
);
}
return
level
>=
ms_level
;
}
...
...
mindspore/lite/src/runtime/kernel/arm/nnacl/int8/conv_int8.cc
浏览文件 @
a77eddbf
...
...
@@ -126,10 +126,10 @@ void IndirectGemmInt8Opt(int8_t *dst, int32_t *tmp_dst, const int8_t *src, const
void
Conv3x3Uint8Gemm
(
int32_t
*
dst
,
const
int16_t
*
src
,
const
int16_t
*
weight
,
int
oc
,
int
ic8
,
size_t
real_cal_num
)
{
int
oc4
=
UP_DIV
(
oc
,
C4NUM
);
int
input_unit_square
=
16
;
#ifdef ENABLE_ARM
IndirectGemmInt16to32_8x4
(
dst
,
src
,
weight
,
16
,
ic8
,
oc4
,
oc4
*
4
*
16
*
sizeof
(
int32_t
));
#else
int
input_unit_square
=
16
;
for
(
int
c
=
0
;
c
<
oc4
;
c
++
)
{
int
filter_oc_offset
=
c
*
input_unit_square
*
ic8
*
C8NUM
*
C4NUM
;
int
dst_oc_offset
=
c
*
input_unit_square
*
C4NUM
;
...
...
mindspore/lite/tools/converter/legacy_optimizer/fusion/format_trans_fusion_pass.cc
浏览文件 @
a77eddbf
...
...
@@ -149,8 +149,14 @@ STATUS FormatTransFusionPass::DoFusion(schema::MetaGraphT *graph, const std::str
}
else
{
MS_ASSERT
(
false
);
}
MS_ASSERT
(
srcPath
!=
nullptr
);
MS_ASSERT
(
dstPath
!=
nullptr
);
if
(
srcPath
==
nullptr
)
{
MS_LOG
(
ERROR
)
<<
"srcPath is failed to get"
;
return
RET_ERROR
;
}
if
(
dstPath
==
nullptr
)
{
MS_LOG
(
ERROR
)
<<
"dstPath is failed to get"
;
return
RET_ERROR
;
}
auto
srcNode
=
graph
->
nodes
.
at
(
srcPath
->
nodeIdx
).
get
();
auto
dstNode
=
graph
->
nodes
.
at
(
dstPath
->
nodeIdx
).
get
();
MS_ASSERT
(
srcNode
!=
nullptr
);
...
...
mindspore/lite/tools/converter/parser/onnx/onnx_model_parser.cc
浏览文件 @
a77eddbf
...
...
@@ -47,7 +47,6 @@ TypeId OnnxModelParser::GetDateTypeFromOnnx(onnx::TensorProto_DataType onnx_type
std
::
vector
<
int32_t
>
OnnxModelParser
::
GetDimsFromOnnxValue
(
const
onnx
::
ValueInfoProto
&
onnx_value
)
{
std
::
vector
<
int32_t
>
dims
;
const
auto
shape_info
=
onnx_value
.
type
().
tensor_type
().
shape
();
for
(
const
auto
&
it
:
onnx_value
.
type
().
tensor_type
().
shape
().
dim
())
{
dims
.
emplace_back
(
it
.
dim_value
());
}
...
...
@@ -97,7 +96,7 @@ STATUS OnnxModelParser::SetGraphConstTensor(const onnx::GraphProto &onnx_graph,
if
(
CopyOnnxTensorData
(
onnx_const_value
,
tensor
.
get
()))
{
return
RET_ERROR
;
}
const
auto
index
=
tensor_cache
->
AddTensor
(
onnx_const_value
.
name
(),
tensor
.
release
(),
GRAPH_INPUT
);
//
const auto index = tensor_cache->AddTensor(onnx_const_value.name(), tensor.release(), GRAPH_INPUT);
// MS_LOGD("add const tensor: %s, index %d", onnx_const_value.name().c_str(), index)
}
return
RET_OK
;
...
...
@@ -290,11 +289,6 @@ void OnnxModelParser::SetOpQuantParams(const onnx::GraphProto &onnx_graph, const
// MS_LOGE("new QuantParamT failed, node: %s", dst_op->name.c_str());
return
;
}
// std::unique_ptr<mindspore::lite::QuantParamArrayT> quant_param_array(new (std::nothrow) QuantParamArrayT());
if
(
quant_param
==
nullptr
)
{
// MS_LOGE("new QuantParamArrayT failed, node: %s", dst_op->name.c_str());
return
;
}
int
argNum
=
0
;
for
(
const
auto
&
onnx_node_attr
:
node
.
attribute
())
{
if
(
onnx_node_attr
.
name
()
==
"Y_scale"
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录