Fix: port sdft memory op to DSP#7203
Merged
mohanchen merged 3 commits intodeepmodeling:developfrom Apr 2, 2026
Merged
Conversation
There was a problem hiding this comment.
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_mtunder__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
approved these changes
Apr 2, 2026
Collaborator
mohanchen
left a comment
There was a problem hiding this comment.
Great! Thanks for your contribution!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Linked Issue
Fix #6746, #6748, #6763, #6773
What's changed?
Note
#6746: Fixed by mtBLAS library on DSP device.