Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
magicwindyyd
mindspore
提交
932e0ccf
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看板
提交
932e0ccf
编写于
5月 26, 2020
作者:
M
mindspore-ci-bot
提交者:
Gitee
5月 26, 2020
浏览文件
操作
浏览文件
下载
差异文件
!1476 fix Addn GetInputReshapeType failed
Merge pull request !1476 from wenchunjiang/fix_reshape_type_bug
上级
5aae0d91
77e7cf7a
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
14 addition
and
10 deletion
+14
-10
mindspore/ccsrc/kernel/tbe/tbe_kernel_select.cc
mindspore/ccsrc/kernel/tbe/tbe_kernel_select.cc
+14
-10
未找到文件。
mindspore/ccsrc/kernel/tbe/tbe_kernel_select.cc
浏览文件 @
932e0ccf
...
...
@@ -383,6 +383,11 @@ bool SetKernelBuilderInputInfo(const std::vector<std::shared_ptr<OpIOInfo>> &inp
return
false
;
}
std
::
vector
<
Axis
>
reshape_type
;
if
(
!
StringToAxisVector
(
input
->
reshape_type
(),
&
reshape_type
))
{
return
false
;
}
if
(
param_type
==
"dynamic"
)
{
if
(
dyn_input_sizes
.
empty
())
{
MS_LOG
(
ERROR
)
<<
"Set input kernel builder info, dyn_input_sizes's size is 0 when param_type is dynamic"
;
...
...
@@ -394,6 +399,7 @@ bool SetKernelBuilderInputInfo(const std::vector<std::shared_ptr<OpIOInfo>> &inp
auto
type_id
=
tbe
::
DtypeToTypeId
(
dtypes
[
builder_idex
]);
inputs_device_type
.
push_back
(
type_id
);
inputs_format
.
push_back
(
formats
[
builder_idex
]);
reshape_types
.
push_back
(
reshape_type
);
}
dyn_input_idx
++
;
}
else
if
(
param_type
==
"required"
)
{
...
...
@@ -401,6 +407,7 @@ bool SetKernelBuilderInputInfo(const std::vector<std::shared_ptr<OpIOInfo>> &inp
auto
type_id
=
tbe
::
DtypeToTypeId
(
dtypes
[
builder_idex
]);
inputs_device_type
.
push_back
(
type_id
);
inputs_format
.
push_back
(
formats
[
builder_idex
]);
reshape_types
.
push_back
(
reshape_type
);
}
else
{
if
(
kernel_info_index
<
real_input_num
)
{
MS_LOG
(
INFO
)
<<
"Set input kernel builder info, input type is optional, input index is "
<<
kernel_info_index
;
...
...
@@ -408,13 +415,9 @@ bool SetKernelBuilderInputInfo(const std::vector<std::shared_ptr<OpIOInfo>> &inp
auto
type_id
=
tbe
::
DtypeToTypeId
(
dtypes
[
builder_idex
]);
inputs_device_type
.
push_back
(
type_id
);
inputs_format
.
push_back
(
formats
[
builder_idex
]);
reshape_types
.
push_back
(
reshape_type
);
}
}
std
::
vector
<
Axis
>
reshape_type
;
if
(
!
StringToAxisVector
(
input
->
reshape_type
(),
&
reshape_type
))
{
return
false
;
}
reshape_types
.
push_back
(
reshape_type
);
}
builder
->
SetInputReshapeType
(
reshape_types
);
...
...
@@ -442,6 +445,11 @@ bool SetKernelBuilderOutputInfo(const std::vector<std::shared_ptr<OpIOInfo>> &ou
MS_LOG
(
WARNING
)
<<
"real_output_num: "
<<
real_output_num
<<
", output_idx: "
<<
output_idx
<<
"is out of limit!"
;
continue
;
}
std
::
vector
<
Axis
>
reshape_type
;
if
(
!
StringToAxisVector
(
output
->
reshape_type
(),
&
reshape_type
))
{
return
false
;
}
size_t
output_num
=
0
;
if
(
output
->
param_type
()
==
"dynamic"
)
{
if
(
outputs
.
size
()
>
1
)
{
...
...
@@ -467,13 +475,9 @@ bool SetKernelBuilderOutputInfo(const std::vector<std::shared_ptr<OpIOInfo>> &ou
auto
type_id
=
tbe
::
DtypeToTypeId
(
dtypes
[
builder_idex
]);
outputs_device_type
.
push_back
(
type_id
);
outputs_format
.
push_back
(
formats
[
builder_idex
]);
reshape_types
.
push_back
(
reshape_type
);
output_idx
++
;
}
std
::
vector
<
Axis
>
reshape_type
;
if
(
!
StringToAxisVector
(
output
->
reshape_type
(),
&
reshape_type
))
{
return
false
;
}
reshape_types
.
push_back
(
reshape_type
);
}
builder
->
SetOutputReshapeType
(
reshape_types
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录