Browse Source

!6824 [AutoParallel]Add check for allreduce fusion

Merge pull request !6824 from lichen/add_limit_for_allreduce_fusion
tags/v1.1.0
mindspore-ci-bot Gitee 5 years ago
parent
commit
794f07bdc5
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      mindspore/parallel/_auto_parallel_context.py

+ 3
- 0
mindspore/parallel/_auto_parallel_context.py 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):


Loading…
Cancel
Save