From 45a031fec395fede4693165115b0fe32cd184ba7 Mon Sep 17 00:00:00 2001 From: Megvii Engine Team Date: Tue, 30 Mar 2021 16:22:36 +0800 Subject: [PATCH] test(dist): remove redundant assert for reduce_sum and gather GitOrigin-RevId: bc7393bb63e03e31b21cd79cfa4bf90107a227b0 --- imperative/python/test/unit/functional/test_functional_distributed.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/imperative/python/test/unit/functional/test_functional_distributed.py b/imperative/python/test/unit/functional/test_functional_distributed.py index a48d9b67..dff4a0e4 100644 --- a/imperative/python/test/unit/functional/test_functional_distributed.py +++ b/imperative/python/test/unit/functional/test_functional_distributed.py @@ -44,8 +44,6 @@ def test_reduce_sum(shape): output = reduce_sum(inp) if rank == 0: assert np.allclose(output.numpy(), expect[rank]) - else: - assert np.allclose(output.numpy(), 0) x = np.random.random_sample(shape).astype("float32") y = np.random.random_sample(shape).astype("float32") @@ -179,8 +177,6 @@ def test_gather(shape): output = gather(inp) if rank == 0: assert np.allclose(output.numpy(), expect[rank]) - else: - assert np.allclose(output.numpy(), 0) x = np.random.random_sample(shape).astype("float32") y = np.random.random_sample(shape).astype("float32")