Skip to content

Commit 2b0b921

Browse files
author
dyzheng
committed
Fix(build): remove memory.h dependency from psi.cpp
Removed ModuleBase::Memory::record calls that depended on the deleted source_base/memory.h file. The develop branch refactored memory recording to use base_device::information::record_device_memory instead. This fix resolves the compilation error after removing refactored files.
1 parent 2d3cbae commit 2b0b921

1 file changed

Lines changed: 0 additions & 8 deletions

File tree

source/source_psi/psi.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#include "psi.h"
22

33
#include "source_base/global_variable.h"
4-
#include "source_base/memory.h"
54
#include "source_base/module_device/device.h"
65
#include "source_base/tool_quit.h"
76
#include "source_io/module_parameter/parameter.h"
@@ -385,25 +384,18 @@ void Psi<T, Device>::resize(const int nks_in, const int nbands_in, const int nba
385384
delete[] psi_cpu_;
386385
}
387386
psi_cpu_ = new T[total_size]();
388-
ModuleBase::Memory::record("Psi::psi_cpu", sizeof(T) * total_size);
389387
psi_cpu_owned_ = true;
390388
}
391389

392390
const size_t k_size = static_cast<size_t>(nbands_in) * nbasis_in;
393391
resize_memory_op()(this->psi, k_size, "no_record");
394-
#if defined(__CUDA) || defined(__ROCM)
395-
ModuleBase::Memory::record_gpu("Psi::psi_gpu_k", sizeof(T) * k_size);
396-
#endif
397392

398393
psi_gpu_buffer_ = this->psi;
399394
current_k_gpu_ = -1;
400395
}
401396
else
402397
{
403398
resize_memory_op()(this->psi, nks_in * static_cast<std::size_t>(nbands_in) * nbasis_in, "no_record");
404-
#if defined(__CUDA) || defined(__ROCM)
405-
ModuleBase::Memory::record_gpu("Psi_PW", sizeof(T) * nks_in * static_cast<std::size_t>(nbands_in) * nbasis_in);
406-
#endif
407399
}
408400

409401
this->nk = nks_in;

0 commit comments

Comments
 (0)