From 51abb6c323aca14722fa79b24dfafc6b23494509 Mon Sep 17 00:00:00 2001 From: Dong Zhihong Date: Thu, 12 Oct 2017 14:55:14 -0700 Subject: [PATCH] add test --- .../paddle/v2/framework/tests/test_nccl_ops.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 python/paddle/v2/framework/tests/test_nccl_ops.py diff --git a/python/paddle/v2/framework/tests/test_nccl_ops.py b/python/paddle/v2/framework/tests/test_nccl_ops.py new file mode 100644 index 00000000000..128a9ab21a3 --- /dev/null +++ b/python/paddle/v2/framework/tests/test_nccl_ops.py @@ -0,0 +1,17 @@ +import unittest, os +import numpy as np +import paddle.v2 as paddle +from paddle.v2.framework.op import Operator +import paddle.v2.framework.core as core +from op_test import OpTest, create_op + +gpu_list = os.environ["NV_LIST"] + +if not core.is_compile_gpu() or not gpu_list: + exit(0) + + +class TestNCCLAllReduce(unittest.TestCase): + def __init__(self): + self.op_type = "nnclAllReduce" + self.scope = core.Scope() -- GitLab