Skip to content

Commit 6c320fe

Browse files
committed
Replace all dav_subspace gemm kernels
1 parent b64fc01 commit 6c320fe

File tree

1 file changed

+30
-5
lines changed

1 file changed

+30
-5
lines changed

source/module_hsolver/diago_dav_subspace.cpp

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,12 @@ int Diago_DavSubspace<T, Device>::diag_once(const HPsiFunc& hpsi_func,
181181
// updata eigenvectors of Hamiltonian
182182
setmem_complex_op()(this->ctx, psi_in, 0, n_band * psi_in_dmax);
183183

184-
gemm_op<T, Device>()(this->ctx,
184+
#ifdef __DSP
185+
gemm_op_mt<T, Device>()
186+
#else
187+
gemm_op<T, Device>()
188+
#endif
189+
(this->ctx,
185190
'N',
186191
'N',
187192
this->dim,
@@ -307,7 +312,12 @@ void Diago_DavSubspace<T, Device>::cal_grad(const HPsiFunc& hpsi_func,
307312
delmem_real_op()(this->ctx, e_temp_hd);
308313
}
309314

310-
gemm_op<T, Device>()(this->ctx,
315+
#ifdef __DSP
316+
gemm_op_mt<T, Device>()
317+
#else
318+
gemm_op<T, Device>()
319+
#endif
320+
(this->ctx,
311321
'N',
312322
'N',
313323
this->dim,
@@ -391,7 +401,12 @@ void Diago_DavSubspace<T, Device>::cal_elem(const int& dim,
391401
{
392402
ModuleBase::timer::tick("Diago_DavSubspace", "cal_elem");
393403

394-
gemm_op<T, Device>()(this->ctx,
404+
#ifdef __DSP
405+
gemm_op_mt<T, Device>()
406+
#else
407+
gemm_op<T, Device>()
408+
#endif
409+
(this->ctx,
395410
'C',
396411
'N',
397412
nbase + notconv,
@@ -406,7 +421,12 @@ void Diago_DavSubspace<T, Device>::cal_elem(const int& dim,
406421
&hcc[nbase * this->nbase_x],
407422
this->nbase_x);
408423

409-
gemm_op<T, Device>()(this->ctx,
424+
#ifdef __DSP
425+
gemm_op_mt<T, Device>()
426+
#else
427+
gemm_op<T, Device>()
428+
#endif
429+
(this->ctx,
410430
'C',
411431
'N',
412432
nbase + notconv,
@@ -608,7 +628,12 @@ void Diago_DavSubspace<T, Device>::refresh(const int& dim,
608628
{
609629
ModuleBase::timer::tick("Diago_DavSubspace", "refresh");
610630

611-
gemm_op<T, Device>()(this->ctx,
631+
#ifdef __DSP
632+
gemm_op_mt<T, Device>()
633+
#else
634+
gemm_op<T, Device>()
635+
#endif
636+
(this->ctx,
612637
'N',
613638
'N',
614639
this->dim,

0 commit comments

Comments
 (0)