diff --git a/python/paddle/fluid/tests/unittests/test_fill_constant_op.py b/python/paddle/fluid/tests/unittests/test_fill_constant_op.py index 537cabd5d09b7d72c55a9d305839780ab58544f3..fd59c5bb7cff5dd33fae284ba3efe04e667ed75a 100644 --- a/python/paddle/fluid/tests/unittests/test_fill_constant_op.py +++ b/python/paddle/fluid/tests/unittests/test_fill_constant_op.py @@ -69,7 +69,9 @@ class TestFillConstantOpWithSelectedRows(OpTest): def test_fill_constant_with_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: self.check_with_place(place)