未验证 提交 64df2a55 编写于 作者: L liym27 提交者: GitHub

Fix op test (#32231)

上级 ce26f882
...@@ -1419,7 +1419,8 @@ class OpTest(unittest.TestCase): ...@@ -1419,7 +1419,8 @@ class OpTest(unittest.TestCase):
# FIXME: Replace numeric_place with place to calculate numeric_grads. # FIXME: Replace numeric_place with place to calculate numeric_grads.
# NOTE(liym27): There is an unknown error when call op.run() on NPUPlace, which # NOTE(liym27): There is an unknown error when call op.run() on NPUPlace, which
# needs to be fixed. # needs to be fixed.
if self.__class__.use_npu == True: if hasattr(self.__class__,
"use_npu") and self.__class__.use_npu == True:
numeric_place = paddle.CPUPlace() numeric_place = paddle.CPUPlace()
else: else:
numeric_place = place numeric_place = place
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册