Merge devel into master#1542
Merged
wanghan-iapcm merged 88 commits intodeepmodeling:masterfrom Mar 7, 2022
Merged
Conversation
* add model compression for se-t descriptor * optimize range structure for se-t * add CPU support for se-t type model compression * add gradient define for op TabulateFusion * add ut for st_t model compression descriptor * fix UT error * add rocm support * address comments * Update compress.md * fix typo * bump model version from 1.0 to 1.1 * bump model version from 1.0 to 1.1 * fix bug of model compression * fix single precision error * fix UT error * address comments * upgrade convert support from 2.0 to 2.1 * add 2.0 convert-from support * update doc for model compatibility * Update model-compatability.md * Update model-compatability.md Co-authored-by: denghuilu <denghuilu@pku.edu.cn>
…odeling#1228) * enable model compression for dipole and polar type fitting net * delete debug code
another typo. Co-authored-by: Han Wang <amcadmus@gmail.com>
typo update Co-authored-by: Han Wang <amcadmus@gmail.com>
…ace (deepmodeling#1233) * fix compress training bug within the dp train --init-frz-model interface * address comments * rename _transfer_graph_def function within freeze.py
tensorflow doesn't support it
skip musllinux build
Fix typo in training.md
* deprecate `numb_test` See deepmodeling#1243. * bugfix
Fix deepmodeling#1248 (only the first part).
* fix bug of loc_frame descriptor, due to the change of nei list convention introduced in v2 * fix change of format Co-authored-by: Han Wang <wang_han@iapcm.ac.cn>
fix the np.frombuffer in dp transfer
* accelerate model compression * remove redundancy
/home/runner/work/deepmd-kit/deepmd-kit/deepmd/utils/graph.py:156: SyntaxWarning: "is not" with a literal. Did you mean "!="?
) * Improved activation function. * Improved activation function. * Added description of available activation functions. * Added description of available activation functions. * Added description of available activation functions. * Added description of available activation functions. * Update train-input.rst * Update train-input.rst * Update train-input.rst * Added description of available activation functions. * Added description of available activation functions. * Update train-input.rst * Added description of available activation functions. * Added description of available activation functions. * Added description of available activation functions. * Added description of available activation functions. * Update train-input.rst
This ensures the old model can be compressed by the new program.
* update guidelines for the number of threads Setting `OMP_NUM_THREADS` to 3 may be faster than 6. It needs to be confirmed. * add warnings if not adjusting threads
Co-authored-by: Han Wang <wang_han@iapcm.ac.cn>
* enable mixed precision support for dp * set the default embedding net & fitting net precision * add doc for mixed precision * fix typo * fix UT bug * use input script to control the mixed precision workflow * add tf version check for mixed precision * Update training-advanced.md * fix typo * fix TF_VERSION control * fix TF_VERSION comparison * enable mixed precision for hybrid descriptor * Update network.py * use parameter to control the network mixed precision output precision * add example for mixed precision training workflow * fix lint errors
Co-authored-by: pkulzy <47965866+pkulzy@users.noreply.github.com>
…ling#1306) * fix model compression bug when fparam and aparam are not zero * Update ener.py
TF supports a remapper optimizer which remaps subgraphs onto more efficient implementations by replacing commonly occuring subgraphs with optimized fused monolithic kernels. However, its support is limited: (1) MatMul + BiasAdd (not Add) + Activation; (2) Float32 (but not float64); (3) Activation is Tanh; (4) MKL is built and used. This commit replaces Add by BiasAdd in the NN. The speed of a single op can be improved by about 20% when TF is using MKL and precision is set to float32. One can find `_MklNativeFusedMatMul` op in the profiler. See also: - https://www.tensorflow.org/guide/graph_optimization - https://github.com/tensorflow/tensorflow/blob/master/tensorflow/core/grappler/optimizers/remapper.cc (cherry picked from commit 8f2dc44)
* dynamically load op library in C++ interface C++ interface will dynamically load OP libraries, just like Python interface, so it no longer needs linking. * version cannot be NULL... * set LD_LIBRARY_PATH * install runUnitTest * remove CMAKE_LINK_WHAT_YOU_USE It is not necessary anymore. * also remove CMAKE_LINK_WHAT_YOU_USE in api_cc/tests * change the type of op library to MODULE * add the absolute path of library directory to cc rpath * Revert "add the absolute path of library directory to cc rpath" This reverts commit fabdac9. * add `-Wl,--disable-new-dtags` * Revert "add `-Wl,--disable-new-dtags`" This reverts commit ecccb57. * dlopen from dp lib but not TF
The following migrators were applied: - Migrate to `build.tools` configuration. This uses the new base Docker image based on Ubuntu 20.04 introduced in October 2021 and picks an appropriate Python version for your project (read [our blog post](https://blog.readthedocs.com/new-build-specification/) for details). Notice that now you can specify the Node.js, Rust, and Go versions as well. *Note:* Some system dependencies are not preinstalled anymore, so this might require manually adding them to `build.apt_packages` (see [our documentation](https://docs.readthedocs.io/en/stable/config-file/v2.html#build-apt-packages>)). - Migrate to Mamba as a drop-in replacement for Conda. Your project requested using Mamba instead of Conda for performance reasons. Now this is included in your configuration and you can change it without our intervention. Co-authored-by: Han Wang <amcadmus@gmail.com>
* Add image link of ROCm version. * Update easy-install.md Co-authored-by: Han Wang <amcadmus@gmail.com>
* add doc and examples for deep potential long-range * add "* *" to pair style. use warning section of RTD for warning message * rst syntax does not work in md. changed Co-authored-by: Han Wang <wang_han@iapcm.ac.cn>
…g#1463) `std` and `avg` are stored as variables. `saver.restore` will restore and override it. So `data_stat` before `saver.restore` is useless. Note that currently `init_from_frz_model` does not restore these variables. I also add a message before `data_stat`. It sometimes takes long time.
* bump the testing Python version to 3.10 Test whether deepmd-kit is compatible with the latest Python. TF 2.8 was just released with Python 3.10 support. * add cp310 to wheel building * the version is not a float...
* do some small optimization to ops 1. avoid concat or add in loops. Instead, append tensors to a list, and concat or accumulate_n after loops 2. remove a duplicated reshape * revert unnecessary changes * revert wfc.py as it has been decrepated
* fix bug of mixed precision training * Update test_mixed_prec_training.py * fix UT error * fix UT error * fix UT error * address comment
…ng#1477) * assign energy shift stats if atomic energies are assigned Atomic energies stats may be incorrect. Here, we use assigned atomic energies instead. I am training a model against multiple systems, where some atoms should not contribute energies. Before this commit, the loss of my model could not decrease. After this commit, it decreased quickly. * fix tests * add ut * keep and test the sum energy * fix typo
* calculate neighbor statistics from CLI In many cases, we need to confirm neighbor statistics before training. This command provides such CLI option. * add UT and docs * fix typo * correct name of the class * remove data_requirement
Before, only NN parameters were recovered.
* test: move loading graphs to setUpClass Loading graphs is expensive. * small fix * fix a typo * fix typo
* add an interface to eval descriptors Fix deepmodeling#1393. * move eval descriptor out of eval * bugfix and remove unnecessary changes * fix test * merge duplicated codes * bugfix * imap * Update deep_pot.py * do not return tuple * fix typo * make the code more readable
* run test_python on pre-built container * pin mistune to <2 See miyakogi/m2r#66 * I don't understand why we need m2r... * install m2r2 instead * try to encode with utf-8 instead.. * add back pip cache * Update test_python.yml * bump importlib_metadata version * Revert "bump importlib_metadata version" This reverts commit b8b1727. * Revert "Update test_python.yml" This reverts commit d9a906e. * set PYTHONPATH * Revert "set PYTHONPATH" This reverts commit d35bcf0.
…ng#1490) * typo: 'should be in consistent' -> 'should be consistent' * typo: 'notice' -> 'important' Co-authored-by: Han Wang <amcadmus@gmail.com>
Co-authored-by: Han Wang <amcadmus@gmail.com>
`memset`, `cudaMemset`, and `hipMemset` only accept integer as value. It's meaningless to pass a float, whether the compiler optimizes or not. References: https://www.cplusplus.com/reference/cstring/memset/ https://docs.nvidia.com/cuda/cuda-runtime-api/group__CUDART__MEMORY.html#group__CUDART__MEMORY_1gf7338650f7683c51ee26aadc6973c63a https://rocmdocs.amd.com/en/latest/ROCm_API_References/HIP_API/Memory-Management.html#hipmemset
Codecov Report
@@ Coverage Diff @@
## master #1542 +/- ##
===========================================
- Coverage 75.95% 64.28% -11.67%
===========================================
Files 91 5 -86
Lines 7260 14 -7246
===========================================
- Hits 5514 9 -5505
+ Misses 1746 5 -1741 Continue to review full report at Codecov.
|
njzjz
approved these changes
Mar 7, 2022
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.