diff --git a/paddle/fluid/operators/math/blas_impl.h b/paddle/fluid/operators/math/blas_impl.h index 020b5d86b17561bc4945d05f1b980dd50ed5ec56..6f188636ef101f473e9112bde9bf17e1bd0e2515 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 7aabb9981f766850f14631eb3c257ad481d8d36c..71103be492939c7a434f44f165087206a2b2972a 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); };