未验证 提交 2cf061f2 编写于 作者: Y Yan Chunwei 提交者: GitHub

fix mobile compile (#17777)

上级 eba924ba
......@@ -31,6 +31,7 @@ set(LITE_DEMO_INSTALL_DIR "${THIRD_PARTY_PATH}/inference_demo" CACHE STRING
# ${ops_lite} ${host_kernels} ARGS --model_dir=${LITE_MODEL_DIR}/lite_naive_model
# --optimized_model=${LITE_MODEL_DIR}/lite_naive_model_opt SERIAL)
if((NOT LITE_WITH_LIGHT_WEIGHT_FRAMEWORK) AND WITH_TESTING)
lite_cc_test(test_cxx_api_lite SRCS cxx_api_test.cc
DEPS cxx_api_lite model_parser_lite target_wrapper_host
......@@ -38,10 +39,12 @@ if((NOT LITE_WITH_LIGHT_WEIGHT_FRAMEWORK) AND WITH_TESTING)
PROFILE_DEPS basic_profiler_lite
ARGS --model_dir=${LITE_MODEL_DIR}/lite_naive_model
--optimized_model=${LITE_MODEL_DIR}/lite_naive_model_opt SERIAL)
lite_download_and_uncompress(${LITE_MODEL_DIR} ${LITE_URL} "lite_naive_model.tar.gz")
add_dependencies(test_cxx_api_lite extern_lite_download_lite_naive_model_tar_gz)
endif()
lite_cc_binary(cxx_api_lite_bin SRCS cxx_api_bin.cc
DEPS
cxx_api_lite
......
#cc_library(runtime_lite SRCS runtime.cc)
lite_cc_test(test_model_parser_lite SRCS model_parser_test.cc
DEPS model_parser_lite framework_proto_lite
ARGS --model_dir=${LITE_MODEL_DIR}/lite_naive_model)
if(WITH_TESTING)
add_dependencies(test_model_parser_lite extern_lite_download_lite_naive_model_tar_gz)
endif(WITH_TESTING)
#TODO(Superjomn) enable it again.
if(NOT LITE_WITH_LIGHT_WEIGHT_FRAMEWORK)
lite_cc_test(test_model_parser_lite SRCS model_parser_test.cc
DEPS model_parser_lite framework_proto_lite
ARGS --model_dir=${LITE_MODEL_DIR}/lite_naive_model)
if(WITH_TESTING)
add_dependencies(test_model_parser_lite extern_lite_download_lite_naive_model_tar_gz)
endif(WITH_TESTING)
endif()
if(LITE_WITH_LIGHT_WEIGHT_FRAMEWORK)
......
......@@ -32,5 +32,5 @@ set(ops_lite
dropout_op_lite
PARENT_SCOPE)
lite_cc_test(test_fc_op_lite SRCS fc_op_test.cc DEPS fc_op_lite memory_lite fc_compute_x86)
lite_cc_test(test_fc_op_lite SRCS fc_op_test.cc DEPS fc_op_lite memory_lite X86_DEPS fc_compute_x86)
lite_cc_test(test_softmax_op_lite SRCS softmax_op_test.cc DEPS softmax_op_lite memory_lite)
......@@ -66,7 +66,11 @@ TEST(fc_op_lite, test) {
} // namespace operators
} // namespace lite
} // namespace paddle
#ifdef LITE_WITH_X86
#ifdef LITE_WITH_X86
USE_LITE_KERNEL(fc, kX86, kFloat, kNCHW, def);
#endif
#ifdef LITE_WITH_ARM
USE_LITE_KERNEL(fc, kARM, kFloat, kNCHW, def);
#endif
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册