@@ -29,21 +29,17 @@ jobs:
2929 - run : python -m pip install uv
3030 - name : Install Python dependencies
3131 run : |
32- source/install/uv_with_retry.sh pip install --system tensorflow-cpu
32+ source/install/uv_with_retry.sh pip install --system tensorflow-cpu~=2.18.0 jax==0.5.0
3333 export TENSORFLOW_ROOT=$(python -c 'import importlib,pathlib;print(pathlib.Path(importlib.util.find_spec("tensorflow").origin).parent)')
3434 source/install/uv_with_retry.sh pip install --system -e .[cpu,test,lmp,jax] mpi4py
35+ source/install/uv_with_retry.sh pip install --system 'torch==2.7' --index-url https://download.pytorch.org/whl/cpu
3536 - name : Convert models
3637 run : source/tests/infer/convert-models.sh
37- - name : Download libtorch
38- run : |
39- wget https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-2.1.2%2Bcpu.zip -O libtorch.zip
40- unzip libtorch.zip
4138 # https://github.com/actions/runner-images/issues/9491
4239 - name : Fix kernel mmap rnd bits
4340 run : sudo sysctl vm.mmap_rnd_bits=28
4441 if : ${{ matrix.check_memleak }}
4542 - run : |
46- export CMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/libtorch
4743 source/install/test_cc_local.sh
4844 env:
4945 OMP_NUM_THREADS: 1
@@ -52,23 +48,32 @@ jobs:
5248 LMP_CXX11_ABI_0: 1
5349 CMAKE_GENERATOR: Ninja
5450 CXXFLAGS: ${{ matrix.check_memleak && '-fsanitize=leak' || '' }}
51+ LSAN_OPTIONS: suppressions=${{ github.workspace }}/.github/workflows/suppr.txt
5552 # test lammps
56- - run : pytest --cov=deepmd source/lmp/tests
53+ - run : |
54+ cp ${{ github.workspace }}/source/build_tests/paddle_inference_install_dir/paddle/lib/*.so ${{ github.workspace }}/dp_test/lib/
55+ cp ${{ github.workspace }}/source/build_tests/paddle_inference_install_dir/third_party/install/onednn/lib/* ${{ github.workspace }}/dp_test/lib/
56+ cp ${{ github.workspace }}/source/build_tests/paddle_inference_install_dir/third_party/install/mklml/lib/* ${{ github.workspace }}/dp_test/lib/
57+ pytest --cov=deepmd source/lmp/tests
5758 env:
5859 OMP_NUM_THREADS: 1
5960 TF_INTRA_OP_PARALLELISM_THREADS: 1
6061 TF_INTER_OP_PARALLELISM_THREADS: 1
6162 LAMMPS_PLUGIN_PATH: ${{ github.workspace }}/dp_test/lib/deepmd_lmp
62- LD_LIBRARY_PATH : ${{ github.workspace }}/dp_test/lib:${{ github.workspace }}/libtorch/lib
63+ LD_LIBRARY_PATH: ${{ github.workspace }}/dp_test/lib
6364 if: ${{ !matrix.check_memleak }}
6465 # test ipi
65- - run : pytest --cov=deepmd source/ipi/tests
66+ - run : |
67+ export PATH=${{ github.workspace }}/dp_test/bin:$PATH
68+ cp ${{ github.workspace }}/source/build_tests/paddle_inference_install_dir/paddle/lib/*.so ${{ github.workspace }}/dp_test/lib/
69+ cp ${{ github.workspace }}/source/build_tests/paddle_inference_install_dir/third_party/install/onednn/lib/* ${{ github.workspace }}/dp_test/lib/
70+ cp ${{ github.workspace }}/source/build_tests/paddle_inference_install_dir/third_party/install/mklml/lib/* ${{ github.workspace }}/dp_test/lib/
71+ pytest --cov=deepmd source/ipi/tests
6672 env:
6773 OMP_NUM_THREADS: 1
6874 TF_INTRA_OP_PARALLELISM_THREADS: 1
6975 TF_INTER_OP_PARALLELISM_THREADS: 1
70- PATH : ${{ github.workspace }}/dp_test/bin:$PATH
71- LD_LIBRARY_PATH : ${{ github.workspace }}/dp_test/lib:${{ github.workspace }}/libtorch/lib
76+ LD_LIBRARY_PATH: ${{ github.workspace }}/dp_test/lib
7277 if: ${{ !matrix.check_memleak }}
7378 - uses : codecov/codecov-action@v5
7479 env :
0 commit comments