forked from mindspore-Ecosystem/mindspore
fix func graph is null
Signed-off-by: zhoufeng <zhoufeng54@huawei.com>
This commit is contained in:
parent
e8e35966a5
commit
468fcaef0d
|
@ -35,6 +35,13 @@ void CommOpAttrs(const FuncGraphPtr &graph) {
|
|||
std::vector<AnfNodePtr> all_nodes = TopoSort(return_node);
|
||||
for (auto &node : all_nodes) {
|
||||
MS_EXCEPTION_IF_NULL(node);
|
||||
if (!node->isa<CNode>()) {
|
||||
continue;
|
||||
}
|
||||
auto primitive = GetCNodePrimitive(node);
|
||||
if (primitive == nullptr) {
|
||||
continue;
|
||||
}
|
||||
if (!common::AnfAlgo::IsCommunicationOp(node)) {
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue