From 4db43c6c9f9962d163efd0afcb13e4cf10acfe45 Mon Sep 17 00:00:00 2001 From: Yu Yang Date: Wed, 2 May 2018 14:47:02 +0800 Subject: [PATCH] Naive implement cblas --- paddle/fluid/operators/math/blas_impl.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/paddle/fluid/operators/math/blas_impl.h b/paddle/fluid/operators/math/blas_impl.h index 4934afd8bb1..f6d66697658 100644 --- a/paddle/fluid/operators/math/blas_impl.h +++ b/paddle/fluid/operators/math/blas_impl.h @@ -24,17 +24,23 @@ struct CBlas; template <> struct CBlas { - static constexpr auto GEMM = cblas_sgemm; + template + static void GEMM(ARGS... args) { + cblas_sgemm(args...); + } }; template <> struct CBlas { - static constexpr auto GEMM = cblas_dgemm; + template + static void GEMM(ARGS... args) { + cblas_dgemm(args...); + } }; template <> struct CBlas { - void GEMM(...) { PADDLE_THROW("float16 GEMM not supported on CPU"); } + static void GEMM(...) { PADDLE_THROW("float16 GEMM not supported on CPU"); } }; template <> -- GitLab