Commit b52c359
test(api): add universal DeepPot C/C++ API tests (deepmodeling#5538)
Problem
- Issue deepmodeling#3905 asks for universal C/C++ API coverage instead of one-off
backend-specific DeepPot tests.
- A first pass should stay focused and avoid rewriting the existing
large API test suite.
Change
- Add shared reference data for the common DeepPot water fixture.
- Add parameterized C++ API tests for metadata and atomic inference
across TensorFlow, PyTorch, PT-Expt, JAX, and Paddle when those
backends/artifacts are available.
- Add matching C API tests using `DP_DeepPotCompute2` /
`DP_DeepPotComputef2` and link torch in the C test target so PT-Expt
guards are detected consistently.
- After deepmodeling#5544 fixed PyTorch type-map separators, require exact type-map
metadata again and tighten the remaining PyTorch DeepTensor type-map
test similarly.
Verification
- `uvx pre-commit run --files source/api_c/tests/CMakeLists.txt
source/api_c/tests/test_deeppot_universal.cc
source/api_cc/tests/test_deeppot_universal.cc
source/tests/infer/deeppot_universal_data.h
source/api_c/tests/test_deeppot_a_ptexpt.cc
source/api_cc/tests/test_deepdipole_pt.cc`
- Local full CTest was not run because this workspace does not have a
C++ backend dependency installed; the new tests skip unavailable backend
artifacts and should be exercised by the existing C++ test job after
generated models are prepared.
Refs deepmodeling#3905
Authored by OpenClaw (model: custom-chat-jinzhezeng-group/gpt-5.5)
---------
Co-authored-by: Jinzhe Zeng <jinzhe.zeng@ustc.edu.cn>1 parent dae86a9 commit b52c359
34 files changed
Lines changed: 3002 additions & 10099 deletions
File tree
- source
- api_cc/tests
- api_c/tests
- lmp/tests
- tests/infer
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
19 | 23 | | |
20 | 24 | | |
21 | 25 | | |
| |||
This file was deleted.
0 commit comments