From d30c314e1cfd53940f85047e64e5ca2bd5869866 Mon Sep 17 00:00:00 2001 From: yangfei Date: Fri, 10 Aug 2018 11:17:02 +0800 Subject: [PATCH] add gemm merge function C = A * B +bias --- src/operators/math/math_function.h | 4 ++-- test/common/test_gemm_perf.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/operators/math/math_function.h b/src/operators/math/math_function.h index 0f281e7134..e3184e33bd 100644 --- a/src/operators/math/math_function.h +++ b/src/operators/math/math_function.h @@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ -#pragma oncenki +#pragma once #include #include "framework/tensor.h" @@ -24,7 +24,7 @@ namespace math { template void matmul(const framework::Tensor &matrix_a, bool trans_a, const framework::Tensor &matrix_b, bool trans_b, T alpha, - framework::Tensor *matrix_out, T beta, bool relu, float *bias); + framework::Tensor *matrix_out, T beta, bool relu = false, float *bias = nullptr); template void matmulWithBn(const framework::Tensor &matrix_a, bool trans_a, diff --git a/test/common/test_gemm_perf.cpp b/test/common/test_gemm_perf.cpp index 9b62ffe9e1..c505c61fce 100644 --- a/test/common/test_gemm_perf.cpp +++ b/test/common/test_gemm_perf.cpp @@ -51,7 +51,7 @@ int main() { for (int j = 0; j < 10; ++j) { paddle_mobile::operators::math::matmul( aa, false, bb, false, static_cast(1), &cc, static_cast(0), - false, ccptr); + false, biasptr); // paddle_mobile::operators::math::matmulWithBn( // aa, false, bb, false, static_cast(1), &cc, -- GitLab