From de856da9a6e5b052295cc5f1cfb9846be355328d Mon Sep 17 00:00:00 2001 From: tensor-tang Date: Mon, 9 Jul 2018 23:20:27 +0800 Subject: [PATCH] fix ColMajor and RowMajor replacement --- paddle/fluid/operators/math/blas_impl.h | 2 +- paddle/fluid/operators/math/math_function_test.cc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/paddle/fluid/operators/math/blas_impl.h b/paddle/fluid/operators/math/blas_impl.h index 020b5d86b17..6f188636ef1 100644 --- a/paddle/fluid/operators/math/blas_impl.h +++ b/paddle/fluid/operators/math/blas_impl.h @@ -178,7 +178,7 @@ void Blas::GEMM(CBLAS_TRANSPOSE transA, const int lda = M; const int ldb = K; const int ldc = M; - CBlas::SMM_GEMM(&transa, &transb, &M, &N, &K, &alpha, A, &lda, B, &ldb, + CBlas::SMM_GEMM(&transa, &transb, &N, &M, &K, &alpha, B, &ldb, A, &lda, &beta, C, &ldc); } else { #endif diff --git a/paddle/fluid/operators/math/math_function_test.cc b/paddle/fluid/operators/math/math_function_test.cc index 7aabb9981f7..71103be4929 100644 --- a/paddle/fluid/operators/math/math_function_test.cc +++ b/paddle/fluid/operators/math/math_function_test.cc @@ -82,8 +82,8 @@ void MklSmmCompare(int m, int n, int k) { const int lda = m; const int ldb = k; const int ldc = m; - paddle::operators::math::CBlas::SMM_GEMM(&transa, &transb, &m, &n, &k, - &alpha, A, &lda, B, &ldb, &beta, + paddle::operators::math::CBlas::SMM_GEMM(&transa, &transb, &n, &m, &k, + &alpha, B, &ldb, A, &lda, &beta, CSMM, &ldc); }; -- GitLab