Skip to content

Commit 5cab0d0

Browse files
committed
Fix compiling error
1 parent 0e0d7fb commit 5cab0d0

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

source/module_base/blas_connector.cpp

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ void BlasConnector::gemm(const char transa, const char transb, const int m, cons
9393
}
9494
#ifdef __DSP
9595
else if (device_type == base_device::AbacusDevice_t::DspDevice){
96-
sgemm_mt_(&transb, &transa, &n, &m, &k,
96+
sgemm_mth_(&transb, &transa, &n, &m, &k,
9797
&alpha, b, &ldb, a, &lda,
9898
&beta, c, &ldc, GlobalV::MY_RANK);
9999
}
@@ -111,7 +111,7 @@ void BlasConnector::gemm(const char transa, const char transb, const int m, cons
111111
}
112112
#ifdef __DSP
113113
else if (device_type == base_device::AbacusDevice_t::DspDevice){
114-
dgemm_mt_(&transb, &transa, &n, &m, &k,
114+
dgemm_mth_(&transb, &transa, &n, &m, &k,
115115
&alpha, b, &ldb, a, &lda,
116116
&beta, c, &ldc, GlobalV::MY_RANK);
117117
}
@@ -129,7 +129,7 @@ void BlasConnector::gemm(const char transa, const char transb, const int m, cons
129129
}
130130
#ifdef __DSP
131131
else if (device_type == base_device::AbacusDevice_t::DspDevice) {
132-
cgemm_mt_(&transb, &transa, &n, &m, &k,
132+
cgemm_mth_(&transb, &transa, &n, &m, &k,
133133
&alpha, b, &ldb, a, &lda,
134134
&beta, c, &ldc, GlobalV::MY_RANK);
135135
}
@@ -147,13 +147,22 @@ void BlasConnector::gemm(const char transa, const char transb, const int m, cons
147147
}
148148
#ifdef __DSP
149149
else if (device_type == base_device::AbacusDevice_t::DspDevice) {
150-
zgemm_mt_(&transb, &transa, &n, &m, &k,
150+
zgemm_mth_(&transb, &transa, &n, &m, &k,
151151
&alpha, b, &ldb, a, &lda,
152152
&beta, c, &ldc, GlobalV::MY_RANK);
153153
}
154154
#endif
155155
}
156156

157+
void BlasConnector::gemv(const char trans, const int m, const int n,
158+
const float alpha, const float* A, const int lda, const float* X, const int incx,
159+
const float beta, float* Y, const int incy, base_device::AbacusDevice_t device_type)
160+
{
161+
if (device_type == base_device::AbacusDevice_t::CpuDevice) {
162+
sgemv_(&trans, &m, &n, &alpha, A, &lda, X, &incx, &beta, Y, &incy);
163+
}
164+
}
165+
157166
void BlasConnector::gemv(const char trans, const int m, const int n,
158167
const double alpha, const double* A, const int lda, const double* X, const int incx,
159168
const double beta, double* Y, const int incy, base_device::AbacusDevice_t device_type)

0 commit comments

Comments
 (0)