forked from deepmodeling/deepmd-kit
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: optimize compute_smooth_weight (deepmodeling#4390)
New implmenetation is obviously more efficient. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Enhanced the `compute_smooth_weight` functionality for improved efficiency and clarity by simplifying the distance handling logic. - Introduced configuration for the `array_api_strict` module to ensure compatibility with the latest API version. - **Bug Fixes** - Removed unnecessary masking conditions, ensuring smoother calculations within defined distance ranges. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Jinzhe Zeng <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
- Loading branch information
1 parent
e9f9321
commit abb32d1
Showing
3 changed files
with
15 additions
and
13 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,8 @@ | ||
# SPDX-License-Identifier: LGPL-3.0-or-later | ||
"""Synchronize with deepmd.jax for test purpose only.""" | ||
|
||
import array_api_strict | ||
|
||
# this is the default version in the latest array_api_strict, | ||
# but in old versions it may be 2022.12 | ||
array_api_strict.set_array_api_strict_flags(api_version="2023.12") |