Skip to content

Commit 92ca097

Browse files
authored
Merge devel into master (#2559)
2 parents 3ac8c4c + 6e4d32f commit 92ca097

File tree

264 files changed

+163197
-2183
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

264 files changed

+163197
-2183
lines changed

.github/workflows/build_cc.yml

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ jobs:
66
buildcc:
77
name: Build C++
88
runs-on: ubuntu-latest
9-
container: ghcr.io/deepmodeling/deepmd-kit-test-cc:latest
109
strategy:
1110
matrix:
1211
include:
@@ -21,32 +20,31 @@ jobs:
2120
- variant: clang
2221
dp_variant: clang
2322
steps:
24-
- name: work around permission issue
25-
run: git config --global --add safe.directory /__w/deepmd-kit/deepmd-kit
2623
- uses: actions/checkout@v3
2724
with:
2825
submodules: true
29-
- run: apt-get update && apt-get install -y nvidia-cuda-toolkit
26+
- uses: actions/setup-python@v4
27+
with:
28+
python-version: '3.11'
29+
- run: python -m pip install tensorflow
30+
- run: sudo apt-get update && sudo apt-get install -y nvidia-cuda-toolkit
3031
if: matrix.variant == 'cuda'
3132
- run: |
32-
apt-get update \
33-
&& apt-get -y install wget \
34-
&& wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.0-1_all.deb \
35-
&& dpkg -i cuda-keyring_1.0-1_all.deb \
36-
&& apt-get update \
37-
&& apt-get -y install cuda-12-0
33+
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.0-1_all.deb \
34+
&& sudo dpkg -i cuda-keyring_1.0-1_all.deb \
35+
&& sudo apt-get update \
36+
&& sudo apt-get -y install cuda-12-0
3837
if: matrix.variant == 'cuda120'
3938
env:
4039
DEBIAN_FRONTEND: noninteractive
4140
- run: |
42-
apt-get update && apt-get install -y gnupg2 \
43-
&& echo 'deb [arch=amd64] https://repo.radeon.com/rocm/apt/5.3/ jammy main' | tee /etc/apt/sources.list.d/rocm.list \
44-
&& printf 'Package: *\nPin: release o=repo.radeon.com\nPin-Priority: 600' | tee /etc/apt/preferences.d/rocm-pin-600 \
45-
&& curl -s https://repo.radeon.com/rocm/rocm.gpg.key | apt-key add - \
46-
&& apt-get update \
47-
&& apt-get install -y rocm-dev hipcub-dev
41+
echo 'deb [arch=amd64] https://repo.radeon.com/rocm/apt/5.3/ jammy main' | sudo tee /etc/apt/sources.list.d/rocm.list \
42+
&& printf 'Package: *\nPin: release o=repo.radeon.com\nPin-Priority: 600' | sudo tee /etc/apt/preferences.d/rocm-pin-600 \
43+
&& curl -s https://repo.radeon.com/rocm/rocm.gpg.key | sudo apt-key add - \
44+
&& sudo apt-get update \
45+
&& sudo apt-get install -y rocm-dev hipcub-dev
4846
if: matrix.variant == 'rocm'
49-
- run: apt-get update && apt-get install -y clang
47+
- run: sudo apt-get update && sudo apt-get install -y clang
5048
if: matrix.variant == 'clang'
5149
- run: source/install/build_cc.sh
5250
env:

.github/workflows/build_wheel.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,17 @@ jobs:
1414
include:
1515
# linux-64
1616
- os: ubuntu-latest
17-
python: 310
17+
python: 311
1818
platform_id: manylinux_x86_64
1919
dp_variant: cuda
2020
# macos-x86-64
2121
- os: macos-latest
22-
python: 310
22+
python: 311
2323
platform_id: macosx_x86_64
2424
dp_variant: cpu
2525
# win-64
2626
- os: windows-2019
27-
python: 310
27+
python: 311
2828
platform_id: win_amd64
2929
dp_variant: cpu
3030
# linux-aarch64
@@ -42,7 +42,7 @@ jobs:
4242
name: Setup QEMU
4343
if: matrix.platform_id == 'manylinux_aarch64'
4444
- name: Build wheels
45-
uses: pypa/cibuildwheel@v2.12.1
45+
uses: pypa/cibuildwheel@v2.12.3
4646
env:
4747
CIBW_BUILD_VERBOSITY: 1
4848
CIBW_ARCHS: all
@@ -61,7 +61,7 @@ jobs:
6161
- uses: actions/setup-python@v4
6262
name: Install Python
6363
with:
64-
python-version: '3.10'
64+
python-version: '3.11'
6565
- run: python -m pip install build
6666
- name: Build sdist
6767
run: python -m build --sdist
@@ -73,16 +73,16 @@ jobs:
7373
upload_pypi:
7474
needs: [build_wheels, build_sdist]
7575
runs-on: ubuntu-latest
76+
permissions:
77+
# IMPORTANT: this permission is mandatory for trusted publishing
78+
id-token: write
7679
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
7780
steps:
7881
- uses: actions/download-artifact@v3
7982
with:
8083
name: artifact
8184
path: dist
8285
- uses: pypa/gh-action-pypi-publish@release/v1
83-
with:
84-
user: __token__
85-
password: ${{ secrets.pypi_password }}
8686

8787
build_docker:
8888
# use the already built wheels to build docker
@@ -95,15 +95,15 @@ jobs:
9595
name: artifact
9696
path: source/install/docker/dist
9797
- name: Log in to the Container registry
98-
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
98+
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
9999
with:
100100
registry: ghcr.io
101101
username: ${{ github.actor }}
102102
password: ${{ secrets.GITHUB_TOKEN }}
103103

104104
- name: Extract metadata (tags, labels) for Docker
105105
id: meta
106-
uses: docker/metadata-action@507c2f2dc502c992ad446e3d7a5dfbe311567a96
106+
uses: docker/metadata-action@c4ee3adeed93b1fa6a762f209fb01608c1a22f1e
107107
with:
108108
images: ghcr.io/deepmodeling/deepmd-kit
109109

.github/workflows/package_c.yml

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,41 @@ jobs:
1212
- uses: actions/checkout@v3
1313
- name: Package C library
1414
run: ./source/install/docker_package_c.sh
15-
- name: Test C library
16-
run: ./source/install/docker_test_package_c.sh
1715
# for download and debug
1816
- name: Upload artifact
1917
uses: actions/upload-artifact@v3
2018
with:
19+
name: libdeepmd_c
2120
path: ./libdeepmd_c.tar.gz
21+
- name: Test C library
22+
run: ./source/install/docker_test_package_c.sh
2223
- name: Release
2324
uses: softprops/action-gh-release@v1
2425
if: startsWith(github.ref, 'refs/tags/')
2526
with:
2627
files: libdeepmd_c.tar.gz
28+
test_c:
29+
name: Test building from C library
30+
needs: [build_c]
31+
runs-on: ubuntu-22.04
32+
steps:
33+
- uses: actions/checkout@v3
34+
- name: Download artifact
35+
uses: actions/download-artifact@v3
36+
with:
37+
name: libdeepmd_c
38+
- run: tar -vxzf ./libdeepmd_c.tar.gz
39+
- name: Test C library
40+
run: ./source/install/build_from_c.sh
41+
env:
42+
DEEPMD_C_ROOT: ${{ github.workspace }}/libdeepmd_c
43+
pass:
44+
name: Pass building c library
45+
needs: [build_c, test_c]
46+
runs-on: ubuntu-latest
47+
if: always()
48+
steps:
49+
- name: Decide whether the needed jobs succeeded or failed
50+
uses: re-actors/alls-green@release/v1
51+
with:
52+
jobs: ${{ toJSON(needs) }}

.github/workflows/test_cc.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,26 @@ jobs:
66
testcc:
77
name: Test C++
88
runs-on: ubuntu-latest
9-
container: ghcr.io/deepmodeling/deepmd-kit-test-cc:latest
109
steps:
11-
- name: work around permission issue
12-
run: git config --global --add safe.directory /__w/deepmd-kit/deepmd-kit
1310
- uses: actions/checkout@v3
11+
- uses: actions/setup-python@v4
12+
with:
13+
python-version: '3.11'
14+
- name: Setup MPI
15+
uses: mpi4py/setup-mpi@v1
16+
with:
17+
mpi: mpich
18+
- run: python -m pip install tensorflow
1419
- run: source/install/test_cc_local.sh
1520
env:
1621
OMP_NUM_THREADS: 1
1722
TF_INTRA_OP_PARALLELISM_THREADS: 1
1823
TF_INTER_OP_PARALLELISM_THREADS: 1
19-
tensorflow_root: /usr/local
24+
LMP_CXX11_ABI_0: 1
2025
# test lammps
21-
- run: apt-get update && apt-get install -y python3-pip python3-venv
22-
- run: source/install/build_lammps.sh
2326
- run: |
2427
python -m pip install -U pip
25-
python -m pip install -e .[cpu,test]
28+
python -m pip install -e .[cpu,test,lmp]
2629
env:
2730
DP_BUILD_TESTING: 1
2831
- run: pytest --cov=deepmd source/lmp/tests

.github/workflows/test_python.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,10 @@ jobs:
2121
- python: 3.7
2222
gcc: 8
2323
tf: 1.14
24-
- python: 3.7
25-
gcc: 5
26-
tf:
27-
- python: 3.7
24+
- python: 3.8
2825
gcc: 8
2926
tf:
30-
- python: "3.10"
31-
gcc: 5
32-
tf:
33-
- python: "3.10"
27+
- python: "3.11"
3428
gcc: 8
3529
tf:
3630

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ repos:
1616
- id: check-toml
1717
# Python
1818
- repo: https://github.com/psf/black
19-
rev: 22.12.0
19+
rev: 23.3.0
2020
hooks:
2121
- id: black-jupyter
2222
- repo: https://github.com/PyCQA/isort
@@ -26,7 +26,7 @@ repos:
2626
files: \.py$
2727
- repo: https://github.com/charliermarsh/ruff-pre-commit
2828
# Ruff version.
29-
rev: v0.0.243
29+
rev: v0.0.269
3030
hooks:
3131
- id: ruff
3232
args: ["--fix"]
@@ -43,7 +43,7 @@ repos:
4343
- id: blacken-docs
4444
# C++
4545
- repo: https://github.com/pre-commit/mirrors-clang-format
46-
rev: v15.0.7
46+
rev: v16.0.4
4747
hooks:
4848
- id: clang-format
4949
exclude: ^source/3rdparty|source/lib/src/cuda/cudart/.+\.inc
@@ -54,7 +54,7 @@ repos:
5454
- id: csslint
5555
# Shell
5656
- repo: https://github.com/scop/pre-commit-shfmt
57-
rev: v3.6.0-1
57+
rev: v3.6.0-2
5858
hooks:
5959
- id: shfmt
6060
# CMake

CITATION.cff

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)