Skip to content

fix(pd): shape send list by swap count#5850

Open
njzjz-bot wants to merge 1 commit into
deepmodeling:masterfrom
njzjz-bot:fix/paddle-send-list-swap-shape-5659
Open

fix(pd): shape send list by swap count#5850
njzjz-bot wants to merge 1 commit into
deepmodeling:masterfrom
njzjz-bot:fix/paddle-send-list-swap-shape-5659

Conversation

@njzjz-bot

Copy link
Copy Markdown
Contributor

Closes #5659.

Summary

  • pack exactly one Paddle communication send-list pointer address per MPI swap
  • reshape send_list from the packed pointer-array length (nswap) instead of sum(sendnum)
  • keep send_num as the independent per-swap atom count consumed by the border communication op
  • add a regression with nswap=2 and sendnum={3,4} so pointer-array length cannot be confused with the seven total sent atoms

Why existing tests missed this

The universal Paddle fixture uses an SE(A) model without message passing, so DeepPotPD never constructs communication tensors. The Paddle LAMMPS MPI case is skipped and uses the same non-message-passing model. Existing send-list tests covered NULL-atom remapping and send/receive counts, while the Paddle input specification accepts a dynamic send_list length; none asserted that the pointer-address tensor contains one entry per swap.

Validation

  • ruff format .
  • ruff check .
  • clang-format --dry-run --Werror on all changed C++ files
  • built runUnitTests_cc
  • TestRemapCommSendlist.*: 5 passed, including the nswap != sum(sendnum) regression

The local environment does not include the Paddle inference SDK, so the Paddle-enabled compile/integration job is left to CI.

Coding agent: Codex
Codex version: codex-cli 0.144.4
Model: gpt-5.6-sol
Reasoning effort: xhigh

Pack exactly one send-list pointer address per communication swap and shape
the Paddle tensor from that packed array instead of the total atom send count.

Add a regression with two swaps and seven sent atoms to keep pointer-array
length independent from per-swap send counts.

Coding-Agent: Codex
Codex-Version: codex-cli 0.144.4
Model: gpt-5.6-sol
Reasoning-Effort: xhigh
@dosubot dosubot Bot added the bug label Jul 16, 2026
@github-actions github-actions Bot added the C++ label Jul 17, 2026
@codecov

codecov Bot commented Jul 17, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 85.71429% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.32%. Comparing base (6c3b985) to head (5af9aa5).

Files with missing lines Patch % Lines
source/api_cc/src/DeepPotPD.cc 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5850      +/-   ##
==========================================
- Coverage   78.58%   78.32%   -0.26%     
==========================================
  Files        1050     1050              
  Lines      120637   120643       +6     
  Branches     4356     4356              
==========================================
- Hits        94801    94497     -304     
- Misses      24278    24579     +301     
- Partials     1558     1567       +9     

☔ 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.

@njzjz

njzjz commented Jul 18, 2026

Copy link
Copy Markdown
Member

Possible reviewers based on changed lines, exact file history, and exact-file review history:

  • @wanghan-iapcm — 11 commits on changed files; 35 reviews on exact changed files (source/api_cc/include/common.h, source/api_cc/src/DeepPotPD.cc, source/api_cc/src/common.cc).
  • @OutisLi — 16 reviews on exact changed files (source/api_cc/include/common.h, source/api_cc/src/common.cc).

No review request was made automatically.

Coding agent: Codex
Codex version: codex-cli 0.144.4
Model: gpt-5.6-sol
Reasoning effort: xhigh

@njzjz
njzjz requested review from OutisLi and wanghan-iapcm July 18, 2026 07:20
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.

[Code scan] Shape Paddle send_list by swap count, not send count

2 participants