diff --git a/python/paddle/fluid/tests/unittests/ngraph/test_accuracy_ngraph_op.py b/python/paddle/fluid/tests/unittests/ngraph/test_accuracy_ngraph_op.py index 5298c3c2f6f0113977342ab3e09830027585ada1..e837e504a4c7a8cd0e950855f685185f529e22f6 100644 --- a/python/paddle/fluid/tests/unittests/ngraph/test_accuracy_ngraph_op.py +++ b/python/paddle/fluid/tests/unittests/ngraph/test_accuracy_ngraph_op.py @@ -14,8 +14,9 @@ from __future__ import print_function -import unittest -from paddle.fluid.tests.unittests.test_accuracy_op import TestAccuracyOp +import unittest, sys +sys.path.append("../") +from test_accuracy_op import TestAccuracyOp if __name__ == '__main__': unittest.main() diff --git a/python/paddle/fluid/tests/unittests/ngraph/test_activation_ngraph_op.py b/python/paddle/fluid/tests/unittests/ngraph/test_activation_ngraph_op.py index a7f167cbd415c9000311aa45bef0432f61e668ea..19e1c8cccbe1cb9a75e68c2c88f8c3d04520063b 100644 --- a/python/paddle/fluid/tests/unittests/ngraph/test_activation_ngraph_op.py +++ b/python/paddle/fluid/tests/unittests/ngraph/test_activation_ngraph_op.py @@ -14,11 +14,11 @@ from __future__ import print_function -import unittest +import unittest, sys +sys.path.append("../") import numpy as np -import paddle.fluid.core as core -from paddle.fluid.tests.unittests.op_test import OpTest -from paddle.fluid.tests.unittests.test_activation_op import TestAbs, TestGelu, TestSigmoid, TestSquare, TestRelu, TestTanh +from op_test import OpTest +from test_activation_op import TestAbs, TestGelu, TestSigmoid, TestSquare, TestRelu, TestTanh class TestNGRAPHReluDim4(TestRelu): diff --git a/python/paddle/fluid/tests/unittests/ngraph/test_adam_ngraph_op.py b/python/paddle/fluid/tests/unittests/ngraph/test_adam_ngraph_op.py index ef2aedf65f4c0cc182738c7a7a538095f8f628d5..cdba579d8d4bcd5fc8ffeb7e8c19062af2cea7fd 100644 --- a/python/paddle/fluid/tests/unittests/ngraph/test_adam_ngraph_op.py +++ b/python/paddle/fluid/tests/unittests/ngraph/test_adam_ngraph_op.py @@ -14,8 +14,9 @@ from __future__ import print_function -import unittest -from paddle.fluid.tests.unittests.test_adam_op import TestAdamOp1, TestAdamOp2, TestAdamOpMultipleSteps, TestSparseAdamOp +import unittest, sys +sys.path.append("../") +from test_adam_op import TestAdamOp1, TestAdamOp2, TestAdamOpMultipleSteps, TestSparseAdamOp if __name__ == "__main__": unittest.main() diff --git a/python/paddle/fluid/tests/unittests/ngraph/test_batch_norm_ngraph_op.py b/python/paddle/fluid/tests/unittests/ngraph/test_batch_norm_ngraph_op.py index d9198114f3c4bf9a5de19b4d0121267bcfe3f0f2..a6b6e90551f3c31b704f6def8c547777c5acaa72 100644 --- a/python/paddle/fluid/tests/unittests/ngraph/test_batch_norm_ngraph_op.py +++ b/python/paddle/fluid/tests/unittests/ngraph/test_batch_norm_ngraph_op.py @@ -14,9 +14,10 @@ from __future__ import print_function -import unittest -from paddle.fluid.tests.unittests.test_batch_norm_op import TestBatchNormOpTraining, TestBatchNormOpInference -from paddle.fluid.tests.unittests.op_test import _set_use_system_allocator +import unittest, sys +sys.path.append("../") +from test_batch_norm_op import TestBatchNormOpTraining, TestBatchNormOpInference +from op_test import _set_use_system_allocator _set_use_system_allocator(True) diff --git a/python/paddle/fluid/tests/unittests/ngraph/test_cast_ngraph_op.py b/python/paddle/fluid/tests/unittests/ngraph/test_cast_ngraph_op.py index 7732637d2299b0e9ea2092e4d244e09cc8a21c0e..8b8a52258b54470b0ecb347e01ae19b0bedbc9e3 100644 --- a/python/paddle/fluid/tests/unittests/ngraph/test_cast_ngraph_op.py +++ b/python/paddle/fluid/tests/unittests/ngraph/test_cast_ngraph_op.py @@ -14,8 +14,9 @@ from __future__ import print_function -import unittest -from paddle.fluid.tests.unittests.test_cast_op import TestCastOp1 +import unittest, sys +sys.path.append("../") +from test_cast_op import TestCastOp1 if __name__ == '__main__': unittest.main() diff --git a/python/paddle/fluid/tests/unittests/ngraph/test_concat_ngraph_op.py b/python/paddle/fluid/tests/unittests/ngraph/test_concat_ngraph_op.py index 8517f7cc87ba5d72ccdadf6e1b201a1d7d7989b3..de831703b7e9c91ba7a6effbd630f85073dc0964 100644 --- a/python/paddle/fluid/tests/unittests/ngraph/test_concat_ngraph_op.py +++ b/python/paddle/fluid/tests/unittests/ngraph/test_concat_ngraph_op.py @@ -14,8 +14,9 @@ from __future__ import print_function -import unittest -from paddle.fluid.tests.unittests.test_concat_op import TestConcatOp, TestConcatOp2, TestConcatOp3, TestConcatOp4, TestConcatOp5 +import unittest, sys +sys.path.append("../") +from test_concat_op import TestConcatOp, TestConcatOp2, TestConcatOp3, TestConcatOp4, TestConcatOp5 if __name__ == '__main__': unittest.main() diff --git a/python/paddle/fluid/tests/unittests/ngraph/test_conv2d_ngraph_op.py b/python/paddle/fluid/tests/unittests/ngraph/test_conv2d_ngraph_op.py index 764d136ec8d1e4f6772d4d1cdd03b6494aa735d1..fc2031c4cfc21ff2d895d304b451215dc34b4462 100644 --- a/python/paddle/fluid/tests/unittests/ngraph/test_conv2d_ngraph_op.py +++ b/python/paddle/fluid/tests/unittests/ngraph/test_conv2d_ngraph_op.py @@ -14,8 +14,9 @@ from __future__ import print_function -import unittest -from paddle.fluid.tests.unittests.test_conv2d_op import TestConv2dOp, TestWithPad, TestWithStride, TestWithGroup, TestWith1x1, TestWithInput1x1Filter1x1, TestDepthwiseConv, TestDepthwiseConv2, TestDepthwiseConv3, TestDepthwiseConvWithDilation, TestDepthwiseConvWithDilation2 +import unittest, sys +sys.path.append("../") +from test_conv2d_op import TestConv2dOp, TestWithPad, TestWithStride, TestWithGroup, TestWith1x1, TestWithInput1x1Filter1x1, TestDepthwiseConv, TestDepthwiseConv2, TestDepthwiseConv3, TestDepthwiseConvWithDilation, TestDepthwiseConvWithDilation2 class TestNGRAPHDepthwiseConv(TestDepthwiseConv): diff --git a/python/paddle/fluid/tests/unittests/ngraph/test_cross_entropy_ngraph_op.py b/python/paddle/fluid/tests/unittests/ngraph/test_cross_entropy_ngraph_op.py index 3057218a1d80deffe7eb3164c2350143fc38007d..2a8edec7e79ba34fe0d4edc864996c98616447b7 100644 --- a/python/paddle/fluid/tests/unittests/ngraph/test_cross_entropy_ngraph_op.py +++ b/python/paddle/fluid/tests/unittests/ngraph/test_cross_entropy_ngraph_op.py @@ -14,8 +14,9 @@ from __future__ import print_function -import unittest -from paddle.fluid.tests.unittests.test_cross_entropy_op import TestCrossEntropyOp, TestCrossEntropyOp2, TestCrossEntropyOp3, TestCrossEntropyOp4, TestCrossEntropyOp5, TestCrossEntropyOp6, TestCrossEntropyOp7 +import unittest, sys +sys.path.append("../") +from test_cross_entropy_op import TestCrossEntropyOp, TestCrossEntropyOp2, TestCrossEntropyOp3, TestCrossEntropyOp4, TestCrossEntropyOp5, TestCrossEntropyOp6, TestCrossEntropyOp7 if __name__ == "__main__": unittest.main() diff --git a/python/paddle/fluid/tests/unittests/ngraph/test_dropout_ngraph_op.py b/python/paddle/fluid/tests/unittests/ngraph/test_dropout_ngraph_op.py index 0448bed10204fb8ddba8546608750313191c4cc9..484e76a89621de700423506f3d360cf431efb340 100644 --- a/python/paddle/fluid/tests/unittests/ngraph/test_dropout_ngraph_op.py +++ b/python/paddle/fluid/tests/unittests/ngraph/test_dropout_ngraph_op.py @@ -14,8 +14,9 @@ from __future__ import print_function -import unittest -from paddle.fluid.tests.unittests.test_dropout_op import TestDropoutOp, TestDropoutOp2, TestDropoutOp3, TestDropoutOp4, TestDropoutOp5, TestDropoutOp6, TestDropoutOp7, TestDropoutOp8, TestDropoutOp9 +import unittest, sys +sys.path.append("../") +from test_dropout_op import TestDropoutOp, TestDropoutOp2, TestDropoutOp3, TestDropoutOp4, TestDropoutOp5, TestDropoutOp6, TestDropoutOp7, TestDropoutOp8, TestDropoutOp9 if __name__ == '__main__': unittest.main() diff --git a/python/paddle/fluid/tests/unittests/ngraph/test_elementwise_add_ngraph_op.py b/python/paddle/fluid/tests/unittests/ngraph/test_elementwise_add_ngraph_op.py index 3fb9af3a542d5e6b0de7d8d839408759abdaedcb..32fef44cd4c749de962e21bfd64701a761a23b1c 100644 --- a/python/paddle/fluid/tests/unittests/ngraph/test_elementwise_add_ngraph_op.py +++ b/python/paddle/fluid/tests/unittests/ngraph/test_elementwise_add_ngraph_op.py @@ -14,8 +14,9 @@ from __future__ import print_function -import unittest -from paddle.fluid.tests.unittests.test_elementwise_add_op import TestElementwiseAddOp, TestElementwiseAddOp_broadcast_0 +import unittest, sys +sys.path.append("../") +from test_elementwise_add_op import TestElementwiseAddOp, TestElementwiseAddOp_broadcast_0 if __name__ == '__main__': unittest.main() diff --git a/python/paddle/fluid/tests/unittests/ngraph/test_fill_constant_ngraph_op.py b/python/paddle/fluid/tests/unittests/ngraph/test_fill_constant_ngraph_op.py index 2b10b8f7a3ac0f978c13bd86824b939e69c5336a..1ef14b5244de686123b28d3a1555da726fa5893d 100644 --- a/python/paddle/fluid/tests/unittests/ngraph/test_fill_constant_ngraph_op.py +++ b/python/paddle/fluid/tests/unittests/ngraph/test_fill_constant_ngraph_op.py @@ -14,9 +14,10 @@ from __future__ import print_function -import unittest +import unittest, sys +sys.path.append("../") import numpy as np -from paddle.fluid.tests.unittests.test_fill_constant_op import TestFillConstantOp1, TestFillConstantOp2, TestFillConstantOpWithSelectedRows +from test_fill_constant_op import TestFillConstantOp1, TestFillConstantOp2, TestFillConstantOpWithSelectedRows class TestNGRAPHFillConstantFP64(TestFillConstantOp1): diff --git a/python/paddle/fluid/tests/unittests/ngraph/test_fill_zeros_like_ngraph_op.py b/python/paddle/fluid/tests/unittests/ngraph/test_fill_zeros_like_ngraph_op.py index 45e6af7f961cbebb3ee04c3181068c807830dedc..32f72ada815ae8a1bed8e5e4bccf557e4e108f17 100644 --- a/python/paddle/fluid/tests/unittests/ngraph/test_fill_zeros_like_ngraph_op.py +++ b/python/paddle/fluid/tests/unittests/ngraph/test_fill_zeros_like_ngraph_op.py @@ -13,8 +13,9 @@ # limitations under the License. from __future__ import print_function -import unittest -from paddle.fluid.tests.unittests.test_fill_zeros_like_op import TestFillZerosLikeOp +import unittest, sys +sys.path.append("../") +from test_fill_zeros_like_op import TestFillZerosLikeOp if __name__ == "__main__": unittest.main() diff --git a/python/paddle/fluid/tests/unittests/ngraph/test_increment_ngraph_op.py b/python/paddle/fluid/tests/unittests/ngraph/test_increment_ngraph_op.py index 9e1013fa8221191079414ddf1d2b7f493c10662e..33e9520d005d99f03e093a5d549d6f6d2b42443e 100644 --- a/python/paddle/fluid/tests/unittests/ngraph/test_increment_ngraph_op.py +++ b/python/paddle/fluid/tests/unittests/ngraph/test_increment_ngraph_op.py @@ -14,9 +14,10 @@ from __future__ import print_function -import unittest +import unittest, sys +sys.path.append("../") import numpy as np -from paddle.fluid.tests.unittests.op_test import OpTest +from op_test import OpTest class TestNGRAPHIncrementOp(OpTest): diff --git a/python/paddle/fluid/tests/unittests/ngraph/test_lrn_ngraph_op.py b/python/paddle/fluid/tests/unittests/ngraph/test_lrn_ngraph_op.py index 4c998c6ca2ec3bba8d7c3257ed3fe4fddc70a46a..88d9e9c86f4f9f2a3dd9669922a8f2e1b6a07b9f 100644 --- a/python/paddle/fluid/tests/unittests/ngraph/test_lrn_ngraph_op.py +++ b/python/paddle/fluid/tests/unittests/ngraph/test_lrn_ngraph_op.py @@ -14,8 +14,9 @@ from __future__ import print_function -import unittest -from paddle.fluid.tests.unittests.test_lrn_op import TestLRNOp +import unittest, sys +sys.path.append("../") +from test_lrn_op import TestLRNOp class TestLRNNGRAPHOp(TestLRNOp): diff --git a/python/paddle/fluid/tests/unittests/ngraph/test_matmul_ngraph_op.py b/python/paddle/fluid/tests/unittests/ngraph/test_matmul_ngraph_op.py index 4bb28529d8772a36f5146a91c84a1219843d7792..4c5772c5f0ebf571eb9db2e03c814e7c9c09d5f2 100644 --- a/python/paddle/fluid/tests/unittests/ngraph/test_matmul_ngraph_op.py +++ b/python/paddle/fluid/tests/unittests/ngraph/test_matmul_ngraph_op.py @@ -14,8 +14,9 @@ from __future__ import print_function -import unittest -from paddle.fluid.tests.unittests.test_matmul_op import * +import unittest, sys +sys.path.append("../") +from test_matmul_op import * if __name__ == '__main__': unittest.main() diff --git a/python/paddle/fluid/tests/unittests/ngraph/test_mean_ngraph_op.py b/python/paddle/fluid/tests/unittests/ngraph/test_mean_ngraph_op.py index b4894734cbcc11cf5eec7401297dc35545aa7268..0ac0e72ac70102ad8806c67156504daa105fe727 100644 --- a/python/paddle/fluid/tests/unittests/ngraph/test_mean_ngraph_op.py +++ b/python/paddle/fluid/tests/unittests/ngraph/test_mean_ngraph_op.py @@ -13,8 +13,9 @@ # limitations under the License. from __future__ import print_function -import unittest -from paddle.fluid.tests.unittests.test_mean_op import TestMeanOp +import unittest, sys +sys.path.append("../") +from test_mean_op import TestMeanOp if __name__ == "__main__": unittest.main() diff --git a/python/paddle/fluid/tests/unittests/ngraph/test_momentum_ngraph_op.py b/python/paddle/fluid/tests/unittests/ngraph/test_momentum_ngraph_op.py index 2c3549d907f5f67abc0cbd448a492d95b8ae6c32..1bbcbfb2fe7f958fc36b5a843b06e7d221afbb84 100644 --- a/python/paddle/fluid/tests/unittests/ngraph/test_momentum_ngraph_op.py +++ b/python/paddle/fluid/tests/unittests/ngraph/test_momentum_ngraph_op.py @@ -14,8 +14,9 @@ from __future__ import print_function -import unittest -from paddle.fluid.tests.unittests.test_momentum_op import TestMomentumOp1, TestMomentumOp2, TestLarsMomentumOp, TestSparseMomentumOp, TestSparseMomentumOp2 +import unittest, sys +sys.path.append("../") +from test_momentum_op import TestMomentumOp1, TestMomentumOp2, TestLarsMomentumOp, TestSparseMomentumOp, TestSparseMomentumOp2 if __name__ == '__main__': unittest.main() diff --git a/python/paddle/fluid/tests/unittests/ngraph/test_mul_ngraph_op.py b/python/paddle/fluid/tests/unittests/ngraph/test_mul_ngraph_op.py index 549d03f6e92dc7e88ec8618e5f97287bb68ed0d9..412127af701045c0efbd1c0e2478eaa46ce245f9 100644 --- a/python/paddle/fluid/tests/unittests/ngraph/test_mul_ngraph_op.py +++ b/python/paddle/fluid/tests/unittests/ngraph/test_mul_ngraph_op.py @@ -14,8 +14,9 @@ from __future__ import print_function -import unittest -from paddle.fluid.tests.unittests.test_mul_op import TestMulOp, TestMulOp2 +import unittest, sys +sys.path.append("../") +from test_mul_op import TestMulOp, TestMulOp2 if __name__ == "__main__": unittest.main() diff --git a/python/paddle/fluid/tests/unittests/ngraph/test_pool2d_ngraph_op.py b/python/paddle/fluid/tests/unittests/ngraph/test_pool2d_ngraph_op.py index ff82e9fa1d3d343aa7faf56a0bd27d2c9edc1ea4..5ce46fbf573c8736b4af07057734dd3ae140749c 100644 --- a/python/paddle/fluid/tests/unittests/ngraph/test_pool2d_ngraph_op.py +++ b/python/paddle/fluid/tests/unittests/ngraph/test_pool2d_ngraph_op.py @@ -14,9 +14,9 @@ from __future__ import print_function -import unittest - -from paddle.fluid.tests.unittests.test_pool2d_op import TestPool2D_Op, TestCase1, TestCase2, TestCase3, TestCase4, TestCase5 +import unittest, sys +sys.path.append("../") +from test_pool2d_op import TestPool2D_Op, TestCase1, TestCase2, TestCase3, TestCase4, TestCase5 class TestNGRAPHCeilMode(TestCase1):