From 395d3f0848a64b2a249c0de183e219ab1a90896d Mon Sep 17 00:00:00 2001 From: lichenever Date: Thu, 24 Sep 2020 14:28:15 +0800 Subject: [PATCH] add_limit_for_allreduce_fusion --- mindspore/parallel/_auto_parallel_context.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mindspore/parallel/_auto_parallel_context.py b/mindspore/parallel/_auto_parallel_context.py index 6efa65815b..91e3189d2e 100644 --- a/mindspore/parallel/_auto_parallel_context.py +++ b/mindspore/parallel/_auto_parallel_context.py @@ -274,6 +274,9 @@ class _AutoParallelContext: TypeError: If group is not a python str. """ self.check_context_handle() + if not indices: + raise ValueError('indices can not be empty') + if isinstance(indices, (list)): for index in indices: if not isinstance(index, int):