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

[Paddle Backend] Support GPU train/test/inference/LAMMPS with PaddlePaddle backend for water se_e2_a(revert code format) #3078

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
df60692
Add the Paddle version of Ener model(Ener fit/Descrpt se_a),lr,loss
zhwesky2010 Apr 10, 2021
a4adb02
fix Ener model double grad
zhwesky2010 Apr 10, 2021
f060845
add paddle version of prod_env_mat_a
JiabinYang Apr 10, 2021
1648829
remove addtional log
JiabinYang Apr 10, 2021
b9eadb4
Merge branch 'deemd2paddle' of https://github.com/JiabinYang/deepmd-k…
zhwesky2010 Apr 11, 2021
8e52aa7
add prod_force and prod_virtial op in paddle
JiabinYang Apr 11, 2021
98a0539
remove old file
JiabinYang Apr 11, 2021
4f2496b
remove additional change
JiabinYang Apr 11, 2021
a9bd2c7
remove additional change
JiabinYang Apr 11, 2021
ffd165c
add ut and ut used kernel for prod and virial
JiabinYang Apr 11, 2021
c7723e5
rename test
JiabinYang Apr 11, 2021
7cb1c94
Merge branch 'deemd2paddle' of https://github.com/JiabinYang/deepmd-k…
zhwesky2010 Apr 12, 2021
5bd354c
rename test
JiabinYang Apr 12, 2021
d596c18
Merge branch 'api' of https://github.com/deepmodeling/deepmd-kit into…
JiabinYang Apr 12, 2021
604ee62
Merge branch 'deemd2paddle' of https://github.com/JiabinYang/deepmd-k…
zhwesky2010 Apr 12, 2021
c24e33e
support GPU backward of force and virial
JiabinYang Apr 13, 2021
9426f1c
Merge pull request #499 from JiabinYang/deemd2paddle
amcadmus Apr 13, 2021
5e4795b
Add Ener Model for Paddle
zhwesky2010 Apr 13, 2021
0031e55
Merge branch 'deemd2paddle' of https://github.com/JiabinYang/deepmd-k…
zhwesky2010 Apr 13, 2021
dcb1631
temp support gpu with cpu kernel on virial
JiabinYang Apr 14, 2021
dde23ee
renew api usage to fit latest paddle
JiabinYang Apr 14, 2021
e988870
Merge pull request #512 from JiabinYang/deemd2paddle
amcadmus Apr 14, 2021
13b8e6f
Add Ener Model for Paddle
zhwesky2010 Apr 15, 2021
f813c77
fix Ener Model Infer
zhwesky2010 Apr 18, 2021
ddcb9d7
Merge pull request #529 from zhouwei25/deepmd2paddle
amcadmus Apr 19, 2021
7f3802f
fix error in cpu mode
JiabinYang Apr 22, 2021
f1bccb1
Merge pull request #556 from JiabinYang/fix_prod_mat_env_a_cpu
amcadmus Apr 22, 2021
87effc5
support jist save load
JiabinYang May 7, 2021
4b24e1f
Merge pull request #597 from JiabinYang/support_jit_save_load
amcadmus May 7, 2021
9a92b7f
fix change device error code
JiabinYang Jun 21, 2021
55670b2
Merge pull request #779 from JiabinYang/change_device
amcadmus Jun 22, 2021
75f96f4
[Paddle] Fixed model save issues with Ener model
jim19930609 Jul 20, 2021
a87e7b3
Merge pull request #870 from jim19930609/paddle
amcadmus Jul 20, 2021
156c0d3
Force env_mat force_se_a virial_se_a to fallback on CPU
jim19930609 Jul 23, 2021
d55286d
Merge pull request #880 from jim19930609/paddle
amcadmus Jul 23, 2021
45a2962
Revert "Force env_mat force_se_a virial_se_a to fallback on CPU"
jim19930609 Oct 22, 2021
e5aeb25
Merge pull request #1230 from jim19930609/paddle
amcadmus Oct 25, 2021
fc78e6d
update reprod water_se2_a code
HydrogenSulfate Nov 7, 2023
0af71a0
update ugly but runnable code
HydrogenSulfate Nov 26, 2023
4689924
refine code
HydrogenSulfate Nov 26, 2023
0fd9f23
fix for missing code
HydrogenSulfate Nov 27, 2023
0000512
add unitest code and fix for custom op installation in python
HydrogenSulfate Nov 27, 2023
03c1318
update README for unitest of python custom op
HydrogenSulfate Nov 27, 2023
46dbc9c
refine docs
HydrogenSulfate Nov 27, 2023
a38d4f0
polish code
HydrogenSulfate Nov 28, 2023
dc5f2a1
update CPU train and content in RAEDME
HydrogenSulfate Nov 28, 2023
9fc9a67
merge old paddle branch
HydrogenSulfate Nov 28, 2023
6c290a2
remove old code cuz merge
HydrogenSulfate Nov 28, 2023
1b60bfd
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Nov 28, 2023
4eeb08a
remove C++ inference dependency of tensorflow and add more buffer
HydrogenSulfate Nov 30, 2023
095d493
Merge branch 'add_ddle_backend_polish_ver' of https://github.com/Hydr…
HydrogenSulfate Nov 30, 2023
9f71be9
update README
HydrogenSulfate Dec 1, 2023
1a5332c
revert pre-commit config the same as deepmd official
HydrogenSulfate Dec 21, 2023
437b3d8
revert code style as pre-commit configured
HydrogenSulfate Dec 21, 2023
4991b3d
remove paddle_ops.egg-info
HydrogenSulfate Dec 21, 2023
eecad82
remove redundant annotations
HydrogenSulfate Dec 21, 2023
6cb8685
remove all redundant annotations
HydrogenSulfate Dec 21, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ repos:
- id: clang-format
exclude: ^source/3rdparty|source/lib/src/cuda/cudart/.+\.inc
# CSS
- repo: https://github.com/pre-commit/mirrors-csslint
rev: v1.0.5
hooks:
- id: csslint
# - repo: https://github.com/pre-commit/mirrors-csslint
# rev: v1.0.5
# hooks:
# - id: csslint
# Shell
- repo: https://github.com/scop/pre-commit-shfmt
rev: v3.6.0-2
Expand Down
343 changes: 269 additions & 74 deletions README.md

Large diffs are not rendered by default.

22 changes: 12 additions & 10 deletions deepmd/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@

from deepmd.env import (
GLOBAL_NP_FLOAT_PRECISION,
GLOBAL_PD_FLOAT_PRECISION,
GLOBAL_TF_FLOAT_PRECISION,
op_module,
paddle,
tf,
)
from deepmd.utils.path import (
Expand All @@ -50,11 +52,11 @@

# define constants
PRECISION_DICT = {
"default": GLOBAL_TF_FLOAT_PRECISION,
"float16": tf.float16,
"float32": tf.float32,
"float64": tf.float64,
"bfloat16": tf.bfloat16,
"default": GLOBAL_PD_FLOAT_PRECISION,
"float16": paddle.float16,
"float32": paddle.float32,
"float64": paddle.float64,
"bfloat16": paddle.bfloat16,
}


Expand Down Expand Up @@ -119,11 +121,11 @@ def gelu_wrapper(x):
data_requirement = {}

ACTIVATION_FN_DICT = {
"relu": tf.nn.relu,
"relu6": tf.nn.relu6,
"softplus": tf.nn.softplus,
"sigmoid": tf.sigmoid,
"tanh": tf.nn.tanh,
"relu": paddle.nn.functional.relu,
"relu6": paddle.nn.functional.relu6,
"softplus": paddle.nn.functional.softplus,
"sigmoid": paddle.nn.functional.sigmoid,
"tanh": paddle.nn.functional.tanh,
"gelu": gelu,
"gelu_tf": gelu_tf,
"None": None,
Expand Down
Loading
Loading