From f385c34107ee570cdba1925ec0111fb938cd5c79 Mon Sep 17 00:00:00 2001 From: WangXi Date: Tue, 7 Jan 2020 10:47:58 +0800 Subject: [PATCH] fix fleet collective api run on cpu, test=develop (#22064) --- .../paddle/fluid/tests/unittests/test_dist_mnist_fleetapi.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/python/paddle/fluid/tests/unittests/test_dist_mnist_fleetapi.py b/python/paddle/fluid/tests/unittests/test_dist_mnist_fleetapi.py index bc86cba80b..d5ebe09adc 100644 --- a/python/paddle/fluid/tests/unittests/test_dist_mnist_fleetapi.py +++ b/python/paddle/fluid/tests/unittests/test_dist_mnist_fleetapi.py @@ -38,6 +38,10 @@ class FleetCollectiveTest(unittest.TestCase): import paddle.fluid.incubate.fleet.base.role_maker as role_maker from paddle.fluid.incubate.fleet.collective import fleet, DistributedStrategy + if not fluid.core.is_compiled_with_cuda(): + # Operator "gen_nccl_id" has not been registered + return + data = fluid.layers.data(name='X', shape=[1], dtype='float32') hidden = fluid.layers.fc(input=data, size=10) loss = fluid.layers.mean(hidden) -- GitLab