Skip to content

Commit 6576614

Browse files
committed
Fix bug 2
1 parent 99a6c02 commit 6576614

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

source/module_base/kernels/dsp/dsp_connector.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,12 @@ void cgemm_mth_(const char *transa, const char *transb,
6868

6969
// The next is dsp utils. It may be moved to other files if this file get too huge
7070

71-
base_device::DEVICE_CPU* cpu_ctx = {};
7271
base_device::AbacusDevice_t device = {};
7372

7473
template <typename T>
75-
void dsp_dav_subspace_reduce(T* hcc, T* scc, int nbase_x, int notconv, MPI_Comm diag_comm){
74+
void dsp_dav_subspace_reduce(T* hcc, T* scc, nbase, int nbase_x, int notconv, MPI_Comm diag_comm){
7675

77-
using syncmem_complex_op = base_device::memory::synchronize_memory_op<T, Device, Device>;
76+
using syncmem_complex_op = base_device::memory::synchronize_memory_op<T, DEVICE_CPU, DEVICE_CPU>;
7877

7978
auto* swap = new T[notconv * nbase_x];
8079
auto* target = new T[notconv * nbase_x];

source/module_hsolver/diago_dav_subspace.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ void Diago_DavSubspace<T, Device>::cal_elem(const int& dim,
447447
{
448448
#ifdef __DSP
449449
// Only on dsp hardware need an extra space to reduce data
450-
dsp_dav_subspace_reduce(hcc, scc, this->nbase_x, this->notconv, this->diag_comm.comm);
450+
dsp_dav_subspace_reduce(hcc, scc, nbase, this->nbase_x, this->notconv, this->diag_comm.comm);
451451
#else
452452
auto* swap = new T[notconv * this->nbase_x];
453453

0 commit comments

Comments
 (0)