!17592 Acyclic checking bugfix of split model

From: @gaoxiong1
Reviewed-by: @ckey_dou,@anyrenwei
Signed-off-by: @anyrenwei
This commit is contained in:
mindspore-ci-bot 2021-06-03 16:34:36 +08:00 committed by Gitee
commit 5f6ec2569c
1 changed files with 6 additions and 2 deletions

View File

@ -44,9 +44,13 @@ class GraphSplitByPattern:
"""fuse y to x"""
for i in self.alive:
if self.map[y][i] and not self.map[x][i]:
self.map[x][i] = True
for pre in self.alive:
if self.map[pre][x] and not self.map[pre][i]:
self.map[pre][i] = True
if self.map[i][y] and not self.map[i][x]:
self.map[i][x] = True
for suc in self.alive:
if self.map[x][suc] and not self.map[i][suc]:
self.map[i][suc] = True
self.alive.remove(y)
class Area: