From 0b8a377d9cbd02c8c0d3824ad9b37d9a52ba8822 Mon Sep 17 00:00:00 2001 From: phlrain Date: Sat, 1 Dec 2018 18:22:05 +0800 Subject: [PATCH] fix cpu test; test=develop --- python/paddle/fluid/tests/unittests/test_lstm_cudnn_op.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/python/paddle/fluid/tests/unittests/test_lstm_cudnn_op.py b/python/paddle/fluid/tests/unittests/test_lstm_cudnn_op.py index 8d313970c..e3de9f992 100644 --- a/python/paddle/fluid/tests/unittests/test_lstm_cudnn_op.py +++ b/python/paddle/fluid/tests/unittests/test_lstm_cudnn_op.py @@ -171,9 +171,14 @@ class TestCUDNNLstmOp(OpTest): } def test_output_with_place(self): + if not self.testcuda(): + pass place = core.CUDAPlace(0) self.check_output_with_place(place, atol=1e-5) + def testcuda(self): + return core.is_compiled_with_cuda() + if __name__ == '__main__': unittest.main() -- GitLab