!6824 [AutoParallel]Add check for allreduce fusion

Merge pull request !6824 from lichen/add_limit_for_allreduce_fusion
This commit is contained in:
mindspore-ci-bot 2020-09-24 16:11:01 +08:00 committed by Gitee
commit 794f07bdc5
1 changed files with 3 additions and 0 deletions

View File

@ -274,6 +274,9 @@ class _AutoParallelContext:
TypeError: If group is not a python str. TypeError: If group is not a python str.
""" """
self.check_context_handle() self.check_context_handle()
if not indices:
raise ValueError('indices can not be empty')
if isinstance(indices, (list)): if isinstance(indices, (list)):
for index in indices: for index in indices:
if not isinstance(index, int): if not isinstance(index, int):