From 160dfd01f5d2246b4dc524963bc5b2ebaebb9377 Mon Sep 17 00:00:00 2001 From: Zhang Zheng <32410583+ZzSean@users.noreply.github.com> Date: Thu, 6 Apr 2023 14:00:40 +0800 Subject: [PATCH] Modify the condition of _get_places in fp16 (#52508) --- python/paddle/fluid/tests/unittests/eager_op_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/paddle/fluid/tests/unittests/eager_op_test.py b/python/paddle/fluid/tests/unittests/eager_op_test.py index 362ade41725..ae75ac02f94 100644 --- a/python/paddle/fluid/tests/unittests/eager_op_test.py +++ b/python/paddle/fluid/tests/unittests/eager_op_test.py @@ -2020,7 +2020,7 @@ class OpTest(unittest.TestCase): ) def _get_places(self): - if self.dtype == np.float16: + if self.dtype == np.float16 or self.dtype == "float16": if core.is_compiled_with_cuda() and core.op_support_gpu( self.op_type ): -- GitLab