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

rename filenames from pten to phi (#46579)

上级 f6f8c935
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)
......
......@@ -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
}
......
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()
......@@ -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
......
......@@ -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',
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册