Skip to content

Commit f23c2bc

Browse files
njzjz-botnjzjz-bot
andauthored
revert(ci): undo AOTI .pt2 compile / GPU test overlap (#5882) (#5916)
Reverts #5882 — "ci(cuda): overlap AOTI .pt2 compiles with GPU unit tests". This undoes the CUDA CI orchestration that PR added: - The two-lane pytest split in `test_python` (`-m aoti_compile` vs `-m "not aoti_compile"`). - The `aoti_compile` pytest marker machinery in `source/tests/conftest.py` (producer list, `pytest_collection_modifyitems` tagging, and the runtime drift guard). - The `aoti_compile` marker registration in `pyproject.toml`. - The persistent `AOTInductor` compile cache (`actions/cache`) in both CUDA jobs. - The per-lane JUnit report upload. - The phase-gating (`DP_CC_SKIP_BUILD` / `DP_CC_SKIP_CTEST`) and atomic `.so` install changes in `source/install/test_cc_local.sh`. The serial `python -m pytest source/tests` invocation and the original `test_cc_local.sh` flow are restored. ## Conflict resolution `#5882` was followed by unrelated commits that touched the same regions. The revert preserves those later changes and only undoes `#5882`: - **Dependabot bumps preserved:** `actions/setup-python@v7` (#5898) and `actions/upload-artifact@v7` (#5900) are kept. Only `#5882`'s additions (the `actions/cache` blocks and the JUnit upload step) are removed; the version bumps that landed in the same context stay. - **DPA4 test fixtures preserved (#5884):** the native-spin / bridging fixture generators `gen_dpa4_spin.py`, `gen_dpa4_zbl.py`, `gen_dpa4_spin_chgspin.py`, and `gen_dpa4_spin_zbl.py` are kept in `test_cc_local.sh` (re-indented to the restored single-lane flow). The matching entry `#5884` added to `_AOTI_COMPILE_MODULES` is dropped together with that set, since the whole `aoti_compile` partition feature is being removed — the `test_zbl_bridging` module still runs, just unpartitioned. - Unrelated `docs` dependency bumps in `pyproject.toml` (sphinx / myst) are untouched. Net result: `conftest.py` matches its pre-`#5882` state exactly; `test_cuda.yml` differs from pre-`#5882` only by the preserved `setup-python@v7` bumps; `test_cc_local.sh` differs only by the preserved DPA4 fixtures; `pyproject.toml` differs only by the preserved `docs` dependency bumps. --- Coding agent: opencode opencode version: 1.18.8 Model: ustc/glm-5.2 Reasoning effort: max <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Tests** * Streamlined CUDA test execution with a single comprehensive test run and simplified environment settings. * Improved test setup compatibility for Paddle and TensorFlow imports. * Updated test marker configuration to support the current test suite. * **Chores** * Improved local C++ build, installation, fixture generation, and validation workflows. * C++ tests now run automatically after successful builds. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Co-authored-by: njzjz-bot <njzjz.bot@gmail.com>
1 parent e8abf38 commit f23c2bc

4 files changed

Lines changed: 107 additions & 351 deletions

File tree

.github/workflows/test_cuda.yml

Lines changed: 1 addition & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -19,29 +19,13 @@ jobs:
1919
runs-on: gpu
2020
# The serial Python test suite can take several hours on the GPU runner.
2121
timeout-minutes: 480
22-
# Share ONE AOTInductor on-disk compile cache across the two pytest lanes;
23-
# actions/cache (below) persists it across runs so unchanged models never
24-
# recompile.
25-
env:
26-
TORCHINDUCTOR_CACHE_DIR: ${{ github.workspace }}/.inductor-cache
2722
# https://github.com/deepmodeling/deepmd-kit/pull/2884#issuecomment-1744216845
2823
# container:
2924
# image: nvidia/cuda:12.9.1-cudnn-devel-ubuntu22.04
3025
# options: --gpus all
3126
if: github.repository_owner == 'deepmodeling' && (github.event_name == 'pull_request' && github.event.label && github.event.label.name == 'Test CUDA' || github.event_name == 'workflow_dispatch' || github.event_name == 'merge_group')
3227
steps:
3328
- uses: actions/checkout@v7
34-
- name: Cache AOTInductor compile artifacts
35-
# Restored AFTER checkout so checkout's git-clean can't wipe it. The repo
36-
# Actions cache is capped at 10 GB; if the inductor cache outgrows it the
37-
# oldest entries are evicted -- correctness is unaffected (inductor
38-
# re-validates each graph; a miss just recompiles).
39-
uses: actions/cache@v6
40-
with:
41-
path: ${{ github.workspace }}/.inductor-cache
42-
key: inductor-cuda-${{ github.sha }}
43-
restore-keys: |
44-
inductor-cuda-
4529
- uses: actions/setup-python@v7
4630
with:
4731
python-version: "3.11"
@@ -78,84 +62,23 @@ jobs:
7862
DP_ENABLE_NATIVE_OPTIMIZATION: 1
7963
DP_ENABLE_PYTORCH: 1
8064
- run: dp --version
81-
- name: Run Python tests (overlap CPU-bound aoti compiles with the GPU lane)
82-
# Two pytest lanes on one GPU box:
83-
# Lane 1 (CPU stream): the .pt2-freezing tests (-m aoti_compile) --
84-
# CPU-bound, GPU ~98% idle while inductor/g++/ptxas run.
85-
# Lane 2 (GPU stream): the GPU-bound remainder (-m "not aoti_compile")
86-
# -- the bulk of the suite and the wall-clock bottleneck. It does not
87-
# freeze .pt2, so it only reads the inductor cache, never competing
88-
# to write.
89-
# Wall-clock becomes max(lane 1, lane 2) instead of their sum; the whole
90-
# compile stream is hidden behind the GPU lane. (The C++ build + fixture
91-
# generation runs in the separate test_cc job.)
92-
run: |
93-
# Cap the compile lane's inductor threads to ~half the cores so lane 2
94-
# keeps CPU for its host-side GPU dispatch; nice the compile work too.
95-
nc=$(( $(nproc) / 2 )); [ "$nc" -lt 1 ] && nc=1
96-
# rc=0 + `|| rc=$?` so a lane's failure does not let the step's default
97-
# `set -e` skip the wall-clock echo (the timing we most want on failure).
98-
( ta=$(date +%s); rc=0
99-
TORCHINDUCTOR_COMPILE_THREADS=$nc nice -n 15 \
100-
python -m pytest source/tests -m "aoti_compile" \
101-
-p no:cacheprovider --junit-xml=junit-aoti.xml || rc=$?
102-
# pytest exit 5 == "no tests collected"; harmless for the compile lane.
103-
[ "$rc" = 5 ] && rc=0
104-
echo "[lane aoti_compile] wall=$(( $(date +%s) - ta ))s exit=$rc"
105-
exit $rc ) &
106-
pid_a=$!
107-
( tb=$(date +%s); rc=0
108-
python -m pytest source/tests -m "not aoti_compile" \
109-
-p no:cacheprovider --junit-xml=junit-gpu.xml || rc=$?
110-
echo "[lane gpu] wall=$(( $(date +%s) - tb ))s exit=$rc"
111-
exit $rc ) &
112-
pid_b=$!
113-
rc_a=0; wait $pid_a || rc_a=$?
114-
rc_b=0; wait $pid_b || rc_b=$?
115-
echo "lane exit codes: aoti_compile=$rc_a gpu=$rc_b"
116-
exit $(( rc_a != 0 || rc_b != 0 ))
65+
- run: python -m pytest source/tests
11766
env:
11867
NUM_WORKERS: 0
11968
CUDA_VISIBLE_DEVICES: 0
12069
# See https://jax.readthedocs.io/en/latest/gpu_memory_allocation.html
12170
XLA_PYTHON_CLIENT_PREALLOCATE: false
12271
XLA_PYTHON_CLIENT_ALLOCATOR: platform
12372
FLAGS_use_stride_compute_kernel: 0
124-
- name: Upload per-lane JUnit reports
125-
# junit-aoti.xml = compile lane (T_A), junit-gpu.xml = GPU lane (T_B);
126-
# used to compare the two lanes against the pre-split serial baseline.
127-
if: always()
128-
uses: actions/upload-artifact@v7
129-
with:
130-
name: cuda-pytest-junit
131-
path: |
132-
junit-aoti.xml
133-
junit-gpu.xml
134-
if-no-files-found: warn
13573

13674
test_cc:
13775
name: Test C++ on CUDA
13876
runs-on: gpu
139-
# The gen_*.py fixture builds drive the same AOTInductor backend on the same
140-
# architectures as the Python lanes, so they reuse the kernels cached by
141-
# test_python / previous runs.
142-
env:
143-
TORCHINDUCTOR_CACHE_DIR: ${{ github.workspace }}/.inductor-cache
14477
if: github.repository_owner == 'deepmodeling' && (github.event_name == 'pull_request' && github.event.label && github.event.label.name == 'Test CUDA' || github.event_name == 'workflow_dispatch' || github.event_name == 'merge_group')
14578
steps:
14679
# Jobs run on separate runners, so the C++ job needs its own complete
14780
# CUDA toolchain and Python dependency installation.
14881
- uses: actions/checkout@v7
149-
- name: Cache AOTInductor compile artifacts
150-
# Restored AFTER checkout so checkout's git-clean can't wipe it. Both
151-
# CUDA jobs share the same key; if both try to save it, the second save
152-
# is skipped with a warning (caches are immutable), which is harmless.
153-
uses: actions/cache@v6
154-
with:
155-
path: ${{ github.workspace }}/.inductor-cache
156-
key: inductor-cuda-${{ github.sha }}
157-
restore-keys: |
158-
inductor-cuda-
15982
- uses: actions/setup-python@v7
16083
with:
16184
python-version: "3.11"

pyproject.toml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -495,10 +495,7 @@ runtime-evaluated-base-classes = ["torch.nn.Module"]
495495
"examples/**/*.py" = ["T20", "TID253"]
496496

497497
[tool.pytest.ini_options]
498-
markers = [
499-
"run",
500-
"aoti_compile: test freezes a .pt2 (AOTInductor) artifact -- a CPU-bound compile stage the CUDA CI runs concurrently with GPU-bound tests (auto-applied in source/tests/conftest.py)",
501-
]
498+
markers = "run"
502499
timeout = 1800
503500

504501
[tool.coverage.run]

source/install/test_cc_local.sh

Lines changed: 105 additions & 134 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,6 @@
11
#!/bin/bash
22
set -ex
33

4-
# Phase gating (default: run everything, so existing callers like test_cc.yml
5-
# are unaffected). The CUDA workflow splits the CPU-bound build+fixture-gen
6-
# from the GPU-bound ctest so the former can overlap the Python GPU tests:
7-
# DP_CC_SKIP_CTEST=1 -> configure + build + install + gen fixtures, no ctest
8-
# DP_CC_SKIP_BUILD=1 -> skip build/gen, run only ctest on the built tree
9-
DP_CC_SKIP_BUILD=${DP_CC_SKIP_BUILD:-0}
10-
DP_CC_SKIP_CTEST=${DP_CC_SKIP_CTEST:-0}
11-
124
if [ "$DP_VARIANT" = "cuda" ]; then
135
CUDA_ARGS="-DUSE_CUDA_TOOLKIT=TRUE"
146
elif [ "$DP_VARIANT" = "rocm" ]; then
@@ -28,47 +20,28 @@ BUILD_TMP_DIR=${SCRIPT_PATH}/../build_tests
2820
PADDLE_INFERENCE_DIR=${BUILD_TMP_DIR}/paddle_inference_install_dir
2921
mkdir -p ${BUILD_TMP_DIR}
3022
cd ${BUILD_TMP_DIR}
31-
32-
# LD_LIBRARY_PATH additions needed by BOTH the gen scripts (which import
33-
# deepmd.pt and dlopen the custom op .so that depends on libdeepmd.so in the
34-
# install prefix) AND ctest. Set once up front so either phase works alone.
35-
# The install prefix may not exist yet during the build; a missing dir in
36-
# LD_LIBRARY_PATH is harmless.
37-
export LD_LIBRARY_PATH=${INSTALL_PREFIX}/lib:${LD_LIBRARY_PATH}
38-
if [ "${ENABLE_PADDLE:-TRUE}" == "TRUE" ]; then
39-
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${PADDLE_INFERENCE_DIR}/third_party/install/onednn/lib:${PADDLE_INFERENCE_DIR}/third_party/install/mklml/lib
40-
fi
41-
42-
if [ "${DP_CC_SKIP_BUILD}" != "1" ]; then
43-
cmake \
44-
-D ENABLE_TENSORFLOW=${ENABLE_TENSORFLOW:-TRUE} \
45-
-D ENABLE_PYTORCH=${ENABLE_PYTORCH:-TRUE} \
46-
-D ENABLE_PADDLE=${ENABLE_PADDLE:-TRUE} \
47-
-D INSTALL_TENSORFLOW=FALSE \
48-
-D USE_TF_PYTHON_LIBS=${ENABLE_TENSORFLOW:-TRUE} \
49-
-D USE_PT_PYTHON_LIBS=${ENABLE_PYTORCH:-TRUE} \
50-
-D CMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} \
51-
-D BUILD_TESTING:BOOL=TRUE \
52-
-D LAMMPS_VERSION=stable_22Jul2025_update2 \
53-
${CUDA_ARGS} ..
54-
cmake --build . -j${NPROC}
55-
cmake --install .
56-
# Generate PT/PT2 model files for C++ tests.
57-
# Must run after cmake --build so that libdeepmd_op_pt.so (custom ops) is available.
58-
if [ "${ENABLE_PYTORCH:-TRUE}" == "TRUE" ]; then
59-
# Install the custom op .so to SHARED_LIB_DIR so that `import deepmd.pt`
60-
# loads it via cxx_op.py.
61-
#
62-
# The install MUST be atomic (copy to a temp file in the same dir, then
63-
# os.replace). shutil.copy2 overwrites the destination inode IN PLACE,
64-
# which corrupts the mmap'd code pages of any process that already
65-
# dlopen'd this .so -- e.g. the concurrent Python test lane in the CUDA
66-
# CI overlap -- and SIGSEGVs it (see #5882). os.replace swaps the
67-
# directory entry to a NEW inode instead: live mappings keep the old
68-
# (refcounted) inode intact, and new dlopens (the gen_*.py scripts) pick
69-
# up the new file.
70-
python -c '
71-
import os, shutil, sys
23+
cmake \
24+
-D ENABLE_TENSORFLOW=${ENABLE_TENSORFLOW:-TRUE} \
25+
-D ENABLE_PYTORCH=${ENABLE_PYTORCH:-TRUE} \
26+
-D ENABLE_PADDLE=${ENABLE_PADDLE:-TRUE} \
27+
-D INSTALL_TENSORFLOW=FALSE \
28+
-D USE_TF_PYTHON_LIBS=${ENABLE_TENSORFLOW:-TRUE} \
29+
-D USE_PT_PYTHON_LIBS=${ENABLE_PYTORCH:-TRUE} \
30+
-D CMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} \
31+
-D BUILD_TESTING:BOOL=TRUE \
32+
-D LAMMPS_VERSION=stable_22Jul2025_update2 \
33+
${CUDA_ARGS} ..
34+
cmake --build . -j${NPROC}
35+
cmake --install .
36+
# Generate PT/PT2 model files for C++ tests.
37+
# Must run after cmake --build so that libdeepmd_op_pt.so (custom ops) is available.
38+
if [ "${ENABLE_PYTORCH:-TRUE}" == "TRUE" ]; then
39+
# Install the custom op .so to SHARED_LIB_DIR so that `import deepmd.pt`
40+
# loads it via cxx_op.py. The .so depends on libdeepmd.so (compute
41+
# kernels) in the install prefix, so add that to LD_LIBRARY_PATH too.
42+
export LD_LIBRARY_PATH=${INSTALL_PREFIX}/lib:${LD_LIBRARY_PATH}
43+
python -c '
44+
import shutil, sys
7245
from pathlib import Path
7346
from deepmd.env import SHARED_LIB_DIR
7447
so = Path("'"${BUILD_TMP_DIR}"'") / "op" / "pt" / "libdeepmd_op_pt.so"
@@ -79,97 +52,95 @@ elif dst.exists() and dst.resolve() == so.resolve():
7952
print(f"Already linked: {dst} -> {so}")
8053
else:
8154
SHARED_LIB_DIR.mkdir(parents=True, exist_ok=True)
82-
tmp = dst.with_name(dst.name + f".tmp{os.getpid()}")
83-
shutil.copy2(str(so), str(tmp))
84-
os.replace(str(tmp), str(dst))
55+
shutil.copy2(str(so), str(dst))
8556
print(f"Installed {so} -> {dst}")
8657
'
87-
# When the build uses -fsanitize=leak, the custom op .so requires the LSAN
88-
# runtime to be preloaded (otherwise dlopen fails). We disable leak detection
89-
# in the gen scripts to avoid false reports from torch/paddle internals.
90-
INFER_SCRIPT_PATH=${SCRIPT_PATH}/../tests/infer
91-
# Remove stale generated model files so they can't be accidentally reused
92-
# if gen scripts change format or the code version changes.
93-
rm -f ${INFER_SCRIPT_PATH}/*.pt2 ${INFER_SCRIPT_PATH}/*.pte
94-
_GEN_ENV=""
95-
if echo "${CXXFLAGS:-}" | grep -q fsanitize=leak; then
96-
_LSAN_LIB=$(gcc -print-file-name=liblsan.so 2>/dev/null || true)
97-
if [ -n "${_LSAN_LIB}" ] && [ -f "${_LSAN_LIB}" ]; then
98-
# DP_GEN_UNDER_SANITIZER: explicit signal for gen scripts that need
99-
# to skip sanitizer-incompatible sections (e.g. gen_dpa2.py's
100-
# AOTInductor graph .pt2 eval, which can SEGV under the LSAN
101-
# runtime). Sniffing LD_PRELOAD inside the gen script is NOT
102-
# reliable: the sanitizer runtime removes its own entry from the
103-
# process environment during startup.
104-
_GEN_ENV="LD_PRELOAD=${_LSAN_LIB} LSAN_OPTIONS=detect_leaks=0 DP_GEN_UNDER_SANITIZER=lsan"
105-
fi
58+
# When the build uses -fsanitize=leak, the custom op .so requires the LSAN
59+
# runtime to be preloaded (otherwise dlopen fails). We disable leak detection
60+
# in the gen scripts to avoid false reports from torch/paddle internals.
61+
INFER_SCRIPT_PATH=${SCRIPT_PATH}/../tests/infer
62+
# Remove stale generated model files so they can't be accidentally reused
63+
# if gen scripts change format or the code version changes.
64+
rm -f ${INFER_SCRIPT_PATH}/*.pt2 ${INFER_SCRIPT_PATH}/*.pte
65+
_GEN_ENV=""
66+
if echo "${CXXFLAGS:-}" | grep -q fsanitize=leak; then
67+
_LSAN_LIB=$(gcc -print-file-name=liblsan.so 2>/dev/null || true)
68+
if [ -n "${_LSAN_LIB}" ] && [ -f "${_LSAN_LIB}" ]; then
69+
# DP_GEN_UNDER_SANITIZER: explicit signal for gen scripts that need
70+
# to skip sanitizer-incompatible sections (e.g. gen_dpa2.py's
71+
# AOTInductor graph .pt2 eval, which can SEGV under the LSAN
72+
# runtime). Sniffing LD_PRELOAD inside the gen script is NOT
73+
# reliable: the sanitizer runtime removes its own entry from the
74+
# process environment during startup.
75+
_GEN_ENV="LD_PRELOAD=${_LSAN_LIB} LSAN_OPTIONS=detect_leaks=0 DP_GEN_UNDER_SANITIZER=lsan"
10676
fi
107-
# Run gen scripts in parallel for faster model generation.
108-
# Wait on each PID separately so any failure is caught by set -e.
109-
env ${_GEN_ENV} python ${INFER_SCRIPT_PATH}/gen_sea.py &
110-
PID1=$!
111-
env ${_GEN_ENV} python ${INFER_SCRIPT_PATH}/gen_dpa1.py &
112-
PID2=$!
113-
env ${_GEN_ENV} python ${INFER_SCRIPT_PATH}/gen_dpa2.py &
114-
PID3=$!
115-
wait $PID1
116-
wait $PID2
117-
wait $PID3
77+
fi
78+
# Run gen scripts in parallel for faster model generation.
79+
# Wait on each PID separately so any failure is caught by set -e.
80+
env ${_GEN_ENV} python ${INFER_SCRIPT_PATH}/gen_sea.py &
81+
PID1=$!
82+
env ${_GEN_ENV} python ${INFER_SCRIPT_PATH}/gen_dpa1.py &
83+
PID2=$!
84+
env ${_GEN_ENV} python ${INFER_SCRIPT_PATH}/gen_dpa2.py &
85+
PID3=$!
86+
wait $PID1
87+
wait $PID2
88+
wait $PID3
11889

119-
env ${_GEN_ENV} python ${INFER_SCRIPT_PATH}/gen_dpa3.py &
120-
PID4=$!
121-
env ${_GEN_ENV} python ${INFER_SCRIPT_PATH}/gen_fparam_aparam.py &
122-
PID5=$!
123-
env ${_GEN_ENV} python ${INFER_SCRIPT_PATH}/gen_model_devi.py &
124-
PID6=$!
125-
env ${_GEN_ENV} python ${INFER_SCRIPT_PATH}/gen_chg_spin.py &
126-
PID9=$!
127-
wait $PID4
128-
wait $PID5
129-
wait $PID6
130-
wait $PID9
90+
env ${_GEN_ENV} python ${INFER_SCRIPT_PATH}/gen_dpa3.py &
91+
PID4=$!
92+
env ${_GEN_ENV} python ${INFER_SCRIPT_PATH}/gen_fparam_aparam.py &
93+
PID5=$!
94+
env ${_GEN_ENV} python ${INFER_SCRIPT_PATH}/gen_model_devi.py &
95+
PID6=$!
96+
env ${_GEN_ENV} python ${INFER_SCRIPT_PATH}/gen_chg_spin.py &
97+
PID9=$!
98+
wait $PID4
99+
wait $PID5
100+
wait $PID6
101+
wait $PID9
131102

132-
env ${_GEN_ENV} python ${INFER_SCRIPT_PATH}/gen_dpa4.py &
133-
PID9=$!
134-
env ${_GEN_ENV} python ${INFER_SCRIPT_PATH}/gen_dpa1_pairexcl.py &
135-
PID10=$!
136-
wait $PID9
137-
wait $PID10
103+
env ${_GEN_ENV} python ${INFER_SCRIPT_PATH}/gen_dpa4.py &
104+
PID9=$!
105+
env ${_GEN_ENV} python ${INFER_SCRIPT_PATH}/gen_dpa1_pairexcl.py &
106+
PID10=$!
107+
wait $PID9
108+
wait $PID10
138109

139-
env ${_GEN_ENV} python ${INFER_SCRIPT_PATH}/gen_spin.py &
140-
PID7=$!
141-
env ${_GEN_ENV} python ${INFER_SCRIPT_PATH}/gen_spin_model_devi.py &
142-
PID8=$!
143-
wait $PID7
144-
wait $PID8
110+
env ${_GEN_ENV} python ${INFER_SCRIPT_PATH}/gen_spin.py &
111+
PID7=$!
112+
env ${_GEN_ENV} python ${INFER_SCRIPT_PATH}/gen_spin_model_devi.py &
113+
PID8=$!
114+
wait $PID7
115+
wait $PID8
145116

146-
# Native-spin DPA4 graph archives (baseline + model-level pair
147-
# exclusion). Without this the whole native-spin graph C++ suite
148-
# GTEST_SKIPs on the missing fixture, which is how a dead
149-
# applyPairExclusion seam in DeepSpinPTExpt went unnoticed.
150-
env ${_GEN_ENV} python ${INFER_SCRIPT_PATH}/gen_dpa4_spin.py &
151-
PID11=$!
152-
# DPA4 + analytical ZBL bridging: a linear COMPOSITION on the graph
153-
# lower, which no other C++ fixture covers.
154-
env ${_GEN_ENV} python ${INFER_SCRIPT_PATH}/gen_dpa4_zbl.py &
155-
PID12=$!
156-
# Native-spin DPA4 + charge-spin FiLM: the ONLY fixture with both
157-
# is_spin=true and dim_chg_spin>0, i.e. the only one on which the
158-
# runtime charge_spin argument of DeepSpin::compute is not inert.
159-
env ${_GEN_ENV} python ${INFER_SCRIPT_PATH}/gen_dpa4_spin_chgspin.py &
160-
PID13=$!
161-
# Native-spin DPA4 + ZBL bridging COMBINED: spin reaching a linear
162-
# composition, and the only fixture pinning that a bridged model
163-
# exports NO with-comm artifact (single-rank only by construction).
164-
env ${_GEN_ENV} python ${INFER_SCRIPT_PATH}/gen_dpa4_spin_zbl.py &
165-
PID14=$!
166-
wait $PID11
167-
wait $PID12
168-
wait $PID13
169-
wait $PID14
170-
fi
117+
# Native-spin DPA4 graph archives (baseline + model-level pair
118+
# exclusion). Without this the whole native-spin graph C++ suite
119+
# GTEST_SKIPs on the missing fixture, which is how a dead
120+
# applyPairExclusion seam in DeepSpinPTExpt went unnoticed.
121+
env ${_GEN_ENV} python ${INFER_SCRIPT_PATH}/gen_dpa4_spin.py &
122+
PID11=$!
123+
# DPA4 + analytical ZBL bridging: a linear COMPOSITION on the graph
124+
# lower, which no other C++ fixture covers.
125+
env ${_GEN_ENV} python ${INFER_SCRIPT_PATH}/gen_dpa4_zbl.py &
126+
PID12=$!
127+
# Native-spin DPA4 + charge-spin FiLM: the ONLY fixture with both
128+
# is_spin=true and dim_chg_spin>0, i.e. the only one on which the
129+
# runtime charge_spin argument of DeepSpin::compute is not inert.
130+
env ${_GEN_ENV} python ${INFER_SCRIPT_PATH}/gen_dpa4_spin_chgspin.py &
131+
PID13=$!
132+
# Native-spin DPA4 + ZBL bridging COMBINED: spin reaching a linear
133+
# composition, and the only fixture pinning that a bridged model
134+
# exports NO with-comm artifact (single-rank only by construction).
135+
env ${_GEN_ENV} python ${INFER_SCRIPT_PATH}/gen_dpa4_spin_zbl.py &
136+
PID14=$!
137+
wait $PID11
138+
wait $PID12
139+
wait $PID13
140+
wait $PID14
171141
fi
172-
173-
if [ "${DP_CC_SKIP_CTEST}" != "1" ]; then
174-
ctest --output-on-failure
142+
if [ "${ENABLE_PADDLE:-TRUE}" == "TRUE" ]; then
143+
PADDLE_INFERENCE_DIR=${BUILD_TMP_DIR}/paddle_inference_install_dir
144+
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${PADDLE_INFERENCE_DIR}/third_party/install/onednn/lib:${PADDLE_INFERENCE_DIR}/third_party/install/mklml/lib
175145
fi
146+
ctest --output-on-failure

0 commit comments

Comments
 (0)