diff --git a/src/io/paddle_mobile.cpp b/src/io/paddle_mobile.cpp index 8e4a72dcadf1bc5105e1fc5f9b8c96bfb6d9aa3d..6a773da00ff6541d55a6a9d04ca470fed5de81a1 100644 --- a/src/io/paddle_mobile.cpp +++ b/src/io/paddle_mobile.cpp @@ -122,9 +122,12 @@ void PaddleMobile::Clear() { executor_ = nullptr; loader_ = nullptr; } - template -double PaddleMobile::GetPredictTime() { +double PaddleMobile::GetPredictTime() {} + +#ifdef PADDLE_MOBILE_CPU +template <> +double PaddleMobile::GetPredictTime() { int m = 32; int n = 224 * 224; int k = 27; @@ -147,8 +150,8 @@ double PaddleMobile::GetPredictTime() { } paddle_mobile::operators::math::Gemm gemm; auto time1 = paddle_mobile::time(); - // gemm.Sgemm(m, n, k, static_cast(1), a, lda, b, ldb, - // static_cast(0), c, ldc, false, nullptr); + gemm.Sgemm(m, n, k, static_cast(1), a, lda, b, ldb, + static_cast(0), c, ldc, false, nullptr); auto time2 = paddle_mobile::time(); double cost = paddle_mobile::time_diff(time1, time2); paddle_mobile::memory::Free(a); @@ -156,6 +159,7 @@ double PaddleMobile::GetPredictTime() { paddle_mobile::memory::Free(c); return cost; } +#endif template PaddleMobile::~PaddleMobile() {