Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
magicwindyyd
mindspore
提交
4a0b2b4a
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看板
提交
4a0b2b4a
编写于
4月 21, 2020
作者:
M
mindspore-ci-bot
提交者:
Gitee
4月 21, 2020
浏览文件
操作
浏览文件
下载
差异文件
!518 Fix aicpu set attr bug
Merge pull request !518 from zjun/fix_aicpu_attr_bug
上级
8dd54f9b
897ec89d
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
5 addition
and
6 deletion
+5
-6
mindspore/ccsrc/kernel/aicpu/aicpu_kernel_build.cc
mindspore/ccsrc/kernel/aicpu/aicpu_kernel_build.cc
+5
-6
未找到文件。
mindspore/ccsrc/kernel/aicpu/aicpu_kernel_build.cc
浏览文件 @
4a0b2b4a
...
@@ -162,18 +162,17 @@ void SetNodeAttr(const std::shared_ptr<AnfNode> &anf_node, mindspore::NodeDef *p
...
@@ -162,18 +162,17 @@ void SetNodeAttr(const std::shared_ptr<AnfNode> &anf_node, mindspore::NodeDef *p
::
google
::
protobuf
::
Map
<::
std
::
string
,
::
mindspore
::
AttrValue
>
*
node_attr
=
proto
->
mutable_attrs
();
::
google
::
protobuf
::
Map
<::
std
::
string
,
::
mindspore
::
AttrValue
>
*
node_attr
=
proto
->
mutable_attrs
();
for
(
const
auto
&
attr_ptr
:
attrs_ptr
)
{
for
(
const
auto
&
attr_ptr
:
attrs_ptr
)
{
std
::
string
attr_name
=
attr_ptr
->
name
();
std
::
string
attr_name
=
attr_ptr
->
name
();
std
::
string
real_name
;
auto
value
=
primitive
->
GetAttr
(
attr_name
);
auto
value
=
primitive
->
GetAttr
(
attr_name
);
if
(
value
!=
nullptr
)
{
if
(
value
!=
nullptr
)
{
if
(
attr_name
==
kQueueName
||
attr_name
==
kSharedName
)
{
if
(
attr_name
==
kQueueName
||
attr_name
==
kSharedName
)
{
real
_name
=
kChannelName
;
attr
_name
=
kChannelName
;
}
else
if
(
attr_name
==
kSeed
)
{
}
else
if
(
attr_name
==
kSeed
)
{
real
_name
=
"seed"
;
attr
_name
=
"seed"
;
}
else
if
(
attr_name
==
kSeed2
)
{
}
else
if
(
attr_name
==
kSeed2
)
{
real
_name
=
"seed2"
;
attr
_name
=
"seed2"
;
}
}
std
::
string
type
=
attr_ptr
->
type
();
std
::
string
type
=
attr_ptr
->
type
();
ParseAttrValue
(
type
,
real
_name
,
value
,
node_attr
);
ParseAttrValue
(
type
,
attr
_name
,
value
,
node_attr
);
}
}
}
}
MS_LOG
(
INFO
)
<<
"Set node attr end!"
;
MS_LOG
(
INFO
)
<<
"Set node attr end!"
;
...
@@ -182,7 +181,7 @@ void SetNodeAttr(const std::shared_ptr<AnfNode> &anf_node, mindspore::NodeDef *p
...
@@ -182,7 +181,7 @@ void SetNodeAttr(const std::shared_ptr<AnfNode> &anf_node, mindspore::NodeDef *p
void
SetNodeInputs
(
const
std
::
shared_ptr
<
AnfNode
>
&
anf_node
,
mindspore
::
NodeDef
*
proto
)
{
void
SetNodeInputs
(
const
std
::
shared_ptr
<
AnfNode
>
&
anf_node
,
mindspore
::
NodeDef
*
proto
)
{
size_t
input_num
=
AnfAlgo
::
GetInputTensorNum
(
anf_node
);
size_t
input_num
=
AnfAlgo
::
GetInputTensorNum
(
anf_node
);
if
(
input_num
==
0
)
{
if
(
input_num
==
0
)
{
MS_LOG
(
INFO
)
<<
"Node ["
<<
AnfAlgo
::
GetCNodeName
(
anf_node
)
<<
"] does not have input.
"
;
MS_LOG
(
INFO
)
<<
"Node ["
<<
AnfAlgo
::
GetCNodeName
(
anf_node
)
<<
"] does not have input."
;
return
;
return
;
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录