From e6cef98e952d01b6a2e20ab151652e7be12f7d0c Mon Sep 17 00:00:00 2001 From: yangzhenzhang <285824651@qq.com> Date: Tue, 21 Jul 2020 20:31:54 +0800 Subject: [PATCH] delete useless code for allreduce --- mindspore/ops/operations/comm_ops.py | 5 ----- tests/ut/cpp/parallel/step_parallel_test.cc | 3 --- 2 files changed, 8 deletions(-) diff --git a/mindspore/ops/operations/comm_ops.py b/mindspore/ops/operations/comm_ops.py index f8b47a28c3..2b84741fea 100644 --- a/mindspore/ops/operations/comm_ops.py +++ b/mindspore/ops/operations/comm_ops.py @@ -100,11 +100,6 @@ class AllReduce(PrimitiveWithInfer): self.add_prim_attr('fusion', 0) self.add_prim_attr('index', 0) - def vm_impl(self, x): - """Implement by vm mode.""" - x = x.asnumpy() - return Tensor(x) - def infer_shape(self, x_shape): return x_shape diff --git a/tests/ut/cpp/parallel/step_parallel_test.cc b/tests/ut/cpp/parallel/step_parallel_test.cc index dbb541932e..3c54f80eda 100644 --- a/tests/ut/cpp/parallel/step_parallel_test.cc +++ b/tests/ut/cpp/parallel/step_parallel_test.cc @@ -294,9 +294,6 @@ TEST_F(TestStepParallel, CreatOpInstance) { ASSERT_TRUE(allreduce_ptr); if (nullptr != allreduce_ptr) { MS_LOG(INFO) << "Get PrimitivePyPtr: " << allreduce_ptr->name(); - if (!allreduce_ptr->HasComputeFunction()) { - MS_LOG(EXCEPTION) << "" << allreduce_ptr->name() << "'s compute function is not implemented"; - } std::vector arglist; (void)std::transform(attrs.begin(), attrs.end(), std::back_inserter(arglist),