Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
106 commits
Select commit Hold shift + click to select a range
1ba6e53
merge master into devel (#1945)
amcadmus Sep 25, 2022
42a1d1f
fix gcov coverage (#1951)
njzjz Sep 27, 2022
8d8080e
perceive LAMMPS version for built-in mode (#1950)
njzjz Sep 27, 2022
4149f78
Fix typo of radisu (#1954)
kmu Sep 27, 2022
75256bb
supports left hands volume (#1956)
njzjz Sep 28, 2022
9737b6d
use CPP_CXX_ABI for Python libraries (#1960)
njzjz Oct 3, 2022
f9f4431
fix compatible with importlib_metadata 5.0.0 and Python 3.12 (#1961)
njzjz Oct 3, 2022
923b98c
Upload the finetune api (#1946)
iProzd Oct 3, 2022
7eb5bda
fix googletest download (#1949)
njzjz Oct 4, 2022
d2f52c7
fix typo in the doc of `loc_frame` (#1963)
amcadmus Oct 4, 2022
e9a00b4
enable gcov for Python tests (#1969)
njzjz Oct 4, 2022
cebfe72
support bfloat16 (#1970)
njzjz Oct 7, 2022
6733a06
find protobuf headers in an automatic way (#1975)
njzjz Oct 7, 2022
f59e965
search TF deps from LD_LIBRARY_PATH; eliminate errors (#1976)
njzjz Oct 8, 2022
0f4dc3c
add unittests for LAMMPS pair deepmd (#1977)
njzjz Oct 11, 2022
80b6222
replace `:` by `;` from `LD_LIBRARY_PATH` in cmake (#1982)
njzjz Oct 11, 2022
f5289c9
lmp: throw errors when 6-element atomic virial requested (#1983)
njzjz Oct 11, 2022
330608a
CVE-2007-4559 Patch (#1984)
TrellixVulnTeam Oct 12, 2022
77c7ad4
use float/double constants for spline5_switch (#1985)
njzjz Oct 12, 2022
2486918
remove duplicated `convert_13_to_21` (#1986)
njzjz Oct 13, 2022
d47de63
c++: add clang tests and fix clang errors (#1992)
njzjz Oct 13, 2022
27ca650
resolve macos clang errors (#1993)
njzjz Oct 14, 2022
c1f9e55
migrate cibuildwheel configs to pyproject.toml and add tests (#2000)
njzjz Oct 17, 2022
6fc7784
fix Findtensorflow when LD_LIBRARY_PATH is empty (#2010)
njzjz Oct 20, 2022
d23ca99
migrate from setup.cfg to pyproject.toml (#2011)
njzjz Oct 20, 2022
e2a3823
fix OP_CXX_ABI for TF>=2.9 (#2013)
njzjz Oct 20, 2022
00c1b9e
Fix compatibility with ROCm>=3.5.1; fix typo in hip neighbor_list (#2…
njzjz Oct 27, 2022
4f10296
build_tf.py: support ROCm; bump to TF 2.10 (#2030)
njzjz Oct 28, 2022
32f84cd
dp test output files: energy per atom, virial per atom (#2029)
likefallwind Oct 29, 2022
1cded8e
uncouple model precision and interface precision (#2031)
njzjz Oct 30, 2022
a7c3553
log HIP_VISIBLE_DEVICES for ROCm (#2032)
njzjz Oct 30, 2022
44a0ae0
merge double and float cc library (#2033)
njzjz Nov 1, 2022
7cab475
migrate to PEP 517 and PEP 621 (#2035)
njzjz Nov 1, 2022
c711e99
add dp test help doc (#2038)
likefallwind Nov 2, 2022
dac0bf0
add C API (#1098)
njzjz Nov 4, 2022
538f170
export c++ library to cmake config (#2049)
njzjz Nov 4, 2022
a1331cc
bump lammps to stable_23Jun2022_update2 (#2053)
njzjz Nov 4, 2022
f699152
fix python inference on windows (#2054)
njzjz Nov 4, 2022
77115fc
cmake: set TensorFlow as import libraries (#2056)
njzjz Nov 4, 2022
17b3bdc
enable ttm without a patch (#2055)
njzjz Nov 4, 2022
d1fa870
build_tf.py: mirror fixes (#2057)
njzjz Nov 7, 2022
b0e1cdf
export C library to cmake config (#2059)
njzjz Nov 7, 2022
607611a
docs: document lammps keyword `relative_v`, `aparam`, and `ttm` (#2060)
njzjz Nov 7, 2022
9ee6537
add get cutoff, numb_types, and type_map to C API (#2061)
njzjz Nov 7, 2022
22a0fcb
build_tf.py: roll back TF version to 2.9 (#2065)
njzjz Nov 8, 2022
b842100
the se-2 descriptor is multi-body (#2069)
amcadmus Nov 9, 2022
7c2533c
fix type hints errors (#2070)
MabinogiX Nov 9, 2022
7418872
build, package, and release C library (#2072)
njzjz Nov 9, 2022
021921b
improve building wheel workflow (#2074)
njzjz Nov 9, 2022
04b9592
skip checking `_GLIBCXX_USE_CXX11_ABI` on windows or osx (#2075)
njzjz Nov 9, 2022
ffbd957
add a header-only C++ DeepPot class based on C library (#2079)
njzjz Nov 9, 2022
1709262
dynamically load CUDA runtime library (#2082)
njzjz Nov 11, 2022
91ad807
docs: fix HDF5 path (#2076)
njzjz Nov 11, 2022
464f749
store TF version in the wheel's extras_require (#2084)
njzjz Nov 11, 2022
8a14c74
fix win64 builds and add win64 wheels (#2085)
njzjz Nov 11, 2022
de87de6
enable CUDA for linux-64 wheels (#2087)
njzjz Nov 13, 2022
aa89ec9
add macos-64 wheels (#2088)
njzjz Nov 13, 2022
f7eeb45
docs: document pip install (#2091)
njzjz Nov 14, 2022
106f75b
upgrade ubuntu-18.04 (#2096)
njzjz Nov 16, 2022
65bb49b
move run_config.ini into the root directory (#2098)
njzjz Nov 16, 2022
05aad66
add header only library example (#2083)
njzjz Nov 16, 2022
14f2ec8
docs: document the conda-forge channel (#2095)
njzjz Nov 17, 2022
03004f8
fix codecov (#2097)
njzjz Nov 17, 2022
37c69bc
refactor: merge tests into the main cmake project (#2102)
njzjz Nov 18, 2022
8fe2f3b
fix TF compile warnings about Status::OK (#2109)
njzjz Nov 19, 2022
edc6954
merge double and float cc tests (#2108)
njzjz Nov 19, 2022
1392aff
Fix version 0.12 model conversion (#2110)
Yi-FanLi Nov 19, 2022
145b6e5
add shuffle_exclude_empty to DeepPot.compute(nlist, atomic) (#2111)
njzjz Nov 21, 2022
641d756
c: support neighbor list input in the C API (#2106)
njzjz Nov 21, 2022
07ebde4
docs: fix spellings and grammars (#2114)
njzjz Nov 21, 2022
a4d8093
c: support DeepPot model deviation in the C API (#2112)
njzjz Nov 22, 2022
0fae5d0
docs: rewrite docs for parallelism (#2099)
njzjz Nov 22, 2022
b974111
c: fix `ComputeNlist` -> `ComputeNList` in the C API (#2119)
njzjz Nov 22, 2022
41d2487
print out the time of each Python unit test (#2116)
njzjz Nov 22, 2022
ba81c39
speed up test_neighbor_stat (#2120)
njzjz Nov 23, 2022
15b7135
speed up tests with CLI (#2121)
njzjz Nov 23, 2022
0d25ad6
fix invalid escape sequence in strings (#2122)
njzjz Nov 23, 2022
894d831
add precompile headers (#2123)
njzjz Nov 25, 2022
060311e
c: fix bug in hpp float interface and add tests (#2128)
njzjz Nov 25, 2022
5b6122f
fix the missing header in api_c tests (#2131)
njzjz Nov 25, 2022
47a82df
docs: add a FAQ about precision (#2115)
njzjz Nov 25, 2022
243c35a
skip `get_gpus` subprocess when TF is cpu only (#2135)
njzjz Nov 27, 2022
b2213a8
pin manylinux image to a specific tag for GCC 11 (#2137)
njzjz Nov 28, 2022
8281fe6
Upload the multi-task training api (#2093)
iProzd Nov 28, 2022
fe213b1
add Optional to type hints when default is None (#2139)
njzjz Nov 29, 2022
1529781
clean deprecated codes (#2140)
njzjz Nov 29, 2022
c03e3e2
add pass step to GitHub Actions (#2141)
njzjz Nov 30, 2022
6721bc6
give pass actions different names (#2142)
njzjz Dec 1, 2022
bec0174
optimize FioBin.save (#2143)
njzjz Dec 1, 2022
426d12d
open the graph file only once in compress (#2144)
njzjz Dec 3, 2022
133cb59
refactor enable_compression (#2147)
njzjz Dec 3, 2022
3dffab8
do not apply automatic batch size on CPUs (#2148)
njzjz Dec 3, 2022
2f614b4
remove OP_LIB from op_abi (#2150)
njzjz Dec 3, 2022
1156c54
add an option to enable native compilation optimization (#2151)
njzjz Dec 4, 2022
5d9a394
docs: add a note about lammps runpath (#2156)
njzjz Dec 5, 2022
3b87b40
Update python.md (#2158)
LiangWenshuo1118 Dec 6, 2022
982254e
pass user defined CUDA_NVCC_FLAGS and HIP_HIPCC_FLAGS (#2168)
njzjz Dec 7, 2022
9e13776
support DPRc + type embedding (#2166)
njzjz Dec 7, 2022
5db88f5
add ut for dp convert-from (#2175)
njzjz Dec 12, 2022
3c77e1b
store energy bias with interface precision (#2174)
njzjz Dec 13, 2022
437f18d
refactor `USE_TF_PYTHON_LIBS` (#2177)
njzjz Dec 15, 2022
f2ea58e
retag wheels to `py37-none-<platform>` (#2180)
njzjz Dec 15, 2022
eab018e
c: DeepTensor (#2184)
njzjz Dec 17, 2022
8e68292
build wheels for Linux ARM64 (#2179)
njzjz Dec 17, 2022
19940da
build_tf.py: export `LD_LIBRARY_PATH` when executing `configure` (#2185)
njzjz Dec 17, 2022
f40c694
pip install lammps module (#2186)
njzjz Dec 19, 2022
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
3 changes: 2 additions & 1 deletion .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ CUDA: source/lib/src/cuda/**/*
ROCM: source/lib/src/rocm/**/*
OP: source/op/**/*
C++: source/api_cc/**/*
C: source/api_c/**/*
LAMMPS: source/lmp/**/*
Gromacs: source/gmx/**/*
i-Pi: source/ipi/**/*
i-Pi: source/ipi/**/*
38 changes: 31 additions & 7 deletions .github/workflows/build_cc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,50 @@ on:
pull_request:
name: Build C++
jobs:
testpython:
buildcc:
name: Build C++
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
container: ghcr.io/deepmodeling/deepmd-kit-test-cc:latest
strategy:
matrix:
include:
- variant: cpu
- variant: cuda
- variant: rocm
- variant: clang
steps:
- name: work around permission issue
run: git config --global --add safe.directory /__w/deepmd-kit/deepmd-kit
- uses: actions/checkout@master
with:
submodules: true
- run: sudo apt update && sudo apt install g++-7
- run: sudo apt install nvidia-cuda-toolkit
- run: apt-get update && apt-get install -y nvidia-cuda-toolkit
if: matrix.variant == 'cuda'
- run: |
apt-get update && apt-get install -y gnupg2 \
&& echo 'deb [arch=amd64] https://repo.radeon.com/rocm/apt/5.3/ jammy main' | tee /etc/apt/sources.list.d/rocm.list \
&& printf 'Package: *\nPin: release o=repo.radeon.com\nPin-Priority: 600' | tee /etc/apt/preferences.d/rocm-pin-600 \
&& curl -s https://repo.radeon.com/rocm/rocm.gpg.key | apt-key add - \
&& apt-get update \
&& apt-get install -y rocm-dev hipcub-dev
if: matrix.variant == 'rocm'
- run: apt-get update && apt-get install -y clang
if: matrix.variant == 'clang'
- run: source/install/build_cc.sh
env:
DP_VARIANT: ${{ matrix.variant }}
CC: gcc-7
CXX: g++-7
CONDA_OVERRIDE_CUDA: 11.3
DOWNLOAD_TENSORFLOW: "FALSE"
if: matrix.variant != 'clang'
- run: source/install/build_cc.sh
env:
DP_VARIANT: cpu
DOWNLOAD_TENSORFLOW: "FALSE"
CC: clang
CXX: clang++
if: matrix.variant == 'clang'
pass:
name: Pass building C++
needs: [buildcc]
runs-on: ubuntu-latest
steps:
- run: echo "All jobs passed"
69 changes: 44 additions & 25 deletions .github/workflows/build_wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,64 +6,83 @@ on:

jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
name: Build wheels for cp${{ matrix.python }}-${{ matrix.platform_id }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-18.04] #, windows-latest, macos-latest]

include:
# linux-64
- os: ubuntu-latest
python: 310
platform_id: manylinux_x86_64
dp_variant: cuda
# macos-x86-64
- os: macos-latest
python: 310
platform_id: macosx_x86_64
dp_variant: cpu
# win-64
- os: windows-2019
python: 310
platform_id: win_amd64
dp_variant: cpu
# linux-aarch64
- os: ubuntu-latest
python: 310
platform_id: manylinux_aarch64
dp_variant: cpu
steps:
- name: work around permission issue
run: git config --global --add safe.directory /__w/deepmd-kit/deepmd-kit
- uses: actions/checkout@v2
with:
submodules: true
- uses: docker/setup-qemu-action@v2
name: Setup QEMU
if: matrix.platform_id == 'manylinux_aarch64'
- uses: actions/setup-python@v2
name: Install Python
with:
python-version: '3.8'

- name: Install cibuildwheel
run: |
python -m pip install cibuildwheel

- run: python -m pip install cibuildwheel==2.11.3
- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_BUILD: "cp36-* cp37-* cp38-* cp39-* cp310-*"
CIBW_MANYLINUX_X86_64_IMAGE: ghcr.io/deepmodeling/manylinux_2_28_x86_64_tensorflow
CIBW_BEFORE_BUILD: pip install tensorflow
CIBW_SKIP: "*-win32 *-manylinux_i686 *-musllinux*"
run: |
python -m cibuildwheel --output-dir wheelhouse
CIBW_BUILD_VERBOSITY: 1
CIBW_ARCHS: all
CIBW_BUILD: cp${{ matrix.python }}-${{ matrix.platform_id }}
DP_VARIANT: ${{ matrix.dp_variant }}
- uses: actions/upload-artifact@v2
with:
path: ./wheelhouse/*.whl

build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v3
with:
submodules: true
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: '3.8'
- run: pip install -U scikit-build tensorflow setuptools_scm
python-version: '3.10'
- run: python -m pip install build
- name: Build sdist
run: python setup.py sdist
run: python -m build --sdist

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
path: dist/*.tar.gz

upload_pypi:
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
if: startsWith(github.event.ref, 'refs/tags/v')
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
steps:
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v3
with:
name: artifact
path: dist

- uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
with:
python-version: ${{ matrix.python }}
- name: Install requirements
run: pip install -r requirements.txt
run: pip install .
- uses: marian-code/python-lint-annotate@v2.5.0
with:
python-root-list: "./deepmd/*.py ./deepmd/*/*.py ./deepmd/*/*/*.py ./source/train/*.py ./source/tests/*.py ./source/op/*.py"
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/package_c.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Build C library

on:
push:
pull_request:

jobs:
build_c:
name: Build C library
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- name: Package C library
run: ./source/install/docker_package_c.sh
- name: Test C library
run: ./source/install/docker_test_package_c.sh
# for download and debug
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
path: ./libdeepmd_c.tar.gz
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: libdeepmd_c.tar.gz
30 changes: 28 additions & 2 deletions .github/workflows/test_cc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
pull_request:
name: Test C++
jobs:
testpython:
testcc:
name: Test C++
runs-on: ubuntu-latest
container: ghcr.io/deepmodeling/deepmd-kit-test-cc:latest
Expand All @@ -13,5 +13,31 @@ jobs:
- uses: actions/checkout@master
- run: source/install/test_cc_local.sh
env:
OMP_NUM_THREADS: 1
TF_INTRA_OP_PARALLELISM_THREADS: 1
TF_INTER_OP_PARALLELISM_THREADS: 1
tensorflow_root: /usr/local
- run: source/install/codecov.sh
# test lammps
- run: apt-get update && apt-get install -y python3-pip python3-venv
- run: source/install/build_lammps.sh
- run: |
python -m pip install -U pip
python -m pip install -e .[cpu,test]
env:
DP_BUILD_TESTING: 1
- run: pytest --cov=deepmd source/lmp/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
LD_LIBRARY_PATH: ${{ github.workspace }}/dp_test/lib
- uses: codecov/codecov-action@v3
with:
gcov: true
pass:
name: Pass testing C++
needs: [testcc]
runs-on: ubuntu-latest
steps:
- run: echo "All jobs passed"
40 changes: 13 additions & 27 deletions .github/workflows/test_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,10 @@ name: Test Python
jobs:
testpython:
name: Test Python
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
strategy:
matrix:
include:
- python: 3.6
gcc: 4.8
tf: 1.8
- python: 3.6
gcc: 4.8
tf: 1.12
- python: 3.6
gcc: 4.8
tf: 1.14
- python: 3.6
gcc: 5
tf: 1.14
- python: 3.6
gcc: 8
tf: 1.14
- python: 3.7
gcc: 5
tf: 1.14
Expand Down Expand Up @@ -54,20 +39,21 @@ jobs:
- name: work around permission issue
run: git config --global --add safe.directory /__w/deepmd-kit/deepmd-kit
- uses: actions/checkout@master
- name: pip cache
uses: actions/cache@v2
with:
path: ~/.cache/pip
key:
${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- run: python -m pip install -U pip>=21.3.1
- run: pip install -e .[cpu,test] codecov
- run: pip install -e .[cpu,test]
env:
CC: gcc-${{ matrix.gcc }}
CXX: g++-${{ matrix.gcc }}
TENSORFLOW_VERSION: ${{ matrix.tf }}
SETUPTOOLS_ENABLE_FEATURES: "legacy-editable"
DP_BUILD_TESTING: 1
- run: dp --version
- run: pytest --cov=deepmd source/tests && codecov
- run: pytest --cov=deepmd source/tests --durations=0
- uses: codecov/codecov-action@v3
with:
gcov: true
pass:
name: Pass testing Python
needs: [testpython]
runs-on: ubuntu-latest
steps:
- run: echo "All jobs passed"
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,16 @@ _templates
API_CC
doc/api_py/
doc/api_core/
doc/api_c/
dp/
dp_test/
dp_test_cc/
dp_test_c/
dp_c/
build_lammps/
.idea/
build_tests/
build_cc_tests
build_c_tests
build_c/
libdeepmd_c/
Loading