[r2] Collected changes and fixes from devel#3224
Merged
wanghan-iapcm merged 6 commits intodeepmodeling:r2from Feb 4, 2024
Merged
[r2] Collected changes and fixes from devel#3224wanghan-iapcm merged 6 commits intodeepmodeling:r2from
wanghan-iapcm merged 6 commits intodeepmodeling:r2from
Conversation
<!--pre-commit.ci start--> updates: - [github.com/astral-sh/ruff-pre-commit: v0.1.13 → v0.1.14](astral-sh/ruff-pre-commit@v0.1.13...v0.1.14) <!--pre-commit.ci end--> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> (cherry picked from commit bc00a0a)
Fix the following compiler warning:
```
/home/runner/work/deepmd-kit/deepmd-kit/source/api_c/src/c_api.cc:1336:17: warning: returning address of local temporary object [-Wreturn-stack-address]
return (int*)&(dcm->dcm.sel_types())[0];
^~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
```
by returning the reference of `sel_type`.
`DataChargeModifier.sel_types` is not used anywhere, even in the test,
so we don't have a chance to determine if there is a possible segfault,
and this warning has no actual impact.
It seems `DeepTensor` has returned a reference since the beginning
(deepmodeling#137). (perhaps because
`DeepTensor.sel_types` is used) `DeepTensor` and `DataChargeModifier`
have different returned types.
(cherry picked from commit f900f3a)
Fix deepmodeling#3214. In the gmx patch file, `${TENSORFLOW_ROOT}` is used other than `${TensorFlow_LIBRARY_PATH}$` or `${TENSORFLOW_INCLUDE_DIRS}`, so the fastest workaround is to set `${TENSORFLOW_ROOT}`. https://github.com/deepmodeling/deepmd-kit/blob/eb9b2efedf4efc946894800a0d7abf5056f4bb7a/source/gmx/patches/2020.2/CMakeLists.txt.patch.in#L14-L18 Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu> (cherry picked from commit 701b913)
Fix deepmodeling#3214. Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu> (cherry picked from commit 412c812)
Fix deepmodeling#3045. All memory leaks have been fixed! --------- Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> (cherry picked from commit ab2c551)
Today [GitHub introduced the new M1 runners](https://github.blog/changelog/2024-01-30-github-actions-introducing-the-new-m1-macos-runner-available-to-open-source/), making it possible to build macos-arm64 wheels without cross-building. Remove old hacked codes for cross-building. (cherry picked from commit 664c70b)
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## r2 #3224 +/- ##
==========================================
+ Coverage 76.06% 76.21% +0.15%
==========================================
Files 277 277
Lines 25603 25639 +36
Branches 1591 1605 +14
==========================================
+ Hits 19476 19542 +66
- Misses 5203 5225 +22
+ Partials 924 872 -52 ☔ View full report in Codecov by Sentry. |
wanghan-iapcm
approved these changes
Feb 4, 2024
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.
Cherry-pick: #3163, #3181, #3217, #3221, #3223, #3206
Note
This PR should not be squashed.