From 86523aff25a75f315e7601da7346dbe248ce12a6 Mon Sep 17 00:00:00 2001 From: Qiao Longfei Date: Thu, 25 Oct 2018 12:27:15 +0800 Subject: [PATCH] test_sum_op add GPU test --- python/paddle/fluid/tests/unittests/test_sum_op.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/paddle/fluid/tests/unittests/test_sum_op.py b/python/paddle/fluid/tests/unittests/test_sum_op.py index 1125dbd39..9bf173ddc 100644 --- a/python/paddle/fluid/tests/unittests/test_sum_op.py +++ b/python/paddle/fluid/tests/unittests/test_sum_op.py @@ -124,7 +124,8 @@ class TestSelectedRowsSumOp(OpTest): def test_w_is_selected_rows(self): places = [core.CPUPlace()] - # currently only support CPU + if core.is_compiled_with_cuda(): + places.append(core.CUDAPlace(0)) for place in places: for inplace in [True, False]: self.check_with_place(place, inplace) -- GitLab