diff --git a/python/paddle/v2/framework/tests/test_nccl_init_op.py b/python/paddle/v2/framework/tests/test_nccl_init_op.py index 9fd4b3e07c3f58f6ac2c396ba913f276a953f5a7..b56a857a98c8f753532f8d9bdf29ae8f89ef6373 100644 --- a/python/paddle/v2/framework/tests/test_nccl_init_op.py +++ b/python/paddle/v2/framework/tests/test_nccl_init_op.py @@ -9,6 +9,10 @@ if not core.is_compile_gpu(): exit(0) gpu_count = core.get_cuda_device_count() + +if gpu_count <= 1: + exit(1) + g_scope = core.Scope() g_ctx = core.DeviceContext.create(core.CPUPlace())