-
Notifications
You must be signed in to change notification settings - Fork 582
feat(pd): support dpa2/dpa3 C++ inference #4870
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
Merged
njzjz
merged 36 commits into
deepmodeling:devel
from
HydrogenSulfate:support_dpa2/3_infernce
Aug 8, 2025
Merged
Changes from 31 commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
d2a46b7
update for dpa3_dynamic debug code
HydrogenSulfate 8fe0df6
support DPA2/DPA3 inference
HydrogenSulfate c510815
fix code for view ops
HydrogenSulfate 3effbdb
refine code
HydrogenSulfate 38fb926
refine more code
HydrogenSulfate 4d3f99c
fix typing
HydrogenSulfate d6a3b1e
update code
HydrogenSulfate 55aeab3
update build_cc_pd.sh
HydrogenSulfate d967dfc
update file
HydrogenSulfate 94e5b7b
update code
HydrogenSulfate a1ebcde
fix fetch name
HydrogenSulfate 443230a
fix deeppotpd.cc
HydrogenSulfate 2bd6a3f
Merge branch 'support_comm_2' of https://github.com/HydrogenSulfate/d…
HydrogenSulfate ef21ec1
update code
HydrogenSulfate 8c106c7
update code for successfully run dpa2 C++ inference
HydrogenSulfate 76d3e8e
update setup.py
HydrogenSulfate a4eeac4
update build_cc_pd.sh and fix
HydrogenSulfate 038f4fe
fix yaml
HydrogenSulfate 552eff8
Merge remote-tracking branch 'upstream/devel' into support_dpa2/3_inf…
HydrogenSulfate f36ef86
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 9cd2c4a
restore EAGER_COMP_OP_BLACK_LIST
HydrogenSulfate b0eb30e
clean code
HydrogenSulfate d20ef07
Merge branch 'support_dpa2/3_infernce' of https://github.com/Hydrogen…
HydrogenSulfate 340596f
fix CMAKE
HydrogenSulfate 75c56b1
fix review
HydrogenSulfate a02d164
fix
HydrogenSulfate 1c03d45
update paddle inference code
HydrogenSulfate 6f3c323
fix
HydrogenSulfate 6f28b76
update UT files
HydrogenSulfate cb6d855
fix
HydrogenSulfate e698253
fix
HydrogenSulfate c2e337f
fix serialization
HydrogenSulfate 89743ff
fix
HydrogenSulfate 6c4309b
fix
HydrogenSulfate b929ae4
restore extended key to key
HydrogenSulfate 6417f8c
Merge branch 'devel' into support_dpa2/3_infernce
HydrogenSulfate File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| # SPDX-License-Identifier: LGPL-3.0-or-later | ||
| import importlib | ||
| from types import ( | ||
| ModuleType, | ||
| ) | ||
|
|
||
|
|
||
| def load_library(module_name: str) -> tuple[bool, ModuleType]: | ||
| """Load OP library and return the module if success. | ||
|
|
||
| Parameters | ||
| ---------- | ||
| module_name : str | ||
| Name of the module | ||
|
|
||
| Returns | ||
| ------- | ||
| bool | ||
| Whether the library is loaded successfully | ||
| ModuleType | ||
| loaded custom operator module | ||
| """ | ||
| if importlib.util.find_spec(module_name) is not None: | ||
| module = importlib.import_module(module_name) | ||
| return True, module | ||
|
|
||
| return False, None | ||
|
|
||
|
|
||
| ENABLE_CUSTOMIZED_OP, paddle_ops_deepmd = load_library("deepmd_op_pd") | ||
|
|
||
| __all__ = [ | ||
| "ENABLE_CUSTOMIZED_OP", | ||
| "paddle_ops_deepmd", | ||
| ] |
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.