From 55be0380dc5d61b2b18cd9f6a021031412321e69 Mon Sep 17 00:00:00 2001 From: drryanhuang Date: Wed, 17 Jan 2024 18:16:56 +0000 Subject: [PATCH 1/3] 1/11 --- test/cpp/phi/kernels/CMakeLists.txt | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/test/cpp/phi/kernels/CMakeLists.txt b/test/cpp/phi/kernels/CMakeLists.txt index 28254d98f3a6b1..e4e39fe8988080 100644 --- a/test/cpp/phi/kernels/CMakeLists.txt +++ b/test/cpp/phi/kernels/CMakeLists.txt @@ -1,7 +1,4 @@ -cc_test( - test_math_function - SRCS test_math_function.cc - DEPS phi common) +paddle_test(test_math_function SRCS test_math_function.cc DEPS phi common) if(WITH_GPU) nv_test( test_math_function_gpu From 237a7a84bcf8d3d42f1fe71447df915817e6fc15 Mon Sep 17 00:00:00 2001 From: drryanhuang Date: Wed, 17 Jan 2024 18:20:28 +0000 Subject: [PATCH 2/3] 3/13 --- test/cpp/phi/core/CMakeLists.txt | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/test/cpp/phi/core/CMakeLists.txt b/test/cpp/phi/core/CMakeLists.txt index cd2c2f7229b39f..801aa507660b5b 100644 --- a/test/cpp/phi/core/CMakeLists.txt +++ b/test/cpp/phi/core/CMakeLists.txt @@ -1,12 +1,6 @@ -cc_test( - test_custom_kernel - SRCS test_custom_kernel.cc - DEPS phi common) -cc_test( - test_dense_tensor - SRCS test_dense_tensor.cc - DEPS phi common) -cc_test(test_intrusive_ptr SRCS test_intrusive_ptr.cc) +paddle_test(test_custom_kernel SRCS test_custom_kernel.cc DEPS phi common) +paddle_test(test_dense_tensor SRCS test_dense_tensor.cc DEPS phi common) +paddle_test(test_intrusive_ptr SRCS test_intrusive_ptr.cc) cc_test(test_type_info SRCS test_type_info.cc) cc_test( test_kernel_factory From e60b5f0cf5a80cf57f7e0c18435723d776a54ab1 Mon Sep 17 00:00:00 2001 From: drryanhuang Date: Wed, 17 Jan 2024 18:34:31 +0000 Subject: [PATCH 3/3] 8 --- test/cpp/phi/core/CMakeLists.txt | 64 +++++++++++--------------------- 1 file changed, 22 insertions(+), 42 deletions(-) diff --git a/test/cpp/phi/core/CMakeLists.txt b/test/cpp/phi/core/CMakeLists.txt index 801aa507660b5b..d4e7c8969134d9 100644 --- a/test/cpp/phi/core/CMakeLists.txt +++ b/test/cpp/phi/core/CMakeLists.txt @@ -1,32 +1,16 @@ paddle_test(test_custom_kernel SRCS test_custom_kernel.cc DEPS phi common) paddle_test(test_dense_tensor SRCS test_dense_tensor.cc DEPS phi common) paddle_test(test_intrusive_ptr SRCS test_intrusive_ptr.cc) -cc_test(test_type_info SRCS test_type_info.cc) -cc_test( - test_kernel_factory - SRCS test_kernel_factory.cc - DEPS phi common) -cc_test( - test_sparse_coo_tensor - SRCS test_sparse_coo_tensor.cc - DEPS phi common) -cc_test( - test_sparse_csr_tensor - SRCS test_sparse_csr_tensor.cc - DEPS phi common) -cc_test( - test_op_utils - SRCS test_op_utils.cc - DEPS op_compat_infos) -cc_test( - test_meta_fn_utils - SRCS test_meta_fn_utils.cc - DEPS phi common) +paddle_test(test_type_info SRCS test_type_info.cc) +paddle_test(test_kernel_factory SRCS test_kernel_factory.cc DEPS phi common) +paddle_test(test_sparse_coo_tensor SRCS test_sparse_coo_tensor.cc DEPS phi + common) +paddle_test(test_sparse_csr_tensor SRCS test_sparse_csr_tensor.cc DEPS phi + common) +paddle_test(test_op_utils SRCS test_op_utils.cc DEPS op_compat_infos) +paddle_test(test_meta_fn_utils SRCS test_meta_fn_utils.cc DEPS phi common) -cc_test( - test_ddim - SRCS test_ddim.cc - DEPS phi common) +paddle_test(test_ddim SRCS test_ddim.cc DEPS phi common) if(WITH_GPU) nv_test( test_dim @@ -39,26 +23,17 @@ elseif(WITH_ROCM) DEPS phi common) endif() -cc_test( - selected_rows_test - SRCS test_selected_rows.cc - DEPS phi common) +paddle_test(selected_rows_test SRCS test_selected_rows.cc DEPS phi common) if(WITH_TESTING AND TEST selected_rows_test) set_tests_properties(selected_rows_test PROPERTIES TIMEOUT 120) endif() if(NOT WIN32) - cc_test(test_rw_lock SRCS test_rw_lock.cc) + paddle_test(test_rw_lock SRCS test_rw_lock.cc) endif() -cc_test( - test_string_tensor - SRCS test_string_tensor.cc - DEPS phi common) -cc_test(unroll_array_ops_test SRCS unroll_array_ops_test.cc) +paddle_test(test_string_tensor SRCS test_string_tensor.cc DEPS phi common) +paddle_test(unroll_array_ops_test SRCS unroll_array_ops_test.cc) -cc_test( - test_tensor_array - SRCS test_tensor_array.cc - DEPS phi common) +paddle_test(test_tensor_array SRCS test_tensor_array.cc DEPS phi common) if(WITH_GPU) nv_test( @@ -71,8 +46,13 @@ elseif(WITH_ROCM) SRCS test_mixed_vector.cc test_mixed_vector.cu DEPS place phi common tensor) else() - cc_test( + paddle_test( test_mixed_vector - SRCS test_mixed_vector.cc - DEPS place phi common tensor) + SRCS + test_mixed_vector.cc + DEPS + place + phi + common + tensor) endif()