Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
a73324a
Merge master into devel (#2774)
wanghan-iapcm Sep 1, 2023
94fa534
lmp: support `unit real` (#2775)
njzjz Sep 2, 2023
d68c873
lmp: throw error for traditional installation if dependent packages a…
njzjz Sep 4, 2023
eb21aad
add linear models (#2781)
njzjz Sep 4, 2023
785f4d7
lmp: add the header for atomic model deviation (#2778)
njzjz Sep 4, 2023
b38a8fc
check status of allocate_temp (#2782)
njzjz Sep 4, 2023
8fbcaae
docs: improve checkpoint description (#2784)
njzjz Sep 5, 2023
211052c
fix dp test atomic polar; add UTs for dp test (#2785)
njzjz Sep 6, 2023
b1d87db
[pre-commit.ci] pre-commit autoupdate (#2787)
pre-commit-ci[bot] Sep 6, 2023
9712c13
lmp: add unit_style requirement for compute deeptensor/atom (#2790)
njzjz Sep 6, 2023
956adcb
do not sort atoms in dp test (#2794)
njzjz Sep 8, 2023
c6dea0c
lmp: `fix_dplr` use the same `type_map` from `pair_deepmd` (#2776)
njzjz Sep 8, 2023
c6829bc
check status of allocate_temp (#2797)
njzjz Sep 8, 2023
6e306fa
migrate Python build backend to scikit-build-core (#2798)
njzjz Sep 11, 2023
c858030
fix np.loadtxt DeprecationWarning (#2802)
njzjz Sep 12, 2023
b6ff8aa
support atomic/relative model deviation in CLI (#2801)
njzjz Sep 12, 2023
89d0278
docs: add doc to install cmake (#2805)
njzjz Sep 12, 2023
13d49bd
docs: add docs for addtional CMake arguments via pip (#2806)
njzjz Sep 12, 2023
8cd822e
ignore drdq when generalized force loss is not set (#2807)
njzjz Sep 12, 2023
445ec23
Bump docker/build-push-action from 4.1.1 to 4.2.1 (#2804)
dependabot[bot] Sep 12, 2023
70ccd41
[pre-commit.ci] pre-commit autoupdate (#2808)
pre-commit-ci[bot] Sep 13, 2023
959c129
drop old GCC versions in test (#2812)
njzjz Sep 13, 2023
3a98751
Bump actions/checkout from 3 to 4 (#2803)
dependabot[bot] Sep 13, 2023
a8b3123
`ndarray.tostring` -> `ndarray.tobytes` (#2814)
njzjz Sep 14, 2023
58dd3e2
`tf.accumulate_n` -> `tf.add_n` (#2815)
njzjz Sep 14, 2023
7da9aaf
`tf.test.TestCase.test_session` -> `tf.test.TestCase.cached_session` …
njzjz Sep 14, 2023
1a4a7ca
lmp: let fparam_do_compute not execute by default (#2819)
Yi-FanLi Sep 15, 2023
20a41d0
speed up GitHub Actions (#2822)
njzjz Sep 15, 2023
5591ed1
fix grammatical errors (#2796)
Yi-FanLi Sep 15, 2023
21db464
improve configurations of Python lint tools (#2823)
njzjz Sep 15, 2023
ab357f8
add citation for fparam (#2821)
njzjz Sep 15, 2023
0d5737f
make pairwise_dprc model work with MPI (#2818)
njzjz Sep 15, 2023
19c6a68
lmp: support other units for both pair deepmd and fix dplr (#2800)
Yi-FanLi Sep 18, 2023
c92d1f1
fix CTest (#2828)
njzjz Sep 18, 2023
0b46563
add tox configutation (#2829)
njzjz Sep 18, 2023
a597cc6
use parse_version from packaging.version instead of pkg_resources (#2…
njzjz Sep 18, 2023
b8a4771
add citation for `aparam` (#2825)
mingzhong15 Sep 18, 2023
ce7532a
Fix invalid escape sequence (#2820)
njzjz Sep 18, 2023
a735bed
make the pairwise DPRc model 2x faster (#2833)
njzjz Sep 19, 2023
de5cc29
Bump docker/build-push-action from 4.2.1 to 5.0.0 (#2835)
dependabot[bot] Sep 19, 2023
4a82b5f
Bump docker/metadata-action from 4.6.0 to 5.0.0 (#2836)
dependabot[bot] Sep 19, 2023
158eadd
Bump docker/setup-qemu-action from 2 to 3 (#2837)
dependabot[bot] Sep 19, 2023
0aae8e5
Bump docker/login-action from 2.2.0 to 3.0.0 (#2834)
dependabot[bot] Sep 19, 2023
339ce47
remove `_cuda` or `_rocm` suffix (#2839)
njzjz Sep 19, 2023
b34e5a3
[pre-commit.ci] pre-commit autoupdate (#2840)
pre-commit-ci[bot] Sep 20, 2023
338018c
merge CUDA and ROCm in header files (#2845)
njzjz Sep 20, 2023
fa2c0b6
merge CUDA and ROCm codes in tests (#2846)
njzjz Sep 20, 2023
7fb1d11
prod_env_mat: allocate GPU memory out of frame loop (#2832)
njzjz Sep 20, 2023
955df79
fix missing version file with setuptools-scm v8 (#2850)
njzjz Sep 21, 2023
80b2195
build linux-aarch64 wheel on self-hosted runner (#2851)
njzjz Sep 21, 2023
544875e
add test cuda workflow (#2848)
njzjz Sep 21, 2023
0f07afa
merge cuda and rocm files (#2844)
njzjz Sep 22, 2023
c35ab61
fix compatibility with NumPy 1.26 (#2853)
njzjz Sep 22, 2023
9d774a4
docs: rewrite coding conventions (#2855)
njzjz Sep 22, 2023
c2c6476
refactor convert (#2854)
njzjz Sep 22, 2023
e1ae5e0
cmake: use pip to install tensorflow (#2858)
njzjz Sep 25, 2023
aa3b58e
bump LAMMPS version to stable_2Aug2023_update1 (#2859)
njzjz Sep 25, 2023
ffe10f9
cmake: use modern `HIP` language (#2857)
njzjz Sep 25, 2023
67f30e0
fix finetune RMSE and memory issue (#2860)
njzjz Sep 25, 2023
e7a8876
fix the issue of applying modifier multiple times when batch set is l…
wanghan-iapcm Sep 26, 2023
938cea2
merge CUDA and ROCm codes in op (#2847)
njzjz Sep 26, 2023
5aca4bf
Bump pypa/cibuildwheel from 2.15 to 2.16 (#2861)
dependabot[bot] Sep 26, 2023
73a5362
[pre-commit.ci] pre-commit autoupdate (#2867)
pre-commit-ci[bot] Sep 26, 2023
218ff45
download cub using CMake FetchContent (#2870)
njzjz Sep 27, 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
4 changes: 2 additions & 2 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ Python:
Docs: doc/**/*
Examples: examples/**/*
Core: source/lib/**/*
CUDA: source/lib/src/cuda/**/*
ROCM: source/lib/src/rocm/**/*
CUDA: source/lib/src/gpu/**/*
ROCM: source/lib/src/gpu/**/*
OP: source/op/**/*
C++: source/api_cc/**/*
C: source/api_c/**/*
Expand Down
18 changes: 11 additions & 7 deletions .github/workflows/build_cc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,24 @@ jobs:
- variant: clang
dp_variant: clang
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: 'pip'
- uses: lukka/get-cmake@latest
- run: python -m pip install tensorflow
- run: sudo apt-get update && sudo apt-get install -y nvidia-cuda-toolkit
- run: |
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.0-1_all.deb \
&& sudo dpkg -i cuda-keyring_1.0-1_all.deb \
&& sudo apt-get update \
&& sudo apt-get -y install cuda-cudart-dev-11-8 cuda-nvcc-11-8
if: matrix.variant == 'cuda'
- run: |
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.0-1_all.deb \
&& sudo dpkg -i cuda-keyring_1.0-1_all.deb \
&& sudo apt-get update \
&& sudo apt-get -y install cuda-12-0
&& sudo apt-get -y install cuda-cudart-dev-12-0 cuda-nvcc-12-0
if: matrix.variant == 'cuda120'
env:
DEBIAN_FRONTEND: noninteractive
Expand All @@ -44,19 +48,19 @@ jobs:
&& sudo apt-get update \
&& sudo apt-get install -y rocm-dev hipcub-dev
if: matrix.variant == 'rocm'
- run: sudo apt-get update && sudo apt-get install -y clang
if: matrix.variant == 'clang'
- run: source/install/build_cc.sh
env:
DP_VARIANT: ${{ matrix.dp_variant }}
DOWNLOAD_TENSORFLOW: "FALSE"
CMAKE_GENERATOR: Ninja
if: matrix.variant != 'clang'
- run: source/install/build_cc.sh
env:
DP_VARIANT: cpu
DOWNLOAD_TENSORFLOW: "FALSE"
CC: clang
CXX: clang++
CMAKE_GENERATOR: Ninja
if: matrix.variant == 'clang'
- name: Test files exist
run: |
Expand Down
40 changes: 27 additions & 13 deletions .github/workflows/build_wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,24 @@ on:
pull_request:

jobs:
determine-arm64-runner:
runs-on: ubuntu-latest
permissions: read-all
outputs:
runner: ${{ steps.set-runner.outputs.runner }}
steps:
- name: Determine which runner to use for ARM64 build
id: set-runner
run: |
if [ "${{ github.repository_owner }}" == "deepmodeling" ]; then
echo "runner=[\"Linux\",\"ARM64\"]" >> $GITHUB_OUTPUT
else
echo "runner=\"ubuntu-latest\"" >> $GITHUB_OUTPUT
fi

build_wheels:
name: Build wheels for cp${{ matrix.python }}-${{ matrix.platform_id }}
needs: determine-arm64-runner
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
Expand All @@ -33,21 +49,20 @@ jobs:
platform_id: win_amd64
dp_variant: cpu
# linux-aarch64
- os: ubuntu-latest
- os: ${{ fromJson(needs.determine-arm64-runner.outputs.runner) }}
python: 310
platform_id: manylinux_aarch64
dp_variant: cpu
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true
# https://github.com/pypa/setuptools_scm/issues/480
fetch-depth: 0
- uses: docker/setup-qemu-action@v2
- uses: docker/setup-qemu-action@v3
name: Setup QEMU
if: matrix.platform_id == 'manylinux_aarch64'
if: matrix.platform_id == 'manylinux_aarch64' && matrix.os == 'ubuntu-latest'
- name: Build wheels
uses: pypa/cibuildwheel@v2.15
uses: pypa/cibuildwheel@v2.16
env:
CIBW_BUILD_VERBOSITY: 1
CIBW_ARCHS: all
Expand All @@ -60,13 +75,12 @@ jobs:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: '3.11'
cache: 'pip'
- run: python -m pip install build
- name: Build sdist
run: python -m build --sdist
Expand Down Expand Up @@ -94,26 +108,26 @@ jobs:
needs: [build_wheels]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/download-artifact@v3
with:
name: artifact
path: source/install/docker/dist
- name: Log in to the Container registry
uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@818d4b7b91585d195f67373fd9cb0332e31a7175
uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934
with:
images: ghcr.io/deepmodeling/deepmd-kit

- name: Build and push Docker image
uses: docker/build-push-action@2eb1c1961a95fc15694676618e422e8ba1d63825
uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09
with:
context: source/install/docker
push: ${{ github.repository_owner == 'deepmodeling' && github.event_name == 'push' }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/package_c.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
name: Build C library
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Package C library
run: ./source/install/docker_package_c.sh
# for download and debug
Expand All @@ -30,7 +30,7 @@ jobs:
needs: [build_c]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Download artifact
uses: actions/download-artifact@v3
with:
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/remove_test_cuda_label.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
on:
pull_request_target:
types:
- "labeled"
name: Test CUDA
jobs:
remove_label:
permissions:
contents: read
pull-requests: write
# so one can re-trigger the workflow without manually removing the label
runs-on: ubuntu-latest
if: github.repository_owner == 'deepmodeling' && github.event.label.name == 'Test CUDA'
steps:
- uses: actions-ecosystem/action-remove-labels@v1
with:
labels: Test CUDA
number: ${{ github.event.pull_request.number }}
5 changes: 4 additions & 1 deletion .github/workflows/test_cc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,24 @@ jobs:
name: Test C++
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: 'pip'
- name: Setup MPI
uses: mpi4py/setup-mpi@v1
with:
mpi: mpich
- uses: lukka/get-cmake@latest
- run: python -m pip install tensorflow
- run: source/install/test_cc_local.sh
env:
OMP_NUM_THREADS: 1
TF_INTRA_OP_PARALLELISM_THREADS: 1
TF_INTER_OP_PARALLELISM_THREADS: 1
LMP_CXX11_ABI_0: 1
CMAKE_GENERATOR: Ninja
# test lammps
# ASE issue: https://gitlab.com/ase/ase/-/merge_requests/2843
# TODO: remove ase version when ase has new release
Expand Down
60 changes: 60 additions & 0 deletions .github/workflows/test_cuda.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
on:
# manually trigger
workflow_dispatch:
pull_request:
types:
- "labeled"
name: Test CUDA
jobs:
test_cuda:
name: Test Python and C++ on CUDA
runs-on: nvidia
if: github.repository_owner == 'deepmodeling' && github.event.label.name == 'Test CUDA' || github.event_name == 'workflow_dispatch'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: 'pip'
- name: Setup MPI
uses: mpi4py/setup-mpi@v1
with:
mpi: mpich
- uses: lukka/get-cmake@latest
- run: |
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.0-1_all.deb \
&& sudo dpkg -i cuda-keyring_1.0-1_all.deb \
&& sudo apt-get update \
&& sudo apt-get -y install cuda-11-8 libcudnn8=8.9.5.*-1+cuda11.8
- run: python -m pip install -U "pip>=21.3.1,!=23.0.0"
- run: pip install -v -e .[gpu,test,lmp,cu11] "ase @ https://github.com/rosswhitfield/ase/archive/edd03571aff6944b77b4a4b055239f3c3e4eeb66.zip"
env:
DP_BUILD_TESTING: 1
DP_VARIANT: cuda
CUDA_PATH: /usr/local/cuda-11.8
- run: dp --version
- run: pytest -s --cov=deepmd --cov=deepmd_cli source/tests --durations=0
- run: source/install/test_cc_local.sh
env:
OMP_NUM_THREADS: 1
TF_INTRA_OP_PARALLELISM_THREADS: 1
TF_INTER_OP_PARALLELISM_THREADS: 1
LMP_CXX11_ABI_0: 1
CMAKE_GENERATOR: Ninja
DP_VARIANT: cuda
DP_USE_MPICH2: 1
CUDA_PATH: /usr/local/cuda-11.8
- run: |
export LD_LIBRARY_PATH=${{ github.workspace }}/dp_test/lib:$CUDA_PATH/lib64:$LD_LIBRARY_PATH
export PATH=${{ github.workspace }}/dp_test/bin:$PATH
pytest -s --cov=deepmd source/lmp/tests
pytest -s --cov=deepmd source/ipi/tests
env:
OMP_NUM_THREADS: 1
TF_INTRA_OP_PARALLELISM_THREADS: 1
TF_INTER_OP_PARALLELISM_THREADS: 1
LAMMPS_PLUGIN_PATH: ${{ github.workspace }}/dp_test/lib/deepmd_lmp
CUDA_PATH: /usr/local/cuda-11.8
- uses: codecov/codecov-action@v3
with:
gcov: true
35 changes: 15 additions & 20 deletions .github/workflows/test_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,48 +5,43 @@ name: Test Python
jobs:
testpython:
name: Test Python
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
matrix:
include:
- python: 3.7
gcc: 5
tf: 1.14
- python: 3.7
gcc: 6
tf: 1.14
- python: 3.7
gcc: 7
tf: 1.14
- python: 3.7
gcc: 8
tf: 1.14
- python: 3.8
gcc: 8
tf:
- python: "3.11"
gcc: 8
tf:

container: ghcr.io/deepmodeling/deepmd-kit-test-environment:py${{ matrix.python }}-gcc${{ matrix.gcc }}-tf${{ matrix.tf }}
steps:
- name: work around permission issue
run: git config --global --add safe.directory /__w/deepmd-kit/deepmd-kit
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
cache: 'pip'
- uses: mpi4py/setup-mpi@v1
if: ${{ matrix.tf == '' }}
with:
mpi: openmpi
# https://github.com/pypa/pip/issues/11770
- run: python -m pip install -U "pip>=21.3.1,!=23.0.0"
- run: pip install -e .[cpu,test]
env:
CC: gcc-${{ matrix.gcc }}
CXX: g++-${{ matrix.gcc }}
TENSORFLOW_VERSION: ${{ matrix.tf }}
DP_BUILD_TESTING: 1
- run: pip install horovod mpi4py
if: ${{ matrix.tf == '' }}
env:
HOROVOD_WITH_TENSORFLOW: 1
HOROVOD_WITHOUT_GLOO: 1
- run: dp --version
- run: pytest --cov=deepmd --cov=deepmd_cli source/tests --durations=0
- uses: codecov/codecov-action@v3
with:
gcov: true
gcov_executable: gcov-${{ matrix.gcc }}
pass:
name: Pass testing Python
needs: [testpython]
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ _skbuild
deepmd_kit.egg-info/
dist
.eggs
_version.py
/deepmd/_version.py
venv*
.vscode/**
_build
Expand Down
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

Loading