!11077 only split dynamic shape node for ascend

From: @kisnwang
Reviewed-by: @zhoufeng54,@chujinjin
Signed-off-by: @chujinjin
This commit is contained in:
mindspore-ci-bot 2021-01-08 15:06:25 +08:00 committed by Gitee
commit 5194913bc9
1 changed files with 5 additions and 0 deletions

View File

@ -659,6 +659,11 @@ void NodesToSegments(const std::vector<AnfNodePtr> &segment_nodes, std::vector<G
if (segment_nodes.size() == 0) {
return;
}
auto segment_target = GetCNodeTarget(segment_nodes[0]);
if (segment_target != kAscendDevice) {
AddSegment(segment_nodes, segments, node_to_segment);
return;
}
MS_EXCEPTION_IF_NULL(segments);
MS_EXCEPTION_IF_NULL(node_to_segment);
std::set<AnfNodePtr> dynamic_nodes_set;