diff --git a/mobile/src/framework/load_ops.h b/mobile/src/framework/load_ops.h index 536ab11313528830bf8ec73f68581fba44509f0e..e04db5d1e8d6e2a75343cbee15269d607f71b7c9 100755 --- a/mobile/src/framework/load_ops.h +++ b/mobile/src/framework/load_ops.h @@ -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) \ diff --git a/mobile/test/CMakeLists.txt b/mobile/test/CMakeLists.txt index 6dddeb47f6e33446d136a8d1301834aa17fceeb8..16f2f9b0de9e73742e191486f765195e60793825 100644 --- a/mobile/test/CMakeLists.txt +++ b/mobile/test/CMakeLists.txt @@ -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 () diff --git a/mobile/test/net/test_inference_m2fm.cpp b/mobile/test/net/test_inference_m2fm.cpp index fe03c99cda992b06c49e0165ad64d8289f165880..b40c81ee544346e2db947b2c4a3a990d90d6f666 100644 --- a/mobile/test/net/test_inference_m2fm.cpp +++ b/mobile/test/net/test_inference_m2fm.cpp @@ -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;