Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor: refactor psi::memory namespace and add module_device in module_base #4141

Merged
merged 23 commits into from
May 20, 2024

Conversation

haozhihan
Copy link
Collaborator

Reminder

  • Have you linked an issue with this pull request?
  • Have you added adequate unit tests and/or case tests for your pull request?

Linked Issue

Close #4095

Details

  • We have noticed that the current code for heterogeneous computing heavily relies on the device and memory related functions under the module_psi/kernel/ folder.
  • But these functions have gradually begun to serve the heterogeneous computing code of various parts in the entire Abacus software.

Therefore, the naming of the namespaces in module_psi/kernel/ code is no longer reasonable, the dependency relationships between modules are no longer reasonable, and the storage location is even more unreasonable.

Based on the above situation, I have refactored the code related heterogeneous computing in module_psi/kernel/.

@mohanchen mohanchen added High Priority Bugs which needs to be fixed ASAP. Refactor Refactor ABACUS codes and removed High Priority Bugs which needs to be fixed ASAP. labels May 10, 2024
@mohanchen
Copy link
Collaborator

device

@denghuilu
Copy link
Member

denghuilu commented May 12, 2024

LGTM! However, I find the namespace base_device a bit confusing since it's not a common convention. I've never seen a namespace used like this before. Would it be possible to use ModuleBase::device instead? I believe it would be more straightforward and easier to understand where the related codes come from.

@mohanchen mohanchen added The Absolute Zero Reduce the "entropy" of the code to 0 and removed Refactor Refactor ABACUS codes labels May 12, 2024
@mohanchen mohanchen merged commit a97f9fd into deepmodeling:develop May 20, 2024
13 checks passed
@haozhihan haozhihan deleted the Refactor/psi_device branch May 23, 2024 01:55
@caic99
Copy link
Member

caic99 commented Jun 12, 2024

@haozhihan Does the codes under source/module_psi/kernels is still required? If not so, please remove those files instead of commenting them out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
The Absolute Zero Reduce the "entropy" of the code to 0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move the common code about Heterogeneous Computing from module_psi to module_base
4 participants