未验证 提交 03951c1a 编写于 作者: H hong19860320 提交者: GitHub

[XPU] Disable the unit test of subgraph temporarily for XTCL, and refine the...

[XPU] Disable the unit test of subgraph temporarily for XTCL, and refine the file name of unit tests of XPU (#4240)
上级 70940bf4
......@@ -4,7 +4,7 @@ lite_cc_library(subgraph_detector
lite_cc_library(subgraph_pass
SRCS subgraph_pass.cc
DEPS mir_pass types context ${mir_fusers} subgraph_detector)
if (WITH_TESTING AND NOT LITE_WITH_CUDA)
if (WITH_TESTING AND NOT LITE_WITH_CUDA AND NOT LITE_WITH_XPU)
lite_cc_test(test_subgraph_detector
SRCS subgraph_detector_test.cc
DEPS subgraph_detector mir_passes gflags model_parser cxx_api
......
......@@ -8,30 +8,30 @@ if(LITE_WITH_ARM)
endif()
endif()
if(LITE_WITH_XPU)
lite_cc_test(test_resnet50_lite_xpu SRCS test_resnet50_lite_xpu.cc
if(LITE_WITH_XPU AND NOT LITE_WITH_XTCL)
lite_cc_test(test_resnet50_fp32_xpu SRCS test_resnet50_fp32_xpu.cc
DEPS mir_passes lite_api_test_helper paddle_api_full paddle_api_light gflags utils
${ops} ${host_kernels} ${x86_kernels} ${xpu_kernels}
ARGS --model_dir=${LITE_MODEL_DIR}/resnet50)
lite_cc_test(test_ernie_lite_xpu SRCS test_ernie_lite_xpu.cc
lite_cc_test(test_ernie_fp32_xpu SRCS test_ernie_fp32_xpu.cc
DEPS mir_passes lite_api_test_helper paddle_api_full paddle_api_light gflags utils
${ops} ${host_kernels} ${x86_kernels} ${xpu_kernels}
ARGS --model_dir=${LITE_MODEL_DIR}/ernie)
lite_cc_test(test_bert_lite_xpu SRCS test_bert_lite_xpu.cc
lite_cc_test(test_bert_fp32_xpu SRCS test_bert_fp32_xpu.cc
DEPS mir_passes lite_api_test_helper paddle_api_full paddle_api_light gflags utils
${ops} ${host_kernels} ${x86_kernels} ${xpu_kernels}
ARGS --model_dir=${LITE_MODEL_DIR}/bert)
if(WITH_TESTING)
add_dependencies(test_resnet50_lite_xpu extern_lite_download_resnet50_tar_gz)
add_dependencies(test_ernie_lite_xpu extern_lite_download_ernie_tar_gz)
add_dependencies(test_bert_lite_xpu extern_lite_download_bert_tar_gz)
add_dependencies(test_resnet50_fp32_xpu extern_lite_download_resnet50_tar_gz)
add_dependencies(test_ernie_fp32_xpu extern_lite_download_ernie_tar_gz)
add_dependencies(test_bert_fp32_xpu extern_lite_download_bert_tar_gz)
endif()
# TODO(miaotianxiang): enable later
#lite_cc_test(test_fpr_lite_xpu SRCS test_fpr_lite_xpu.cc
#lite_cc_test(test_fpr_fp32_xpu SRCS test_fpr_fp32_xpu.cc
#DEPS mir_passes lite_api_test_helper paddle_api_full paddle_api_light gflags utils
#${ops} ${host_kernels} ${x86_kernels} ${xpu_kernels}
#ARGS --model_dir=${LITE_MODEL_DIR}/resnet50)
#lite_cc_test(test_mmdnn_lite_xpu SRCS test_mmdnn_lite_xpu.cc
#lite_cc_test(test_mmdnn_fp32_xpu SRCS test_mmdnn_fp32_xpu.cc
#DEPS mir_passes lite_api_test_helper paddle_api_full paddle_api_light gflags utils
#${ops} ${host_kernels} ${x86_kernels} ${xpu_kernels}
#ARGS --model_dir=${LITE_MODEL_DIR}/resnet50)
......
......@@ -37,7 +37,7 @@ lite::Tensor GetTensorWithShape(std::vector<int64_t> shape) {
return ret;
}
TEST(Ernie, test_ernie_lite_xpu) {
TEST(Ernie, test_ernie_fp32_xpu) {
lite_api::CxxConfig config;
config.set_model_dir(FLAGS_model_dir);
config.set_valid_places({lite_api::Place{TARGET(kXPU), PRECISION(kFloat)},
......
......@@ -37,7 +37,7 @@ lite::Tensor GetTensorWithShape(std::vector<int64_t> shape) {
return ret;
}
TEST(Ernie, test_ernie_lite_xpu) {
TEST(Ernie, test_ernie_fp32_xpu) {
lite_api::CxxConfig config;
config.set_model_dir(FLAGS_model_dir);
config.set_valid_places({lite_api::Place{TARGET(kXPU), PRECISION(kFloat)},
......
......@@ -26,7 +26,7 @@
namespace paddle {
namespace lite {
TEST(ResnetCbam, test_resnet_cbam_lite_xpu) {
TEST(ResnetCbam, test_resnet_cbam_fp32_xpu) {
lite_api::CxxConfig config;
// config.set_model_dir(FLAGS_model_dir);
config.set_model_file(FLAGS_model_dir + "/__model__");
......
......@@ -199,7 +199,7 @@ class FileReader {
}
};
TEST(MMDNN, test_mmdnn_lite_xpu) {
TEST(MMDNN, test_mmdnn_fp32_xpu) {
lite_api::CxxConfig config;
// config.set_model_dir(FLAGS_model_dir);
config.set_model_file(FLAGS_model_dir + "/__model__");
......
......@@ -26,7 +26,7 @@
namespace paddle {
namespace lite {
TEST(Resnet50, test_resnet50_lite_xpu) {
TEST(Resnet50, test_resnet50_fp32_xpu) {
lite_api::CxxConfig config;
config.set_model_dir(FLAGS_model_dir);
config.set_valid_places({lite_api::Place{TARGET(kXPU), PRECISION(kFloat)},
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册