From c2147606252f54b19e7a5f7820f7ca1c57c77b96 Mon Sep 17 00:00:00 2001 From: liuruilong Date: Mon, 24 Dec 2018 20:20:44 +0800 Subject: [PATCH] modify unit testC --- src/operators/math/gemm.cpp | 5 +++++ test/framework/test_load.cpp | 7 ++++--- test/net/test_super.cpp | 4 ++-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/operators/math/gemm.cpp b/src/operators/math/gemm.cpp index 3c901330dc..10f74fcd42 100644 --- a/src/operators/math/gemm.cpp +++ b/src/operators/math/gemm.cpp @@ -1188,6 +1188,11 @@ void Gemm::WriteWithBnAddRelu(int mc, int nc, float *c, float *C, int ldc, } } +void Gemm::VectorKernel(int m, int n, int k, float alpha, const float *A, + int lda, const float *B, int ldb, float beta, float *C, + int ldc, bool relu) { +} + #else void Gemm::AddDot4x4(int k, const float *a, const float *b, float *c, int ldc) { diff --git a/test/framework/test_load.cpp b/test/framework/test_load.cpp index 3d1b6af935..05db0c345e 100644 --- a/test/framework/test_load.cpp +++ b/test/framework/test_load.cpp @@ -23,10 +23,11 @@ int main() { // ../../../test/models/googlenet // ../../../test/models/mobilenet - // auto program = loader.Load(g_mobilenet_ssd, true); + std::string g_super = "../models/superresoltion"; + // auto program = loader.Load(g_super, true); - // auto program = loader.Load(std::string(g_ocr) + "/model", - // std::string(g_ocr) + "/params", false); + auto program = loader.Load(std::string(g_super) + "/model", + std::string(g_super) + "/params", false); // program.originProgram->Description("program desc: "); return 0; diff --git a/test/net/test_super.cpp b/test/net/test_super.cpp index 1ee1fc0f85..dd77de3fbd 100644 --- a/test/net/test_super.cpp +++ b/test/net/test_super.cpp @@ -18,7 +18,7 @@ limitations under the License. */ #include "../test_include.h" int main() { - paddle_mobile::PaddleMobile paddle_mobile; + paddle_mobile::PaddleMobile paddle_mobile; // paddle_mobile.SetThreadNum(4); auto time1 = paddle_mobile::time(); #ifdef PADDLE_MOBILE_CL @@ -42,7 +42,7 @@ int main() { std::vector vec_result; auto time3 = paddle_mobile::time(); - int max = 10; + int max = 1; for (int i = 0; i < max; ++i) { vec_result = paddle_mobile.Predict(input, dims); } -- GitLab