未验证 提交 fc0e72fe 编写于 作者: 姜永久 提交者: GitHub

rm eager guard tests part3_2 (#49060)

* rm eager guard tests part3_2

* modify
上级 babd26ee
......@@ -18,7 +18,6 @@ import numpy as np
import paddle
import paddle.fluid.core as core
from paddle.fluid.framework import _test_eager_guard
class Optimization_ex1(paddle.nn.Layer):
......@@ -128,12 +127,6 @@ class TestComplexGradAccumulated(unittest.TestCase):
self.train(dev, dtype, 3)
self.train_no_clear_grad(dev, dtype, 3)
def test_eager(self):
with _test_eager_guard():
self.test_case_one_step()
self.test_case_two_step()
self.test_case_non_param()
if __name__ == '__main__':
unittest.main()
......@@ -19,7 +19,6 @@ import numpy as np
import paddle
import paddle.fluid.dygraph as dg
from paddle import fluid
from paddle.fluid.framework import _test_eager_guard
class ComplexKronTestCase(unittest.TestCase):
......@@ -37,7 +36,6 @@ class ComplexKronTestCase(unittest.TestCase):
def runTest(self):
for place in self._places:
self.test_kron_api(place)
self.test_eager(place)
def test_kron_api(self, place):
with dg.guard(place):
......@@ -48,10 +46,6 @@ class ComplexKronTestCase(unittest.TestCase):
out_var.numpy(), self.ref_result, rtol=1e-05
)
def test_eager(self, place):
with _test_eager_guard():
self.test_kron_api(place)
def load_tests(loader, standard_tests, pattern):
suite = unittest.TestSuite()
......
......@@ -19,7 +19,6 @@ import numpy as np
import paddle
import paddle.fluid as fluid
import paddle.fluid.dygraph as dg
from paddle.fluid.framework import _test_eager_guard
class TestComplexMatMulLayer(unittest.TestCase):
......@@ -135,14 +134,6 @@ class TestComplexMatMulLayer(unittest.TestCase):
self.compare_by_basic_api(x, y, np_result)
self.compare_op_by_basic_api(x, y, np_result)
def test_eager(self):
with _test_eager_guard():
self.test_complex_xy_gemm()
self.test_complex_xy_gemv()
self.test_real_x_complex_y()
self.test_complex_x_real_y()
self.test_complex_xy()
if __name__ == '__main__':
unittest.main()
......@@ -20,7 +20,6 @@ from op_test import OpTest
import paddle
from paddle import static
from paddle.fluid import dygraph
from paddle.fluid.framework import _test_eager_guard
paddle.enable_static()
......@@ -162,10 +161,6 @@ class TestComplexAPI(unittest.TestCase):
)
np.testing.assert_allclose(self.out, out_np, rtol=1e-05)
def test_eager(self):
with _test_eager_guard():
self.test_dygraph()
if __name__ == "__main__":
unittest.main()
......@@ -19,7 +19,6 @@ import numpy as np
import paddle
import paddle.fluid as fluid
import paddle.fluid.dygraph as dg
from paddle.fluid.framework import _test_eager_guard
class TestComplexReshape(unittest.TestCase):
......@@ -60,11 +59,6 @@ class TestComplexReshape(unittest.TestCase):
np.reshape(x_np, shape_), y_np, rtol=1e-05
)
def test_eager(self):
with _test_eager_guard():
self.test_shape_norm_dims()
self.test_shape_omit_dims()
if __name__ == "__main__":
unittest.main()
......@@ -18,7 +18,6 @@ import numpy as np
import paddle
import paddle.fluid.core as core
from paddle.fluid.framework import _test_eager_guard
class Optimization_ex1(paddle.nn.Layer):
......@@ -70,10 +69,6 @@ class TestComplexSimpleNet(unittest.TestCase):
for dev in self.devices:
self.train(dev)
def test_eager(self):
with _test_eager_guard():
self.test_train_success()
if __name__ == '__main__':
unittest.main()
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册