Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update JAX backend handling for consistency across the codebase #4308

Closed
coderabbitai bot opened this issue Nov 4, 2024 · 0 comments · Fixed by #4355
Closed

Update JAX backend handling for consistency across the codebase #4308

coderabbitai bot opened this issue Nov 4, 2024 · 0 comments · Fixed by #4355
Assignees

Comments

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 4, 2024

The addition of JAX to the DPBackend enum requires updates in multiple files to maintain consistency across the codebase:

  • source/api_cc/src/DeepTensor.cc: Backend type checks need JAX handling
  • source/api_cc/src/DeepPot.cc: Missing JAX case in backend comparisons
  • source/api_cc/src/DataModifier.cc: Backend switch statements need JAX support

This issue was identified in PR #4307 (link) during the code review discussion here.

cc @njzjz

njzjz added a commit to njzjz/deepmd-kit that referenced this issue Nov 13, 2024
Fix deepmodeling#4308.

Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
@njzjz njzjz linked a pull request Nov 13, 2024 that will close this issue
github-merge-queue bot pushed a commit that referenced this issue Nov 14, 2024
Fix #4308.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Introduced a new function to dynamically determine the backend
framework based on the model file type.
  
- **Improvements**
- Enhanced backend detection logic in multiple classes, allowing for
more flexible model initialization.
- Simplified control flow in the initialization methods of various
components.

- **Bug Fixes**
- Improved error handling for unsupported backends and model formats
during initialization processes.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
@njzjz njzjz closed this as completed Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant