未验证 提交 5bcf35cd 编写于 作者: W Weilong Wu 提交者: GitHub

rm test_eager_guard (#48623)

上级 61486bf2
...@@ -18,14 +18,13 @@ import numpy as np ...@@ -18,14 +18,13 @@ import numpy as np
import paddle import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
from paddle.fluid.framework import _test_eager_guard
class TensorToListTest(unittest.TestCase): class TensorToListTest(unittest.TestCase):
def setUp(self): def setUp(self):
self.shape = [11, 25, 32, 43] self.shape = [11, 25, 32, 43]
def func_tensor_tolist(self): def test_tensor_tolist(self):
places = [fluid.CPUPlace()] places = [fluid.CPUPlace()]
if fluid.core.is_compiled_with_cuda(): if fluid.core.is_compiled_with_cuda():
places.append(fluid.CUDAPlace(0)) places.append(fluid.CUDAPlace(0))
...@@ -42,11 +41,6 @@ class TensorToListTest(unittest.TestCase): ...@@ -42,11 +41,6 @@ class TensorToListTest(unittest.TestCase):
self.assertEqual(tensorlist, expectlist) self.assertEqual(tensorlist, expectlist)
def test_tensor_tolist(self):
with _test_eager_guard():
self.func_tensor_tolist()
self.func_tensor_tolist()
if __name__ == '__main__': if __name__ == '__main__':
unittest.main() unittest.main()
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册