Skip to content

[Refactor] Remove dead runtime-device memory wrappers - #8040

Merged
mohanchen merged 1 commit into
deepmodeling:developfrom
Cstandardlib:fix/remove-dead-device-memory-wrappers
Sep 29, 2026
Merged

mohanchen merged 1 commit into
deepmodeling:developfrom
Cstandardlib:fix/remove-dead-device-memory-wrappers

Conversation

@Cstandardlib

@Cstandardlib Cstandardlib commented Sep 28, 2026 •

Copy link
Copy Markdown
Collaborator

Linked Issue

Fix #8039

What's changed?

Delete the five AbacusDevice_t-keyed wrappers (resize_memory, set_memory, synchronize_memory, cast_memory, delete_memory). They have no call site in the tree or anywhere in the history, and their runtime device dispatch duplicated the compile-time *_op templates, which is why the defective `||` conditions behind #7553 went unnoticed.

Also drop #7941's explicit instantiations, the then-unused tool_quit.h include, and the dispatch tests that exercised the removed API. The *_op struct templates are untouched.

   Remove the five AbacusDevice_t-keyed memory wrappers and their tests;
   they have no call site in the tree or in the history.

   Refs deepmodeling#8039
Copilot AI lite review requested due to automatic review settings September 28, 2026 09:39

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

No unresolved blocking issues were identified.

Review effort: Lite
Findings: None

What changed in this PR

Removes unused runtime-device memory wrappers while retaining compile-time *_op templates.

Changes:

  • Removed wrapper declarations, implementations, and explicit instantiations.
  • Removed the obsolete tool_quit.h include.
  • Removed tests for the deleted wrapper API.
File Description
source/​source_base/​module_device/​test/​memory_test.cpp Removes tests for deleted wrappers.
source/​source_base/​module_device/​memory_op.h Removes runtime wrapper declarations.
source/​source_base/​module_device/​memory_op.cpp Removes wrapper implementations and instantiations.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@mohanchen mohanchen added Refactor Refactor ABACUS codes GPU & DCU & HPC GPU and DCU and HPC related any issues labels Sep 29, 2026
@mohanchen
mohanchen merged commit 8e25e9f into deepmodeling:develop Sep 29, 2026
30 checks passed
@Cstandardlib
Cstandardlib deleted the fix/remove-dead-device-memory-wrappers branch September 29, 2026 06:01
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.

Dead runtime-device memory wrappers in memory_op

3 participants