From 97e250d4f1898000cbc44a2620cd36f6e52abd2f Mon Sep 17 00:00:00 2001 From: zhaojichen Date: Fri, 17 Apr 2020 21:51:45 -0400 Subject: [PATCH] add global batch normalization --- tests/ut/python/hccl_test/manage/api.py | 13 ------------- tests/ut/python/nn/test_batchnorm.py | 3 --- 2 files changed, 16 deletions(-) diff --git a/tests/ut/python/hccl_test/manage/api.py b/tests/ut/python/hccl_test/manage/api.py index 04ce7da6d..8dac167a3 100644 --- a/tests/ut/python/hccl_test/manage/api.py +++ b/tests/ut/python/hccl_test/manage/api.py @@ -21,7 +21,6 @@ class Hccl(): _instance = None _rank_id = 0 _rank_size = 1 - _group_size = 4 def __init__(self): pass @@ -48,10 +47,6 @@ class Hccl(): def rank_size(self): return self._rank_size - @property - def group_size(self): - return self._group_size - @rank_size.setter def rank_size(self, size): self._rank_size = size @@ -70,14 +65,6 @@ def get_rank_size(group=None): return int(group.split("-")[0]) raise ValueError -def get_group_size(group=None): - hccl = Hccl() - if group is None: - return hccl.group_size - if isinstance(group, str): - return int(group.split("-")[0]) - raise ValueError - # pylint: disable=unused-argument def get_world_rank_from_group_rank(group, group_rank_id): return group_rank_id diff --git a/tests/ut/python/nn/test_batchnorm.py b/tests/ut/python/nn/test_batchnorm.py index 10b4cb00a..e73b7ebbf 100644 --- a/tests/ut/python/nn/test_batchnorm.py +++ b/tests/ut/python/nn/test_batchnorm.py @@ -19,9 +19,6 @@ import pytest import mindspore.nn as nn from mindspore.common.api import _executor from mindspore import Tensor, Parameter -from mindspore.communication.management import init -from mindspore import context -from mindspore import ParallelMode def test_bn_pars_valid1(): -- GitLab