diff --git a/src/cpu/primitives.cc b/src/cpu/primitives.cc index e247f01c9..0c6377bbb 100644 --- a/src/cpu/primitives.cc +++ b/src/cpu/primitives.cc @@ -692,6 +692,21 @@ namespace ctranslate2 { } #endif +#ifdef CT2_WITH_OPENBLAS + case cpu::GemmBackend::OPENBLAS: { + cblas_sgemm(CblasRowMajor, + transpose_a ? CblasTrans : CblasNoTrans, + transpose_b ? CblasTrans : CblasNoTrans, + m, n, k, + alpha, + a, lda, + b, ldb, + beta, + c, ldc); + break; + } +#endif + #ifdef CT2_WITH_RUY case cpu::GemmBackend::RUY: { if (lda != (transpose_a ? m : k) @@ -746,21 +761,6 @@ namespace ctranslate2 { } #endif -#ifdef CT2_WITH_OPENBLAS - case cpu::GemmBackend::OPENBLAS: { - cblas_sgemm(CblasRowMajor, - transpose_a ? CblasTrans : CblasNoTrans, - transpose_b ? CblasTrans : CblasNoTrans, - m, n, k, - alpha, - a, lda, - b, ldb, - beta, - c, ldc); - break; - } -#endif - default: throw std::runtime_error("No SGEMM backend on CPU"); }