Skip to content

feat(dp): add GPU-resident edge compute path for DPA4/SeZM models#1601

Draft
SchrodingersCattt wants to merge 1 commit into
brucefan1983:masterfrom
SchrodingersCattt:feat/dp-gpu-edges
Draft

feat(dp): add GPU-resident edge compute path for DPA4/SeZM models#1601
SchrodingersCattt wants to merge 1 commit into
brucefan1983:masterfrom
SchrodingersCattt:feat/dp-gpu-edges

Conversation

@SchrodingersCattt

@SchrodingersCattt SchrodingersCattt commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Summary

Add a fully GPU-resident edge-based compute path (compute_gpu_edges) for DPA4/SeZM models in the Deep Potential integration, eliminating all host-device data transfers per MD step for large-box simulations.

Modification

  1. Replace DP_Data cell-list with Neighbor class — uses skin-based amortized neighbor-list rebuild, consistent with other potentials in GPUMD.

  2. Add compute_gpu_edges() device path — when cutoff < L/2 for all periodic directions:

    • Builds global neighbor list at rc + skin on GPU (amortized)
    • Filters to local list within rc per step
    • Materializes compact [2, nedge] edge schema via dp_fill_edges kernel
    • Calls deep_pot.compute_edges_gpu() (new DeePMD-kit device API)
    • Scatters outputs via dp_scatter_outputs kernel
    • Zero host-device copies per step
  3. Simplify fallback path (small boxes where cutoff >= L/2):

    • Delegates PBC handling entirely to DeePMD (deep_pot.compute() without nlist)
    • Removes explicit ghost atom construction (caused force inconsistency for message-passing networks)
    • Handles non-periodic dirs by inflating box (orthogonal + triclinic)
  4. Remove profiling infrastructure (DP_Profile_Record, env-var GPUMD_DP_PROFILE) — re-addable in follow-up.

Dependencies

Others

Co-authored-by: OutisLi (DeePMD-kit device API author)

- Replace DP_Data cell-list with Neighbor class (skin-based amortized rebuild)
- Add compute_gpu_edges() for fully device-resident inference (no host transfers)
- Simplify fallback path: delegate PBC handling to DeePMD internally
- Remove profiling infrastructure (can be re-added later if needed)
- Support non-periodic directions via box inflation (orthogonal + triclinic)

Co-authored-by: OutisLi <137472077+OutisLi@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant