未验证 提交 3f8585a9 编写于 作者: H HongyuJia 提交者: GitHub

rename filenames from pten to phi (#46579)

上级 f6f8c935
if(WITH_GPU) if(WITH_GPU)
nv_test( nv_test(
test_phi_tensor test_phi_tensor
SRCS test_pten_tensor.cc SRCS test_phi_tensor.cc
DEPS phi_tensor glog) DEPS phi_tensor glog)
elseif(WITH_ROCM) elseif(WITH_ROCM)
hip_test( hip_test(
test_phi_tensor test_phi_tensor
SRCS test_pten_tensor.cc SRCS test_phi_tensor.cc
DEPS phi_tensor glog) DEPS phi_tensor glog)
else() else()
cc_test( cc_test(
test_phi_tensor test_phi_tensor
SRCS test_pten_tensor.cc SRCS test_phi_tensor.cc
DEPS phi_tensor glog) DEPS phi_tensor glog)
endif() endif()
cc_test( cc_test(
test_phi_exception test_phi_exception
SRCS test_pten_exception.cc SRCS test_phi_exception.cc
DEPS gtest) DEPS gtest)
set(COMMON_API_TEST_DEPS phi_tensor phi_api phi_api_utils) set(COMMON_API_TEST_DEPS phi_tensor phi_api phi_api_utils)
......
...@@ -27,10 +27,10 @@ TEST(PD_THROW, empty) { ...@@ -27,10 +27,10 @@ TEST(PD_THROW, empty) {
std::string err_msg = e.what(); std::string err_msg = e.what();
EXPECT_TRUE(err_msg.find("An error occurred.") != std::string::npos); EXPECT_TRUE(err_msg.find("An error occurred.") != std::string::npos);
#if _WIN32 #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); std::string::npos);
#else #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); std::string::npos);
#endif #endif
} }
...@@ -54,10 +54,10 @@ TEST(PD_THROW, non_empty) { ...@@ -54,10 +54,10 @@ TEST(PD_THROW, non_empty) {
EXPECT_TRUE(err_msg.find("PD_THROW returns 0. DataType of 1 is INT. ") != EXPECT_TRUE(err_msg.find("PD_THROW returns 0. DataType of 1 is INT. ") !=
std::string::npos); std::string::npos);
#if _WIN32 #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); std::string::npos);
#else #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); std::string::npos);
#endif #endif
} }
...@@ -84,10 +84,10 @@ TEST(PD_CHECK, FAILED) { ...@@ -84,10 +84,10 @@ TEST(PD_CHECK, FAILED) {
EXPECT_TRUE(err_msg.find("Expected false, but it's not satisfied.") != EXPECT_TRUE(err_msg.find("Expected false, but it's not satisfied.") !=
std::string::npos); std::string::npos);
#if _WIN32 #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); std::string::npos);
#else #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); std::string::npos);
#endif #endif
} }
...@@ -110,10 +110,10 @@ TEST(PD_CHECK, FAILED) { ...@@ -110,10 +110,10 @@ TEST(PD_CHECK, FAILED) {
EXPECT_TRUE(err_msg.find("PD_CHECK returns 0. DataType of 1 is INT. ") != EXPECT_TRUE(err_msg.find("PD_CHECK returns 0. DataType of 1 is INT. ") !=
std::string::npos); std::string::npos);
#if _WIN32 #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); std::string::npos);
#else #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); std::string::npos);
#endif #endif
} }
...@@ -130,10 +130,10 @@ TEST(PD_CHECK, FAILED) { ...@@ -130,10 +130,10 @@ TEST(PD_CHECK, FAILED) {
EXPECT_TRUE(err_msg.find("Expected a > b, but it's not satisfied.") != EXPECT_TRUE(err_msg.find("Expected a > b, but it's not satisfied.") !=
std::string::npos); std::string::npos);
#if _WIN32 #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); std::string::npos);
#else #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); std::string::npos);
#endif #endif
} }
...@@ -150,10 +150,10 @@ TEST(PD_CHECK, FAILED) { ...@@ -150,10 +150,10 @@ TEST(PD_CHECK, FAILED) {
EXPECT_TRUE(err_msg.find("PD_CHECK returns 0, because 123 > 0.345") != EXPECT_TRUE(err_msg.find("PD_CHECK returns 0, because 123 > 0.345") !=
std::string::npos); std::string::npos);
#if _WIN32 #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); std::string::npos);
#else #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); std::string::npos);
#endif #endif
} }
......
add_executable(print_pten_kernels print_pten_kernels.cc) add_executable(print_phi_kernels print_phi_kernels.cc)
target_link_libraries(print_pten_kernels phi phi_api_utils) target_link_libraries(print_phi_kernels phi phi_api_utils)
if(WIN32) if(WIN32)
target_link_libraries(print_pten_kernels shlwapi.lib) target_link_libraries(print_phi_kernels shlwapi.lib)
endif() endif()
if(WITH_ROCM) if(WITH_ROCM)
target_link_libraries(print_pten_kernels ${ROCM_HIPRTC_LIB}) target_link_libraries(print_phi_kernels ${ROCM_HIPRTC_LIB})
endif() endif()
...@@ -33,9 +33,9 @@ function update_pd_ops() { ...@@ -33,9 +33,9 @@ function update_pd_ops() {
rm -rf ${PADDLE_ROOT}/build && mkdir -p ${PADDLE_ROOT}/build rm -rf ${PADDLE_ROOT}/build && mkdir -p ${PADDLE_ROOT}/build
cd ${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 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 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 ./paddle/fluid/pybind/kernel_signature_generator > ../tools/infrt/kernel_signature.json
cd python/dist/ cd python/dist/
python3 -m pip uninstall -y paddlepaddle python3 -m pip uninstall -y paddlepaddle
......
...@@ -1711,9 +1711,9 @@ CPU_PARALLEL_JOB = [ ...@@ -1711,9 +1711,9 @@ CPU_PARALLEL_JOB = [
'test_fleet_utils', 'test_fleet_utils',
'brpc_service_dense_sgd_test', 'brpc_service_dense_sgd_test',
'test_custom_linear', 'test_custom_linear',
'pten_test_backend', 'phi_test_backend',
'test_allocator', 'test_allocator',
'pten_test_data_type', 'phi_test_data_type',
'test_slice_api', 'test_slice_api',
'test_scale_api', 'test_scale_api',
'test_sum_api', 'test_sum_api',
...@@ -1723,7 +1723,7 @@ CPU_PARALLEL_JOB = [ ...@@ -1723,7 +1723,7 @@ CPU_PARALLEL_JOB = [
'build_strategy_test', 'build_strategy_test',
'test_fc_rnn_mkldnn_fuse_pass', 'test_fc_rnn_mkldnn_fuse_pass',
'scope_guard_test', 'scope_guard_test',
'pten_utils_test', 'phi_utils_test',
'init_test', 'init_test',
'cpu_helper_test', 'cpu_helper_test',
'complex_gpu_test', 'complex_gpu_test',
...@@ -1740,7 +1740,7 @@ CPU_PARALLEL_JOB = [ ...@@ -1740,7 +1740,7 @@ CPU_PARALLEL_JOB = [
'test_framework_place_utils', 'test_framework_place_utils',
'test_reshape_api', 'test_reshape_api',
'test_cast_api', 'test_cast_api',
'test_pten_exception', 'test_phi_exception',
'test_mean_api', 'test_mean_api',
'test_framework_storage', 'test_framework_storage',
'test_fill_api', 'test_fill_api',
...@@ -2111,7 +2111,7 @@ TETRAD_PARALLEL_JOB = [ ...@@ -2111,7 +2111,7 @@ TETRAD_PARALLEL_JOB = [
'test_fused_layernorm_residual_dropout_bias', 'test_fused_layernorm_residual_dropout_bias',
'test_fused_dropout_act_bias', 'test_fused_dropout_act_bias',
'test_tensorrt', 'test_tensorrt',
'test_pten_tensor', 'test_phi_tensor',
'test_matmul_api', 'test_matmul_api',
'test_to_api', 'test_to_api',
'beam_search_test', 'beam_search_test',
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册