diff --git a/paddle/scripts/paddle_build.sh b/paddle/scripts/paddle_build.sh index 711d6564cfa6355a93b734e4fcaeb566b70fbb5a..87fb6628f42230ad1b5b92a3b5a1e577bc1c2bbd 100755 --- a/paddle/scripts/paddle_build.sh +++ b/paddle/scripts/paddle_build.sh @@ -1200,6 +1200,7 @@ EOF set +x ut_startTime_s=`date +%s` test_cases=$(ctest -N -V | grep "_xpu" ) # cases list which would be run exclusively + get_quickly_disable_ut||disable_ut_quickly='' # indicate whether the case was in quickly disable list while read -r line; do if [[ "$line" == "" ]]; then continue diff --git a/python/paddle/fluid/tests/unittests/xpu/CMakeLists.txt b/python/paddle/fluid/tests/unittests/xpu/CMakeLists.txt index f71e04c09aa38b8cf7b3a167b84d4dc0e6cc3ec7..6ac4b93bf6d66e7bfc7b12a57bbb9d5984656ba1 100644 --- a/python/paddle/fluid/tests/unittests/xpu/CMakeLists.txt +++ b/python/paddle/fluid/tests/unittests/xpu/CMakeLists.txt @@ -1,6 +1,9 @@ file(GLOB TEST_OPS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "test_*.py") string(REPLACE ".py" "" TEST_OPS "${TEST_OPS}") +list(REMOVE_ITEM TEST_OPS test_concat_op_xpu) +list(REMOVE_ITEM TEST_OPS test_mean_op_xpu) + foreach(TEST_OP ${TEST_OPS}) py_test_modules(${TEST_OP} MODULES ${TEST_OP}) endforeach(TEST_OP) diff --git a/python/paddle/fluid/tests/unittests/xpu/test_batch_norm_op_xpu.py b/python/paddle/fluid/tests/unittests/xpu/test_batch_norm_op_xpu.py index 0d9387d6b75a7855474a9786adc1a9de47f27ae1..1cdec863b2ac3d0b4d845e1f59aebe57baa6d4c2 100644 --- a/python/paddle/fluid/tests/unittests/xpu/test_batch_norm_op_xpu.py +++ b/python/paddle/fluid/tests/unittests/xpu/test_batch_norm_op_xpu.py @@ -159,13 +159,15 @@ class TestXPUBatchNormOp(unittest.TestCase): def test_infer(self): paddle.enable_static() with paddle.static.program_guard(paddle.static.Program()): - x = paddle.data('X', self.x_np.shape, self.x_np.dtype) - scale = paddle.data('Scale', self.scale_np.shape, - self.scale_np.dtype) - bias = paddle.data('Bias', self.bias_np.shape, self.bias_np.dtype) - mean = paddle.data('Mean', self.mean_np.shape, self.mean_np.dtype) - variance = paddle.data('Variance', self.variance_np.shape, - self.variance_np.dtype) + x = paddle.fluid.data('X', self.x_np.shape, self.x_np.dtype) + scale = paddle.fluid.data('Scale', self.scale_np.shape, + self.scale_np.dtype) + bias = paddle.fluid.data('Bias', self.bias_np.shape, + self.bias_np.dtype) + mean = paddle.fluid.data('Mean', self.mean_np.shape, + self.mean_np.dtype) + variance = paddle.fluid.data('Variance', self.variance_np.shape, + self.variance_np.dtype) y = F.batch_norm(x, mean, variance, scale, bias, False, self.momentum, self.epsilon, self.data_layout) exe = paddle.static.Executor(self.place) diff --git a/python/paddle/fluid/tests/unittests/xpu/test_mean_op_xpu.py b/python/paddle/fluid/tests/unittests/xpu/test_mean_op_xpu.py index f43516235c0578a4f8fc9dbf2ba34d2fb669cc2e..3ebdd110d32cc57cfa1e66aef08e4d263d2cede8 100644 --- a/python/paddle/fluid/tests/unittests/xpu/test_mean_op_xpu.py +++ b/python/paddle/fluid/tests/unittests/xpu/test_mean_op_xpu.py @@ -88,7 +88,7 @@ class TestMeanAPI(unittest.TestCase): def test_api_static(self): paddle.enable_static() with paddle.static.program_guard(paddle.static.Program()): - x = paddle.data('X', self.x_shape) + x = paddle.fluid.data('X', self.x_shape) out1 = paddle.mean(x) out2 = paddle.tensor.mean(x) out3 = paddle.tensor.stat.mean(x) @@ -136,7 +136,7 @@ class TestMeanAPI(unittest.TestCase): self.assertRaises(Exception, paddle.mean, x, 2) paddle.enable_static() with paddle.static.program_guard(paddle.static.Program()): - x = paddle.data('X', [10, 12], 'int32') + x = paddle.fluid.data('X', [10, 12], 'int32') self.assertRaises(TypeError, paddle.mean, x)