From 7ba78e427d750183da2f7f1995386bcb05db1564 Mon Sep 17 00:00:00 2001 From: xiebaiyuan Date: Tue, 22 Jan 2019 15:20:33 +0800 Subject: [PATCH] support gpu mobilenet single build fixed #1404 --- src/operators/kernel/cl/relu_kernel.cpp | 2 +- test/CMakeLists.txt | 4 ++++ test/net/test_mobilenet_GPU.cpp | 8 ++++---- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/operators/kernel/cl/relu_kernel.cpp b/src/operators/kernel/cl/relu_kernel.cpp index c3acfe4422..dcd1275e3c 100644 --- a/src/operators/kernel/cl/relu_kernel.cpp +++ b/src/operators/kernel/cl/relu_kernel.cpp @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ #ifdef RELU_OP -#include "operators/kernel/relu_kernel.h" +#include "operators/kernel/activation_kernel.h" namespace paddle_mobile { namespace operators { diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 75ad5348aa..3128c003e2 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -30,6 +30,10 @@ if (CON GREATER -1) target_link_libraries(test-mobilenet-combine paddle-mobile) set(FOUND_MATCH ON) + # gen test + ADD_EXECUTABLE(test-mobilenetgpu net/test_mobilenet_GPU.cpp test_helper.h test_include.h) + target_link_libraries(test-mobilenetgpu paddle-mobile) + endif () list(FIND NET "yolo" CON) diff --git a/test/net/test_mobilenet_GPU.cpp b/test/net/test_mobilenet_GPU.cpp index e410baf776..22ff12f592 100644 --- a/test/net/test_mobilenet_GPU.cpp +++ b/test/net/test_mobilenet_GPU.cpp @@ -25,11 +25,11 @@ int main() { paddle_mobile.SetCLPath("/data/local/tmp/bin"); #endif - auto isok = - paddle_mobile.Load(std::string(g_mobilenet_mul) + "/model", - std::string(g_mobilenet_mul) + "/params", true); + // auto isok = + // paddle_mobile.Load(std::string(g_mobilenet_mul) + "/model", + // std::string(g_mobilenet_mul) + "/params", true); - // auto isok = paddle_mobile.Load(std::string(g_mobilenet_mul), true); + auto isok = paddle_mobile.Load(std::string(g_mobilenet), true); if (isok) { auto time2 = paddle_mobile::time(); std::cout << "load cost :" << paddle_mobile::time_diff(time1, time2) << "ms" -- GitLab