未验证 提交 713d5a4b 编写于 作者: H Huihuang Zheng 提交者: GitHub

Hotfix Release 2.3 Bug for CUDA 11.2 (#42438)

* Fix Release 2.3 Bug

* Fix format
上级 655c4981
......@@ -235,12 +235,13 @@ class TestCondInputOutput(unittest.TestCase):
place = fluid.CUDAPlace(0) if core.is_compiled_with_cuda(
) else fluid.CPUPlace()
exe = fluid.Executor(place)
ret = exe.run(main_program, fetch_list=[out, a.grad_name, b.grad_name])
ret = exe.run(main_program,
fetch_list=[out, b, a.grad_name, b.grad_name])
# Note: fill_constant has loss of precision, you have to assertEqual
# with values doens't lose precision in float-point number.
self.assertEqual(ret[0][0], 1.25)
self.assertEqual(ret[1][0], 0.0)
self.assertEqual(ret[2][0], 1.0)
self.assertEqual(ret[0][0], ret[1][0])
self.assertEqual(ret[2][0], 0.0)
self.assertEqual(ret[3][0], 1.0)
class TestCondNestedControlFlow(unittest.TestCase):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册