Skip to content

Commit 022022a

Browse files
committed
Update
[ghstack-poisoned]
1 parent 2b48db9 commit 022022a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

exir/backend/canonical_partitioners/config_partitioner.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,9 +193,10 @@ def union(x, y):
193193
continue
194194

195195
partition = node_config.get_partition(node, ep)
196-
parent[partition[0]] = partition[0]
197-
for i in range(1, len(partition)):
198-
union(partition[0], partition[i])
196+
if len(partition) > 0:
197+
parent[partition[0]] = partition[0]
198+
for i in range(1, len(partition)):
199+
union(partition[0], partition[i])
199200

200201
groups = {}
201202
for node in parent.keys():

0 commit comments

Comments
 (0)