@@ -369,6 +369,7 @@ void ElecStatePW<T, Device>::cal_becsum(const psi::Psi<T, Device>& psi)
369369 }
370370 else
371371 {
372+ // TODO: gather auxk from becp on device to skip the H2D→fill→D2H round-trip
372373 for (int ih = 0 ; ih < nh_atom; ih++)
373374 {
374375 const int ikb = this ->ppcell ->indv_ijkb0 [iat] + ih;
@@ -453,6 +454,7 @@ void ElecStatePW<T, Device>::add_usrho(const psi::Psi<T, Device>& psi)
453454 std::vector<T> rhog_host (this ->rhopw_smooth ->npw );
454455 syncmem_complex_d2h_op ()(rhog_host.data (), this ->rhog [is], this ->rhopw_smooth ->npw );
455456 // CPU real2recip
457+ // TODO: replace with cufft to keep rho/rhog on device
456458 this ->rhopw_smooth ->real2recip (rho_host.data (), rhog_host.data ());
457459 // H2D rhog back to device
458460 syncmem_complex_h2d_op ()(this ->rhog [is], rhog_host.data (), this ->rhopw_smooth ->npw );
@@ -496,6 +498,7 @@ void ElecStatePW<T, Device>::addusdens_g(const Real* becsum, T** rhog)
496498 const std::complex <double > ci_tpi = ModuleBase::NEG_IMAG_UNIT * ModuleBase::TWO_PI ;
497499
498500 // ---------- all on CPU ----------
501+ // TODO: port skk/tbecsum construction and radial_fft_q to device
499502 std::vector<double > qmod_host (npw);
500503 std::vector<std::complex <double >> qgm_host (npw);
501504 for (int ig = 0 ; ig < npw; ig++)
0 commit comments