未验证 提交 b3467a55 编写于 作者: X xiebaiyuan 提交者: GitHub

[mobile] fix mobile compile err. (#3441)

ONLY FIX MOBILE FOR OLD PROJECT ,DONOT NEED CHECK LITE COMPILE >>> MREGE DIRECT
上级 3b2d3189
......@@ -14,13 +14,10 @@ limitations under the License. */
#pragma once
// some platform-independent defintion
#include "lite/utils/macros.h"
#ifdef PADDLE_MOBILE_CPU
#define LOAD_CPU_OP(op_type) \
extern int TouchOpRegistrar_##op_type##_##cpu(); \
static int use_op_itself_##op_type##_##cpu UNUSED = \
static int use_op_itself_##op_type##_##cpu __attribute__((unused)) = \
TouchOpRegistrar_##op_type##_##cpu()
#else
#define LOAD_CPU_OP(op_type)
......@@ -29,7 +26,7 @@ limitations under the License. */
#ifdef PADDLE_MOBILE_CL
#define LOAD_GPU_CL_OP(op_type) \
extern int TouchOpRegistrar_##op_type##_##cl(); \
static int use_op_itself_##op_type##_##cl UNUSED = \
static int use_op_itself_##op_type##_##cl __attribute__((unused)) = \
TouchOpRegistrar_##op_type##_##cl()
#else
#define LOAD_GPU_CL_OP(op_type)
......@@ -38,7 +35,7 @@ limitations under the License. */
#ifdef PADDLE_MOBILE_FPGA
#define LOAD_FPGA_OP(op_type) \
extern int TouchOpRegistrar_##op_type##_##fpga(); \
static int use_op_itself_##op_type##_##fpga UNUSED = \
static int use_op_itself_##op_type##_##fpga __attribute__((unused)) = \
TouchOpRegistrar_##op_type##_##fpga()
#else
#define LOAD_FPGA_OP(op_type)
......@@ -46,7 +43,7 @@ limitations under the License. */
#define LOAD_FUSION_MATCHER(op_type) \
extern int TouchFusionMatcherRegistrar_##op_type(); \
static int use_fusion_matcher_itself_##op_type UNUSED = \
static int use_fusion_matcher_itself_##op_type __attribute__((unused)) = \
TouchFusionMatcherRegistrar_##op_type();
#define LOAD_OP(op_type) \
......
......@@ -549,12 +549,16 @@ if (ENABLE_ALL_TEST)
ADD_EXECUTABLE(test-net-performance net/test_net_performance.cpp test_helper.h test_include.h executor_for_test.h)
target_link_libraries(test-net-performance paddle-mobile)
ADD_EXECUTABLE(test-inference-ercy net/test_inference_ercy.cpp test_helper.h test_include.h executor_for_test.h)
target_link_libraries(test-inference-api-v2 paddle-mobile)
# ADD_EXECUTABLE(test-inference-ercy net/test_inference_ercy.cpp test_helper.h test_include.h executor_for_test.h)
# target_link_libraries(test-inference-api-v2 paddle-mobile)
if (GPU_CL)
ADD_EXECUTABLE(test-net-male2fe net/test_mobilenet_male2fe.cpp test_helper.h test_include.h executor_for_test.h)
target_link_libraries(test-net-male2fe paddle-mobile)
ADD_EXECUTABLE(test-infer-m2fm net/test_inference_m2fm.cpp test_helper.h test_include.h executor_for_test.h)
target_link_libraries(test-infer-m2fm paddle-mobile)
endif()
endif ()
......@@ -566,6 +570,6 @@ else ()
ADD_EXECUTABLE(test-net-benchmark net/test_net_benchmark.cpp test_helper.h test_include.h)
target_link_libraries(test-net-benchmark paddle-mobile)
ADD_EXECUTABLE(test-inference-ercy net/test_inference_ercy.cpp test_helper.h test_include.h executor_for_test.h)
target_link_libraries(test-inference-api-v2 paddle-mobile)
# ADD_EXECUTABLE(test-inference-ercy net/test_inference_ercy.cpp test_helper.h test_include.h executor_for_test.h)
# target_link_libraries(test-inference-api-v2 paddle-mobile)
endif ()
......@@ -24,8 +24,8 @@ PaddleMobileConfig GetConfig() {
config.device = PaddleMobileConfig::kGPU_CL;
config.pre_post_type = PaddleMobileConfig::NONE_PRE_POST;
config.prog_file = "../models/m2fm/model";
config.param_file = "../models/m2fm/params";
config.prog_file = "../models/gan_yanlong_check2/model";
config.param_file = "../models/gan_yanlong_check2/params";
config.lod_mode = false;
config.load_when_predict = false;
return config;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册