Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/workflows/build_wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ jobs:
# https://github.com/pypa/setuptools_scm/issues/480
fetch-depth: 0
- name: Install uv
run: curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/uv/releases/download/0.2.24/uv-installer.sh | sh
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
with:
version: "0.12.0"
if: runner.os != 'Linux'
- name: Build wheels
uses: pypa/cibuildwheel@v4.1
Expand All @@ -68,6 +70,9 @@ jobs:
CUDA_VERSION: ${{ matrix.cuda_version }}
DP_PKG_NAME: ${{ matrix.dp_pkg_name }}
CIBW_BUILD_FRONTEND: "build[uv]"
# uv defaults to 50 concurrent downloads, which can exhaust the
# macOS runner's socket buffers while installing wheel test extras.
UV_CONCURRENT_DOWNLOADS: ${{ startsWith(matrix.platform_id, 'macosx_') && '8' || '50' }}
- uses: actions/upload-artifact@v7
with:
name: cibw-cp${{ matrix.python }}-${{ matrix.platform_id }}-cu${{ matrix.cuda_version }}-${{ strategy.job-index }}
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/test_cc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@ jobs:
testcc:
name: Test C++
runs-on: ${{ matrix.check_memleak == false && github.repository_owner == 'deepmodeling' && 'cpu' || 'ubuntu-22.04' }}
# Paddle's external interface download is occasionally unavailable. Keep
# exercising these configurations without making that outage blocking.
continue-on-error: ${{ matrix.enable_paddle }}
strategy:
# An allowed Paddle failure must not cancel the other backend jobs.
fail-fast: false
matrix:
# Only regular jobs run the LAMMPS tests. Use self-hosted CPU runners
# for those jobs in deepmodeling, with a hosted fallback for forks.
Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/test_cuda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
cancel-in-progress: true
name: Test CUDA
env:
# Temporarily disable Paddle in CUDA CI while its external downloads are
# unreliable. Keep this switch explicit so the coverage can be restored.
DP_CI_ALLOW_MISSING_PADDLE: "1"
DP_ENABLE_PADDLE: "0"
Comment thread
njzjz marked this conversation as resolved.
jobs:
test_python:
name: Test Python on CUDA
Expand Down Expand Up @@ -53,7 +58,6 @@ jobs:
- run: |
export PYTORCH_ROOT=$(python -c 'import torch;print(torch.__path__[0])')
export TENSORFLOW_ROOT=$(python -c 'import importlib.util,pathlib;print(pathlib.Path(importlib.util.find_spec("tensorflow").origin).parent)')
pip install --find-links "https://www.paddlepaddle.org.cn/packages/nightly/cu126/paddlepaddle-gpu/" --index-url https://pypi.org/simple --trusted-host www.paddlepaddle.org.cn --trusted-host paddlepaddle.org.cn "paddlepaddle-gpu==3.4.0.dev20260310"
source/install/uv_with_retry.sh pip install --system -v -e .[gpu,test,lmp,cu12,torch,jax] mpi4py --reinstall-package deepmd-kit
# See https://github.com/jax-ml/jax/issues/29042
source/install/uv_with_retry.sh pip install --system -U 'nvidia-cublas-cu12>=12.9.0.13'
Expand All @@ -62,7 +66,7 @@ jobs:
DP_ENABLE_NATIVE_OPTIMIZATION: 1
DP_ENABLE_PYTORCH: 1
- run: dp --version
- run: python -m pytest source/tests
- run: python -m pytest source/tests --ignore=source/tests/pd
env:
NUM_WORKERS: 0
CUDA_VISIBLE_DEVICES: 0
Expand Down Expand Up @@ -106,7 +110,6 @@ jobs:
- run: |
export PYTORCH_ROOT=$(python -c 'import torch;print(torch.__path__[0])')
export TENSORFLOW_ROOT=$(python -c 'import importlib.util,pathlib;print(pathlib.Path(importlib.util.find_spec("tensorflow").origin).parent)')
pip install --find-links "https://www.paddlepaddle.org.cn/packages/nightly/cu126/paddlepaddle-gpu/" --index-url https://pypi.org/simple --trusted-host www.paddlepaddle.org.cn --trusted-host paddlepaddle.org.cn "paddlepaddle-gpu==3.4.0.dev20260310"
source/install/uv_with_retry.sh pip install --system -v -e .[gpu,test,lmp,cu12,torch,jax] mpi4py --reinstall-package deepmd-kit
# See https://github.com/jax-ml/jax/issues/29042
source/install/uv_with_retry.sh pip install --system -U 'nvidia-cublas-cu12>=12.9.0.13'
Expand All @@ -127,12 +130,10 @@ jobs:
CMAKE_GENERATOR: Ninja
DP_VARIANT: cuda
DP_USE_MPICH2: 1
ENABLE_PADDLE: FALSE
- run: |
export LD_LIBRARY_PATH=$CUDA_PATH/lib64:/usr/lib/x86_64-linux-gnu/:$GITHUB_WORKSPACE/dp_test/lib:$LD_LIBRARY_PATH
export PATH=$GITHUB_WORKSPACE/dp_test/bin:$PATH
cp $GITHUB_WORKSPACE/source/build_tests/paddle_inference_install_dir/paddle/lib/* $GITHUB_WORKSPACE/dp_test/lib/
cp $GITHUB_WORKSPACE/source/build_tests/paddle_inference_install_dir/third_party/install/onednn/lib/* $GITHUB_WORKSPACE/dp_test/lib/
cp $GITHUB_WORKSPACE/source/build_tests/paddle_inference_install_dir/third_party/install/mklml/lib/* $GITHUB_WORKSPACE/dp_test/lib/
python -m pytest -s source/lmp/tests || (cat log.lammps && exit 1)
python -m pytest source/ipi/tests
env:
Expand All @@ -141,6 +142,7 @@ jobs:
TF_INTER_OP_PARALLELISM_THREADS: 1
LAMMPS_PLUGIN_PATH: ${{ github.workspace }}/dp_test/lib/deepmd_lmp
CUDA_VISIBLE_DEVICES: 0
ENABLE_PADDLE: 0
pass:
name: Pass testing on CUDA
needs: [test_python, test_cc]
Expand Down
7 changes: 6 additions & 1 deletion source/tests/consistent/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,16 @@
INSTALLED_JAX = Backend.get_backend("jax")().is_available()
INSTALLED_PD = Backend.get_backend("paddle")().is_available()
INSTALLED_ARRAY_API_STRICT = find_spec("array_api_strict") is not None
# CUDA CI may explicitly omit Paddle while its external artifacts are
# unavailable, without disabling the remaining cross-backend checks.
CI_ALLOW_MISSING_PADDLE = os.environ.get("DP_CI_ALLOW_MISSING_PADDLE") == "1"

if (
os.environ.get("CI")
and not RUN_TF2_BACKEND_TESTS
and not (INSTALLED_TF and INSTALLED_PT and INSTALLED_PD)
and not (
INSTALLED_TF and INSTALLED_PT and (INSTALLED_PD or CI_ALLOW_MISSING_PADDLE)
)
):
raise ImportError("TensorFlow, PyTorch or Paddle should be tested in the CI")

Expand Down
Loading