Skip to content

Fix: use correct \psi for GPU in cal_tau for ELF#7378

Open
Flying-dragon-boxing wants to merge 3 commits into
deepmodeling:developfrom
Flying-dragon-boxing:260506-gpuelf
Open

Fix: use correct \psi for GPU in cal_tau for ELF#7378
Flying-dragon-boxing wants to merge 3 commits into
deepmodeling:developfrom
Flying-dragon-boxing:260506-gpuelf

Conversation

@Flying-dragon-boxing
Copy link
Copy Markdown
Collaborator

Previous ELF fix failed for GPUs. Fix this by using correct template variables.

@mohanchen mohanchen added GPU & DCU & HPC GPU and DCU and HPC related any issues Refactor Refactor ABACUS codes labels May 24, 2026
@Flying-dragon-boxing Flying-dragon-boxing marked this pull request as ready for review May 27, 2026 05:59
Copilot AI review requested due to automatic review settings May 27, 2026 05:59
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes ELF kinetic energy density (tau) computation in the PW Kohn–Sham solver on GPU by calling cal_tau with the correctly-typed/device-resident psi object rather than the CPU psi buffer.

Changes:

  • Update ESolver_KS_PW::after_scf() to compute tau using Setup_Psi_pw::get_psi_t<T, Device>() (device/precision-correct wavefunction storage).
  • Route the call to elecstate::ElecStatePW<T, Device>::cal_tau() to ensure the intended PW implementation is invoked for GPU/single-precision paths.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

GPU & DCU & HPC GPU and DCU and HPC related any issues Refactor Refactor ABACUS codes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants