diff --git a/paddle/phi/tests/api/CMakeLists.txt b/paddle/phi/tests/api/CMakeLists.txt index e8fb6359004de6fbb745ebb585caf44720f3a9b6..09c218e6bc9261f43c33b212620a9a1b9efc8f69 100644 --- a/paddle/phi/tests/api/CMakeLists.txt +++ b/paddle/phi/tests/api/CMakeLists.txt @@ -1,23 +1,23 @@ if(WITH_GPU) nv_test( test_phi_tensor - SRCS test_pten_tensor.cc + SRCS test_phi_tensor.cc DEPS phi_tensor glog) elseif(WITH_ROCM) hip_test( test_phi_tensor - SRCS test_pten_tensor.cc + SRCS test_phi_tensor.cc DEPS phi_tensor glog) else() cc_test( test_phi_tensor - SRCS test_pten_tensor.cc + SRCS test_phi_tensor.cc DEPS phi_tensor glog) endif() cc_test( test_phi_exception - SRCS test_pten_exception.cc + SRCS test_phi_exception.cc DEPS gtest) set(COMMON_API_TEST_DEPS phi_tensor phi_api phi_api_utils) diff --git a/paddle/phi/tests/api/test_pten_exception.cc b/paddle/phi/tests/api/test_phi_exception.cc similarity index 81% rename from paddle/phi/tests/api/test_pten_exception.cc rename to paddle/phi/tests/api/test_phi_exception.cc index 92c44684f3ae5e0689fa487d21b3a8615397964e..3384f120e1346a978898341fe33c80544ddd6551 100644 --- a/paddle/phi/tests/api/test_pten_exception.cc +++ b/paddle/phi/tests/api/test_phi_exception.cc @@ -27,10 +27,10 @@ TEST(PD_THROW, empty) { std::string err_msg = e.what(); EXPECT_TRUE(err_msg.find("An error occurred.") != std::string::npos); #if _WIN32 - EXPECT_TRUE(err_msg.find("tests\\api\\test_pten_exception.cc") != + EXPECT_TRUE(err_msg.find("tests\\api\\test_phi_exception.cc") != std::string::npos); #else - EXPECT_TRUE(err_msg.find("paddle/phi/tests/api/test_pten_exception.cc") != + EXPECT_TRUE(err_msg.find("paddle/phi/tests/api/test_phi_exception.cc") != std::string::npos); #endif } @@ -54,10 +54,10 @@ TEST(PD_THROW, non_empty) { EXPECT_TRUE(err_msg.find("PD_THROW returns 0. DataType of 1 is INT. ") != std::string::npos); #if _WIN32 - EXPECT_TRUE(err_msg.find("tests\\api\\test_pten_exception.cc") != + EXPECT_TRUE(err_msg.find("tests\\api\\test_phi_exception.cc") != std::string::npos); #else - EXPECT_TRUE(err_msg.find("paddle/phi/tests/api/test_pten_exception.cc") != + EXPECT_TRUE(err_msg.find("paddle/phi/tests/api/test_phi_exception.cc") != std::string::npos); #endif } @@ -84,10 +84,10 @@ TEST(PD_CHECK, FAILED) { EXPECT_TRUE(err_msg.find("Expected false, but it's not satisfied.") != std::string::npos); #if _WIN32 - EXPECT_TRUE(err_msg.find("tests\\api\\test_pten_exception.cc") != + EXPECT_TRUE(err_msg.find("tests\\api\\test_phi_exception.cc") != std::string::npos); #else - EXPECT_TRUE(err_msg.find("paddle/phi/tests/api/test_pten_exception.cc") != + EXPECT_TRUE(err_msg.find("paddle/phi/tests/api/test_phi_exception.cc") != std::string::npos); #endif } @@ -110,10 +110,10 @@ TEST(PD_CHECK, FAILED) { EXPECT_TRUE(err_msg.find("PD_CHECK returns 0. DataType of 1 is INT. ") != std::string::npos); #if _WIN32 - EXPECT_TRUE(err_msg.find("tests\\api\\test_pten_exception.cc") != + EXPECT_TRUE(err_msg.find("tests\\api\\test_phi_exception.cc") != std::string::npos); #else - EXPECT_TRUE(err_msg.find("paddle/phi/tests/api/test_pten_exception.cc") != + EXPECT_TRUE(err_msg.find("paddle/phi/tests/api/test_phi_exception.cc") != std::string::npos); #endif } @@ -130,10 +130,10 @@ TEST(PD_CHECK, FAILED) { EXPECT_TRUE(err_msg.find("Expected a > b, but it's not satisfied.") != std::string::npos); #if _WIN32 - EXPECT_TRUE(err_msg.find("tests\\api\\test_pten_exception.cc") != + EXPECT_TRUE(err_msg.find("tests\\api\\test_phi_exception.cc") != std::string::npos); #else - EXPECT_TRUE(err_msg.find("paddle/phi/tests/api/test_pten_exception.cc") != + EXPECT_TRUE(err_msg.find("paddle/phi/tests/api/test_phi_exception.cc") != std::string::npos); #endif } @@ -150,10 +150,10 @@ TEST(PD_CHECK, FAILED) { EXPECT_TRUE(err_msg.find("PD_CHECK returns 0, because 123 > 0.345") != std::string::npos); #if _WIN32 - EXPECT_TRUE(err_msg.find("tests\\api\\test_pten_exception.cc") != + EXPECT_TRUE(err_msg.find("tests\\api\\test_phi_exception.cc") != std::string::npos); #else - EXPECT_TRUE(err_msg.find("paddle/phi/tests/api/test_pten_exception.cc") != + EXPECT_TRUE(err_msg.find("paddle/phi/tests/api/test_phi_exception.cc") != std::string::npos); #endif } diff --git a/paddle/phi/tests/api/test_pten_tensor.cc b/paddle/phi/tests/api/test_phi_tensor.cc similarity index 100% rename from paddle/phi/tests/api/test_pten_tensor.cc rename to paddle/phi/tests/api/test_phi_tensor.cc diff --git a/paddle/phi/tools/CMakeLists.txt b/paddle/phi/tools/CMakeLists.txt index d1df5ec32754608ad1039efe27e20bdd9876fc40..9c2492cd4ef34f0f676075ce61effdd372fdd5e5 100644 --- a/paddle/phi/tools/CMakeLists.txt +++ b/paddle/phi/tools/CMakeLists.txt @@ -1,8 +1,8 @@ -add_executable(print_pten_kernels print_pten_kernels.cc) -target_link_libraries(print_pten_kernels phi phi_api_utils) +add_executable(print_phi_kernels print_phi_kernels.cc) +target_link_libraries(print_phi_kernels phi phi_api_utils) if(WIN32) - target_link_libraries(print_pten_kernels shlwapi.lib) + target_link_libraries(print_phi_kernels shlwapi.lib) endif() if(WITH_ROCM) - target_link_libraries(print_pten_kernels ${ROCM_HIPRTC_LIB}) + target_link_libraries(print_phi_kernels ${ROCM_HIPRTC_LIB}) endif() diff --git a/paddle/phi/tools/print_pten_kernels.cc b/paddle/phi/tools/print_phi_kernels.cc similarity index 100% rename from paddle/phi/tools/print_pten_kernels.cc rename to paddle/phi/tools/print_phi_kernels.cc diff --git a/paddle/scripts/infrt_build.sh b/paddle/scripts/infrt_build.sh index 6bd6078eca2459146a51cde08bf86aa0b5a2f661..6f13d8880726c18c2a92c99cc014d01993b759b8 100755 --- a/paddle/scripts/infrt_build.sh +++ b/paddle/scripts/infrt_build.sh @@ -33,9 +33,9 @@ function update_pd_ops() { rm -rf ${PADDLE_ROOT}/build && mkdir -p ${PADDLE_ROOT}/build cd ${PADDLE_ROOT}/build cmake .. -DWITH_PYTHON=ON -DWITH_MKL=OFF -DWITH_GPU=OFF -DPYTHON_EXECUTABLE=`which python3` -DWITH_XBYAK=OFF -DWITH_NCCL=OFF -DWITH_RCCL=OFF -DWITH_CRYPTO=OFF - make -j8 paddle_python print_pten_kernels kernel_signature_generator + make -j8 paddle_python print_phi_kernels kernel_signature_generator cd ${PADDLE_ROOT}/build - ./paddle/phi/tools/print_pten_kernels > ../tools/infrt/kernels.json + ./paddle/phi/tools/print_phi_kernels > ../tools/infrt/kernels.json ./paddle/fluid/pybind/kernel_signature_generator > ../tools/infrt/kernel_signature.json cd python/dist/ python3 -m pip uninstall -y paddlepaddle diff --git a/tools/parallel_UT_rule.py b/tools/parallel_UT_rule.py index 575ad9c88213b05194abb4e99f9b6febe3650be2..5b51315e234165883659aeaade34faffa8bd1200 100755 --- a/tools/parallel_UT_rule.py +++ b/tools/parallel_UT_rule.py @@ -1711,9 +1711,9 @@ CPU_PARALLEL_JOB = [ 'test_fleet_utils', 'brpc_service_dense_sgd_test', 'test_custom_linear', - 'pten_test_backend', + 'phi_test_backend', 'test_allocator', - 'pten_test_data_type', + 'phi_test_data_type', 'test_slice_api', 'test_scale_api', 'test_sum_api', @@ -1723,7 +1723,7 @@ CPU_PARALLEL_JOB = [ 'build_strategy_test', 'test_fc_rnn_mkldnn_fuse_pass', 'scope_guard_test', - 'pten_utils_test', + 'phi_utils_test', 'init_test', 'cpu_helper_test', 'complex_gpu_test', @@ -1740,7 +1740,7 @@ CPU_PARALLEL_JOB = [ 'test_framework_place_utils', 'test_reshape_api', 'test_cast_api', - 'test_pten_exception', + 'test_phi_exception', 'test_mean_api', 'test_framework_storage', 'test_fill_api', @@ -2111,7 +2111,7 @@ TETRAD_PARALLEL_JOB = [ 'test_fused_layernorm_residual_dropout_bias', 'test_fused_dropout_act_bias', 'test_tensorrt', - 'test_pten_tensor', + 'test_phi_tensor', 'test_matmul_api', 'test_to_api', 'beam_search_test',