Skip to content

Commit fde2735

Browse files
fix unitest config
1 parent 03561c0 commit fde2735

3 files changed

Lines changed: 6 additions & 3 deletions

File tree

.github/workflows/test_cuda.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
- run: |
4848
export PYTORCH_ROOT=$(python -c 'import torch;print(torch.__path__[0])')
4949
export TENSORFLOW_ROOT=$(python -c 'import importlib.util,pathlib;print(pathlib.Path(importlib.util.find_spec("tensorflow").origin).parent)')
50-
pip install "paddlepaddle-gpu==3.2.2" -i https://www.paddlepaddle.org.cn/packages/stable/cu126/
50+
pip install --pre paddlepaddle-gpu -i https://www.paddlepaddle.org.cn/packages/nightly/cu126/
5151
source/install/uv_with_retry.sh pip install --system -v -e .[gpu,test,lmp,cu12,torch,jax] mpi4py --reinstall-package deepmd-kit
5252
env:
5353
DP_VARIANT: cuda
@@ -61,6 +61,7 @@ jobs:
6161
# See https://jax.readthedocs.io/en/latest/gpu_memory_allocation.html
6262
XLA_PYTHON_CLIENT_PREALLOCATE: false
6363
XLA_PYTHON_CLIENT_ALLOCATOR: platform
64+
FLAGS_use_stride_compute_kernel: 0
6465
- name: Convert models
6566
run: source/tests/infer/convert-models.sh
6667
- run: |

.github/workflows/test_python.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
source/install/uv_with_retry.sh pip install --system -e .[test,jax] mpi4py "jax==0.5.0;python_version>='3.10'"
3636
source/install/uv_with_retry.sh pip install --system -U setuptools
3737
source/install/uv_with_retry.sh pip install --system horovod --no-build-isolation
38-
source/install/uv_with_retry.sh pip install --system --pre "paddlepaddle==3.2.2" -i https://www.paddlepaddle.org.cn/packages/stable/cpu/
38+
source/install/uv_with_retry.sh pip install --system --pre "paddlepaddle" -i https://www.paddlepaddle.org.cn/packages/stable/cpu/
3939
env:
4040
# Please note that uv has some issues with finding
4141
# existing TensorFlow package. Currently, it uses
@@ -63,6 +63,7 @@ jobs:
6363
- run: pytest --cov=deepmd source/tests --splits 6 --group ${{ matrix.group }} --store-durations --clean-durations --durations-path=.test_durations --splitting-algorithm least_duration
6464
env:
6565
NUM_WORKERS: 0
66+
FLAGS_use_stride_compute_kernel: 0
6667
- name: Test TF2 eager mode
6768
run: pytest --cov=deepmd --cov-append source/tests/consistent/io/test_io.py source/jax2tf_tests
6869
env:

source/tests/pd/conftest.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@
66
@pytest.fixture(scope="package", autouse=True)
77
def clear_cuda_memory(request):
88
yield
9-
paddle.device.empty_cache()
9+
if paddle.device.get_device() != "cpu":
10+
paddle.device.empty_cache()

0 commit comments

Comments
 (0)