Skip to content

Fix: port sdft memory op to DSP#7203

Merged
mohanchen merged 3 commits intodeepmodeling:developfrom
Cstandardlib:dsp/sdft
Apr 2, 2026
Merged

Fix: port sdft memory op to DSP#7203
mohanchen merged 3 commits intodeepmodeling:developfrom
Cstandardlib:dsp/sdft

Conversation

@Cstandardlib
Copy link
Copy Markdown
Collaborator

@Cstandardlib Cstandardlib commented Apr 1, 2026

Linked Issue

Fix #6746, #6748, #6763, #6773

What's changed?

  • Port code to DSP: use op_mt for temporary memory in stochastic DFT module.

Note

#6746: Fixed by mtBLAS library on DSP device.

Copilot AI review requested due to automatic review settings April 1, 2026 13:13
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

Ports temporary-memory operations in the stochastic DFT (sDFT) PW module to DSP-specific multi-threaded memory ops (*_op_mt) when building with __DSP, aligning sDFT’s allocations with the DSP memory-management approach used elsewhere in the codebase.

Changes:

  • Switch sDFT temporary memory helpers to resize_memory_op_mt / set_memory_op_mt / delete_memory_op_mt under __DSP.
  • Keep non-DSP builds using the existing resize_memory_op / set_memory_op / delete_memory_op.
  • Minor docstring whitespace cleanup in sto_iter.h.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
source/source_pw/module_stodft/sto_stress_pw.h Uses DSP *_op_mt memory ops for stress-related temporary allocations under __DSP.
source/source_pw/module_stodft/sto_iter.h Uses DSP *_op_mt memory ops for iteration temporary allocations under __DSP and cleans comment whitespace.
source/source_pw/module_stodft/sto_forces.h Uses DSP *_op_mt memory ops for force-related temporary allocations under __DSP.
source/source_pw/module_stodft/sto_elecond.h Uses DSP *_op_mt memory ops for conductivity-related temporary allocations under __DSP.
source/source_pw/module_stodft/sto_che.h Uses DSP *_op_mt memory ops for Chebyshev-related temporary allocations under __DSP.

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

@mohanchen mohanchen added Refactor Refactor ABACUS codes Bugs Bugs that only solvable with sufficient knowledge of DFT GPU & DCU & HPC GPU and DCU and HPC related any issues labels Apr 2, 2026
Copy link
Copy Markdown
Collaborator

@mohanchen mohanchen left a comment

Choose a reason for hiding this comment

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

Great! Thanks for your contribution!

@mohanchen mohanchen merged commit 6289c6b into deepmodeling:develop Apr 2, 2026
15 checks passed
@Cstandardlib Cstandardlib deleted the dsp/sdft branch April 2, 2026 02:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bugs Bugs that only solvable with sufficient knowledge of DFT 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.

[Bug] DSP Severe Energy Fluctuation and Numerical Divergence in SCF Iteration

3 participants