diff --git a/paddle/scripts/paddle_build.sh b/paddle/scripts/paddle_build.sh index 551c46ee804267bf8c936b61fe4aad36c9ed2c3e..f00ebeda413c3eb17c822be7a0037d64fa4c2cb6 100644 --- a/paddle/scripts/paddle_build.sh +++ b/paddle/scripts/paddle_build.sh @@ -769,7 +769,7 @@ function run_linux_cpu_test() { if [ -d "${PADDLE_ROOT}/dist/" ]; then pip install ${PADDLE_ROOT}/dist/*whl fi - cp ${PADDLE_ROOT}/build/python/paddle/fluid/tests/unittests/op_test.py ${PADDLE_ROOT}/build/python + cp ${PADDLE_ROOT}/build/python/paddle/fluid/tests/unittests/eager_op_test.py ${PADDLE_ROOT}/build/python cp ${PADDLE_ROOT}/build/python/paddle/fluid/tests/unittests/testsuite.py ${PADDLE_ROOT}/build/python cp -r ${PADDLE_ROOT}/build/python/paddle/fluid/tests/unittests/white_list ${PADDLE_ROOT}/build/python ut_total_startTime_s=`date +%s` diff --git a/python/paddle/fluid/tests/unittests/distribution/test_dirichlet_op.py b/python/paddle/fluid/tests/unittests/distribution/test_dirichlet_op.py index 1dd00be44fe1f1d494bae1c257771fbac580cfbd..c14768fd42d6b1d1279495642b03275e55344607 100644 --- a/python/paddle/fluid/tests/unittests/distribution/test_dirichlet_op.py +++ b/python/paddle/fluid/tests/unittests/distribution/test_dirichlet_op.py @@ -20,7 +20,7 @@ import scipy.stats import paddle sys.path.append("../") -from op_test import OpTest +from eager_op_test import OpTest paddle.enable_static() diff --git a/python/paddle/fluid/tests/unittests/fft/test_spectral_op.py b/python/paddle/fluid/tests/unittests/fft/test_spectral_op.py index c9a74431f0367253a3475d15e7a0333a380ee6ea..6b8ab6cc2ff0452318c241dec3b4ac7177fcdd6a 100644 --- a/python/paddle/fluid/tests/unittests/fft/test_spectral_op.py +++ b/python/paddle/fluid/tests/unittests/fft/test_spectral_op.py @@ -29,7 +29,7 @@ import paddle from paddle import _C_ops sys.path.append("../") -from op_test import OpTest +from eager_op_test import OpTest paddle.enable_static() diff --git a/python/paddle/fluid/tests/unittests/ir/test_ir_subgraph_python_interface.py b/python/paddle/fluid/tests/unittests/ir/test_ir_subgraph_python_interface.py index eab649dff959b66d02fe2a899c21fc548e56ae27..01e2e32e08debc8f0c35839ab02014dd12594ada 100644 --- a/python/paddle/fluid/tests/unittests/ir/test_ir_subgraph_python_interface.py +++ b/python/paddle/fluid/tests/unittests/ir/test_ir_subgraph_python_interface.py @@ -18,7 +18,7 @@ import paddle from paddle import fluid from paddle.fluid import core from paddle.fluid.framework import IrGraph, Program, program_guard -from paddle.fluid.tests.unittests.op_test import OpTestTool +from paddle.fluid.tests.unittests.eager_op_test import OpTestTool from paddle.static.quantization import QuantizationTransformPass paddle.enable_static() diff --git a/python/paddle/fluid/tests/unittests/sequence/test_sequence_concat.py b/python/paddle/fluid/tests/unittests/sequence/test_sequence_concat.py index 5d281d1cd9fc24aebf81fa9140dd361dbc8f10de..1227fb0ba4b61a895c50042f4d9ed7925f906a6b 100644 --- a/python/paddle/fluid/tests/unittests/sequence/test_sequence_concat.py +++ b/python/paddle/fluid/tests/unittests/sequence/test_sequence_concat.py @@ -18,7 +18,7 @@ import unittest import numpy as np sys.path.append("../") -from op_test import OpTest +from eager_op_test import OpTest import paddle diff --git a/python/paddle/fluid/tests/unittests/sequence/test_sequence_enumerate_op.py b/python/paddle/fluid/tests/unittests/sequence/test_sequence_enumerate_op.py index 1a0607041dba9bc914941986704a434b9cf30059..068eacb6e0fe1e281620b50818445c2ea240ea67 100644 --- a/python/paddle/fluid/tests/unittests/sequence/test_sequence_enumerate_op.py +++ b/python/paddle/fluid/tests/unittests/sequence/test_sequence_enumerate_op.py @@ -18,7 +18,7 @@ import unittest import numpy as np sys.path.append("../") -from op_test import OpTest +from eager_op_test import OpTest def sequence_enumerate(input_seq, in_lod, win_size, pad_value): diff --git a/python/paddle/fluid/tests/unittests/sequence/test_sequence_erase_op.py b/python/paddle/fluid/tests/unittests/sequence/test_sequence_erase_op.py index ed0c7eeb966d3a7be2cd0f38ab90ef2d1f598ef0..9aaecd1e0799c14ad99d5f52bdb6fbf13478d5b7 100644 --- a/python/paddle/fluid/tests/unittests/sequence/test_sequence_erase_op.py +++ b/python/paddle/fluid/tests/unittests/sequence/test_sequence_erase_op.py @@ -18,7 +18,7 @@ import unittest import numpy as np sys.path.append("../") -from op_test import OpTest +from eager_op_test import OpTest def sequence_erase(in_seq, lod0, tokens): diff --git a/python/paddle/fluid/tests/unittests/sequence/test_sequence_expand.py b/python/paddle/fluid/tests/unittests/sequence/test_sequence_expand.py index 259b3b321af854cb3d5dcc8526140e013ad915d1..83291c78130d68d634d4e5f2f7638c8bc7c84b0c 100644 --- a/python/paddle/fluid/tests/unittests/sequence/test_sequence_expand.py +++ b/python/paddle/fluid/tests/unittests/sequence/test_sequence_expand.py @@ -18,7 +18,7 @@ import unittest import numpy as np sys.path.append("../") -from op_test import OpTest +from eager_op_test import OpTest class TestSequenceExpand(OpTest): diff --git a/python/paddle/fluid/tests/unittests/sequence/test_sequence_expand_as.py b/python/paddle/fluid/tests/unittests/sequence/test_sequence_expand_as.py index 801a532c5e61d2fbbc5fd4e5e83bcbb7465dd352..36704f61dcd972b98704fb188321fd6b7134c805 100644 --- a/python/paddle/fluid/tests/unittests/sequence/test_sequence_expand_as.py +++ b/python/paddle/fluid/tests/unittests/sequence/test_sequence_expand_as.py @@ -18,7 +18,7 @@ import unittest import numpy as np sys.path.append("../") -from op_test import OpTest +from eager_op_test import OpTest import paddle from paddle.fluid import Program, program_guard diff --git a/python/paddle/fluid/tests/unittests/sequence/test_sequence_mask.py b/python/paddle/fluid/tests/unittests/sequence/test_sequence_mask.py index 60bf6bade9847c53a0f694bfa96224d9b90def18..5e7c79ac0d66fa53a45ef847cb16b2422c783e87 100644 --- a/python/paddle/fluid/tests/unittests/sequence/test_sequence_mask.py +++ b/python/paddle/fluid/tests/unittests/sequence/test_sequence_mask.py @@ -25,7 +25,7 @@ from paddle.fluid.framework import ( ) sys.path.append("../") -from op_test import OpTest +from eager_op_test import OpTest class SequenceMaskTestBase(OpTest): diff --git a/python/paddle/fluid/tests/unittests/sequence/test_sequence_pad_op.py b/python/paddle/fluid/tests/unittests/sequence/test_sequence_pad_op.py index 64048753c3cacc6fc77821aedd656e31059ec9cb..9bdaba6cbe88aebffe23c62dc9df045906556dff 100644 --- a/python/paddle/fluid/tests/unittests/sequence/test_sequence_pad_op.py +++ b/python/paddle/fluid/tests/unittests/sequence/test_sequence_pad_op.py @@ -18,7 +18,7 @@ import unittest import numpy as np sys.path.append("../") -from op_test import OpTest +from eager_op_test import OpTest import paddle from paddle.fluid import core diff --git a/python/paddle/fluid/tests/unittests/sequence/test_sequence_pool.py b/python/paddle/fluid/tests/unittests/sequence/test_sequence_pool.py index 908199c246d6f2c66b835b2eb5c91763b51d7ed3..5bbca01cdde04e7ab7cbfdccb198986d9afa1a66 100644 --- a/python/paddle/fluid/tests/unittests/sequence/test_sequence_pool.py +++ b/python/paddle/fluid/tests/unittests/sequence/test_sequence_pool.py @@ -20,7 +20,7 @@ import numpy as np import paddle sys.path.append("../") -from op_test import OpTest, skip_check_grad_ci +from eager_op_test import OpTest, skip_check_grad_ci paddle.enable_static() diff --git a/python/paddle/fluid/tests/unittests/sequence/test_sequence_reshape.py b/python/paddle/fluid/tests/unittests/sequence/test_sequence_reshape.py index 39ceb767967e773e18c108916d61ddce7457423e..4f6005d83c8f5643947c6f733464c65dd16d3953 100644 --- a/python/paddle/fluid/tests/unittests/sequence/test_sequence_reshape.py +++ b/python/paddle/fluid/tests/unittests/sequence/test_sequence_reshape.py @@ -20,7 +20,7 @@ import numpy as np import paddle sys.path.append("../") -from op_test import OpTest +from eager_op_test import OpTest class TestSequenceReshape(OpTest): diff --git a/python/paddle/fluid/tests/unittests/sequence/test_sequence_reverse.py b/python/paddle/fluid/tests/unittests/sequence/test_sequence_reverse.py index 864826820e1aefd19df0d57af2be3fb11108b649..dfd532ad8d4fe4c7b9529e3ec3e4f149adeef267 100644 --- a/python/paddle/fluid/tests/unittests/sequence/test_sequence_reverse.py +++ b/python/paddle/fluid/tests/unittests/sequence/test_sequence_reverse.py @@ -20,7 +20,7 @@ import numpy as np import paddle sys.path.append("../") -from op_test import OpTest +from eager_op_test import OpTest class TestSequenceReverseBase(OpTest): diff --git a/python/paddle/fluid/tests/unittests/sequence/test_sequence_scatter_op.py b/python/paddle/fluid/tests/unittests/sequence/test_sequence_scatter_op.py index 4a3316131fc36bc8b73c3898e43b3b58ede31ff7..2f04dc81edfc1e16cfe76d44743d081735799b50 100644 --- a/python/paddle/fluid/tests/unittests/sequence/test_sequence_scatter_op.py +++ b/python/paddle/fluid/tests/unittests/sequence/test_sequence_scatter_op.py @@ -18,7 +18,7 @@ import unittest import numpy as np sys.path.append("../") -from op_test import OpTest +from eager_op_test import OpTest class TestSequenceScatterOp(OpTest): diff --git a/python/paddle/fluid/tests/unittests/sequence/test_sequence_slice_op.py b/python/paddle/fluid/tests/unittests/sequence/test_sequence_slice_op.py index 9683611a335f2e005c73d6c60508a90df43fb147..8ddbe8fb969329af6ed457fa9f20feb1cf084bc5 100644 --- a/python/paddle/fluid/tests/unittests/sequence/test_sequence_slice_op.py +++ b/python/paddle/fluid/tests/unittests/sequence/test_sequence_slice_op.py @@ -18,7 +18,7 @@ import unittest import numpy as np sys.path.append("../") -from op_test import OpTest +from eager_op_test import OpTest class TestSequenceSliceOp(OpTest): diff --git a/python/paddle/fluid/tests/unittests/sequence/test_sequence_softmax_op.py b/python/paddle/fluid/tests/unittests/sequence/test_sequence_softmax_op.py index 16d74e781dce0f64f74c053c1c0049d6283823bb..4f088269bdca4101648d81b02a0f3511016aa2f2 100644 --- a/python/paddle/fluid/tests/unittests/sequence/test_sequence_softmax_op.py +++ b/python/paddle/fluid/tests/unittests/sequence/test_sequence_softmax_op.py @@ -20,7 +20,7 @@ import numpy as np from paddle.fluid import core sys.path.append("../") -from op_test import OpTest +from eager_op_test import OpTest from test_softmax_op import stable_softmax diff --git a/python/paddle/fluid/tests/unittests/sequence/test_sequence_topk_avg_pooling.py b/python/paddle/fluid/tests/unittests/sequence/test_sequence_topk_avg_pooling.py index bd5c1b3c3e1611e5929f4a7ddc5909fcab969546..7d0e16a41003c64d209ed68c91bac627e9bc44d3 100644 --- a/python/paddle/fluid/tests/unittests/sequence/test_sequence_topk_avg_pooling.py +++ b/python/paddle/fluid/tests/unittests/sequence/test_sequence_topk_avg_pooling.py @@ -19,7 +19,7 @@ from copy import deepcopy import numpy as np sys.path.append("../") -from op_test import OpTest +from eager_op_test import OpTest class TestSequenceTopkAvgPoolingOp(OpTest): diff --git a/python/paddle/fluid/tests/unittests/sequence/test_sequence_unpad_op.py b/python/paddle/fluid/tests/unittests/sequence/test_sequence_unpad_op.py index daaa4b1ee9b3d0d270d6fc18395ccfbbe2a5c1ce..4f2809635121d16d9d7f71c32480eb1127d1708f 100644 --- a/python/paddle/fluid/tests/unittests/sequence/test_sequence_unpad_op.py +++ b/python/paddle/fluid/tests/unittests/sequence/test_sequence_unpad_op.py @@ -18,7 +18,7 @@ import unittest import numpy as np sys.path.append("../") -from op_test import OpTest +from eager_op_test import OpTest import paddle diff --git a/python/paddle/fluid/tests/unittests/test_label_smooth_op.py b/python/paddle/fluid/tests/unittests/test_label_smooth_op.py index 4b89ad612d528d945b2b2ed5f1ef6cb6e698fc99..5c45b6a9d89e289ef8c2f30a94903e28f3d671a1 100644 --- a/python/paddle/fluid/tests/unittests/test_label_smooth_op.py +++ b/python/paddle/fluid/tests/unittests/test_label_smooth_op.py @@ -15,7 +15,7 @@ import unittest import numpy as np -from op_test import OpTest, convert_float_to_uint16 +from eager_op_test import OpTest, convert_float_to_uint16 import paddle from paddle.fluid import core @@ -77,11 +77,11 @@ class TestLabelSmoothOpBF16(OpTest): def test_check_output(self): place = core.CUDAPlace(0) - self.check_output_with_place(place, check_eager=True) + self.check_output_with_place(place) def test_check_grad(self): place = core.CUDAPlace(0) - self.check_grad_with_place(place, ["X"], "Out", check_eager=True) + self.check_grad_with_place(place, ["X"], "Out") class TestLabelSmoothFP16OP(TestLabelSmoothOp):