Skip to content

revert(ci): undo AOTI .pt2 compile / GPU test overlap (#5882) - #5916

Merged
wanghan-iapcm merged 1 commit into
deepmodeling:masterfrom
njzjz:revert-5882
Jul 28, 2026
Merged

revert(ci): undo AOTI .pt2 compile / GPU test overlap (#5882)#5916
wanghan-iapcm merged 1 commit into
deepmodeling:masterfrom
njzjz:revert-5882

Conversation

@njzjz-bot

@njzjz-bot njzjz-bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

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:

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

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.

)

This reverts commit f62c3c9 (deepmodeling#5882),
undoing the CUDA CI orchestration it added: the two-lane pytest split
(`-m aoti_compile` vs the remainder), the `aoti_compile` marker machinery
in source/tests/conftest.py, the persistent AOTInductor cache, the
per-lane JUnit upload, and the phase-gating/atomic-.so-install changes in
source/install/test_cc_local.sh.

Conflict resolution against later commits that touched the same regions:
- Preserve the actions/setup-python@v7 bump (deepmodeling#5898) and the
  actions/upload-artifact@v7 bump (deepmodeling#5900) -- unrelated dependency bumps
  that landed inside regions deepmodeling#5882 had modified. Only deepmodeling#5882's additions
  (the cache blocks and the JUnit upload step) are removed.
- Preserve the native-spin / bridging DPA4 fixture generators
  (gen_dpa4_spin.py, gen_dpa4_zbl.py, gen_dpa4_spin_chgspin.py,
  gen_dpa4_spin_zbl.py) added by deepmodeling#5884; they are independent test fixtures
  that run under the restored single-lane flow. The matching entry deepmodeling#5884
  added to _AOTI_COMPILE_MODULES is dropped along with that set, since the
  whole aoti_compile partition feature is being removed (the test still
  runs, just unpartitioned).

Coding-Agent: opencode
opencode-Version: 1.18.8
Model: ustc/glm-5.2
Reasoning-Effort: max
@dosubot dosubot Bot added the build label Jul 28, 2026
@njzjz
njzjz requested a review from wanghan-iapcm July 28, 2026 12:26
@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The pull request simplifies CUDA Python CI to one pytest run, removes the shared AOTInductor cache and marker declaration, adjusts conditional framework imports, and makes local C++ build, fixture generation, and ctest execution unconditional.

Changes

CI test execution

Layer / File(s) Summary
CUDA Python test configuration and execution
.github/workflows/test_cuda.yml, pyproject.toml, source/tests/conftest.py
The CUDA workflow removes the AOTInductor cache and split pytest lanes, runs python -m pytest source/tests once, recognizes only the run marker, and imports Paddle and TensorFlow earlier when configured.
Local C++ build and test flow
source/install/test_cc_local.sh
The script removes build and ctest skip gates, performs direct CMake configure/build/install steps, copies the PyTorch custom operation directly, preserves parallel fixture generation, and always runs ctest.

Estimated code review effort: 4 (Complex) | ~45 minutes

Possibly related PRs

Suggested labels: CUDA, C

Suggested reviewers: njzjz

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the revert of AOTI compile and GPU test overlap in CI.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
source/install/test_cc_local.sh (1)

43-57: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win

Non-atomic overwrite of an already-loaded .so.

shutil.copy2 truncates and rewrites dst in place. If SHARED_LIB_DIR/libdeepmd_op_pt.so is already mapped by another process (or a rerun on a dirty runner), the overwrite can fail or leave a torn library. Copy to a temp file in the same directory and os.replace it, which is atomic and leaves existing mappings intact.

🛠️ Suggested change
-import shutil, sys
+import os, shutil, sys, tempfile
@@
-    shutil.copy2(str(so), str(dst))
+    fd, tmp = tempfile.mkstemp(dir=str(SHARED_LIB_DIR), suffix=".so.tmp")
+    os.close(fd)
+    shutil.copy2(str(so), tmp)
+    os.replace(tmp, str(dst))
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@source/install/test_cc_local.sh` around lines 43 - 57, Update the
installation branch in the embedded Python script to copy the source library to
a temporary file within SHARED_LIB_DIR, then atomically replace dst with
os.replace. Import the required temporary-file and os utilities, preserve the
existing same-file skip and missing-source behavior, and clean up any temporary
file if replacement fails.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@source/install/test_cc_local.sh`:
- Around line 43-57: Update the installation branch in the embedded Python
script to copy the source library to a temporary file within SHARED_LIB_DIR,
then atomically replace dst with os.replace. Import the required temporary-file
and os utilities, preserve the existing same-file skip and missing-source
behavior, and clean up any temporary file if replacement fails.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 9b1ddb14-c754-43dc-8f5a-6c105ced85c4

📥 Commits

Reviewing files that changed from the base of the PR and between dd0e511 and d250953.

📒 Files selected for processing (4)
  • .github/workflows/test_cuda.yml
  • pyproject.toml
  • source/install/test_cc_local.sh
  • source/tests/conftest.py
💤 Files with no reviewable changes (1)
  • source/tests/conftest.py

@wanghan-iapcm
wanghan-iapcm enabled auto-merge July 28, 2026 12:34
@codecov

codecov Bot commented Jul 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.82%. Comparing base (dd0e511) to head (d250953).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5916      +/-   ##
==========================================
- Coverage   79.07%   78.82%   -0.25%     
==========================================
  Files        1067     1067              
  Lines      123841   123841              
  Branches     4527     4527              
==========================================
- Hits        97926    97617     -309     
- Misses      24297    24606     +309     
  Partials     1618     1618              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@wanghan-iapcm
wanghan-iapcm added this pull request to the merge queue Jul 28, 2026
Merged via the queue into deepmodeling:master with commit f23c2bc Jul 28, 2026
62 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants