Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
magicwindyyd
mindspore
提交
f7386722
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看板
提交
f7386722
编写于
5月 20, 2020
作者:
M
mindspore-ci-bot
提交者:
Gitee
5月 20, 2020
浏览文件
操作
浏览文件
下载
差异文件
!1240 modify log format with space
Merge pull request !1240 from jjfeing/master
上级
049e530a
60447f7e
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
11 addition
and
11 deletion
+11
-11
mindspore/ccsrc/kernel/tbe/tbe_kernel_build.cc
mindspore/ccsrc/kernel/tbe/tbe_kernel_build.cc
+2
-2
mindspore/ccsrc/kernel/tbe/tbe_kernel_select.cc
mindspore/ccsrc/kernel/tbe/tbe_kernel_select.cc
+9
-9
未找到文件。
mindspore/ccsrc/kernel/tbe/tbe_kernel_build.cc
浏览文件 @
f7386722
...
...
@@ -174,7 +174,7 @@ bool TbeKernelJsonCreator::GenInputList(const shared_ptr<AnfNode> &anf_node, siz
input_list
->
emplace_back
(
input_desc_json
);
continue
;
}
MS_LOG
(
ERROR
)
<<
"input num
"
<<
*
real_input_index
<<
"
is not match op inputs"
;
MS_LOG
(
ERROR
)
<<
"input num
: "
<<
*
real_input_index
<<
"
is not match op inputs"
;
return
false
;
}
if
(
op_name
==
"BatchNorm"
)
{
...
...
@@ -436,7 +436,7 @@ void TbeKernelJsonCreator::ParseAttrValue(const std::string &type, const mindspo
MS_EXCEPTION_IF_NULL
(
value_type
);
auto
value_type_str
=
value_type
->
ToString
();
if
(
value_type_str
==
"float"
)
{
float
data
=
GetValue
<
float
>
(
value
);
auto
data
=
GetValue
<
float
>
(
value
);
attr_value
.
push_back
(
data
);
}
else
{
attr_value
=
GetValue
<
std
::
vector
<
float
>>
(
value
);
...
...
mindspore/ccsrc/kernel/tbe/tbe_kernel_select.cc
浏览文件 @
f7386722
...
...
@@ -100,7 +100,7 @@ std::vector<std::string> SplitStr(const std::string &string, const std::string &
substr
=
string
.
substr
(
start
,
index
-
start
);
}
(
void
)
substr
.
erase
(
0
,
substr
.
find_first_not_of
(
' '
));
(
void
)
substr
.
erase
(
substr
.
find_last_not_of
(
" "
)
+
1
);
(
void
)
substr
.
erase
(
substr
.
find_last_not_of
(
' '
)
+
1
);
auto
iter
=
DYNAMIC_FORMAT_MAP
.
find
(
substr
);
if
(
iter
!=
DYNAMIC_FORMAT_MAP
.
end
())
{
substr
=
iter
->
second
;
...
...
@@ -113,8 +113,8 @@ std::vector<std::string> SplitStr(const std::string &string, const std::string &
if
(
string
.
size
()
>
start
)
{
substr
=
string
.
substr
(
start
);
}
(
void
)
substr
.
erase
(
0
,
substr
.
find_first_not_of
(
" "
));
(
void
)
substr
.
erase
(
substr
.
find_last_not_of
(
" "
)
+
1
);
(
void
)
substr
.
erase
(
0
,
substr
.
find_first_not_of
(
' '
));
(
void
)
substr
.
erase
(
substr
.
find_last_not_of
(
' '
)
+
1
);
auto
iter
=
DYNAMIC_FORMAT_MAP
.
find
(
substr
);
if
(
iter
!=
DYNAMIC_FORMAT_MAP
.
end
())
{
substr
=
iter
->
second
;
...
...
@@ -123,7 +123,7 @@ std::vector<std::string> SplitStr(const std::string &string, const std::string &
return
result
;
}
void
ConvertFormatDtype
(
const
std
::
string
&
format
,
const
std
::
string
&
dtype
,
const
std
::
shared_ptr
<
OpIOInfo
>
io_info
)
{
void
ConvertFormatDtype
(
const
std
::
string
&
format
,
const
std
::
string
&
dtype
,
const
std
::
shared_ptr
<
OpIOInfo
>
&
io_info
)
{
MS_EXCEPTION_IF_NULL
(
io_info
);
std
::
vector
<
std
::
string
>
format_vec
=
SplitStr
(
format
,
","
);
std
::
vector
<
std
::
string
>
dtype_vec
=
SplitStr
(
dtype
,
","
);
...
...
@@ -201,7 +201,7 @@ void SetTidyInputsInfo(const std::shared_ptr<AnfNode> &anf_node,
MS_EXCEPTION_IF_NULL
(
inputs
[
i
]);
std
::
string
param_type
=
inputs
[
i
]
->
param_type
();
if
(
i
>=
real_input_num
)
{
MS_LOG
(
INFO
)
<<
"Input index:
"
<<
i
<<
"
is out of real_input_num:"
<<
real_input_num
;
MS_LOG
(
INFO
)
<<
"Input index:
"
<<
i
<<
"
is out of real_input_num:"
<<
real_input_num
;
continue
;
}
auto
type_id
=
AnfAlgo
::
GetPrevNodeOutputInferDataType
(
anf_node
,
i
);
...
...
@@ -239,7 +239,7 @@ void SetTidyOutputsInfo(const std::shared_ptr<AnfNode> &anf_node,
std
::
vector
<
std
::
string
>
outputs_format
;
auto
real_output_num
=
AnfAlgo
::
GetOutputTensorNum
(
anf_node
);
size_t
output_idx
=
0
;
for
(
const
auto
output
:
outputs
)
{
for
(
const
auto
&
output
:
outputs
)
{
MS_EXCEPTION_IF_NULL
(
output
);
if
(
output_idx
>=
real_output_num
)
{
continue
;
...
...
@@ -280,7 +280,7 @@ void GenTidyKernelBuildInfo(const std::shared_ptr<AnfNode> &anf_node,
}
void
ReplaceByDynamicFormatDtype
(
const
CNodePtr
&
kernel_node
,
const
std
::
shared_ptr
<
const
OpInfo
>
&
op_info_ptr
,
const
std
::
shared_ptr
<
OpInfo
>
op_info_new_ptr
)
{
const
std
::
shared_ptr
<
OpInfo
>
&
op_info_new_ptr
)
{
std
::
vector
<
std
::
shared_ptr
<
OpIOInfo
>>
inputs_static
=
op_info_ptr
->
inputs_ptr
();
std
::
vector
<
std
::
shared_ptr
<
OpIOInfo
>>
outputs_static
=
op_info_ptr
->
outputs_ptr
();
std
::
vector
<
std
::
shared_ptr
<
OpIOInfo
>>
inputs_dyn
;
...
...
@@ -523,7 +523,7 @@ bool ParseMetadata(const CNodePtr &kernel_node, const std::shared_ptr<const OpIn
return
false
;
}
if
(
outputs
.
size
()
>
0
)
{
if
(
!
outputs
.
empty
()
)
{
if
(
!
SetKernelBuilderOutputInfo
(
outputs
,
j
,
real_output_num
,
builder
))
{
MS_LOG
(
ERROR
)
<<
"Parse kernel metadata, set outputs kernel builder info failed."
;
return
false
;
...
...
@@ -532,7 +532,7 @@ bool ParseMetadata(const CNodePtr &kernel_node, const std::shared_ptr<const OpIn
kernel_info_list
->
push_back
(
builder
->
Build
());
}
}
else
if
(
outputs
.
size
()
>
0
)
{
}
else
if
(
!
outputs
.
empty
()
)
{
MS_EXCEPTION_IF_NULL
(
outputs
[
0
]);
size_t
kernel_info_cnt
=
outputs
[
0
]
->
dtypes
().
size
();
for
(
size_t
j
=
0
;
j
<
kernel_info_cnt
;
j
++
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录