[Feature Request] Reduce host graph preparation overhead for compressed DPA4C in ordinary LAMMPS
メンテナーはふだん 3 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 領域
- backend, performance
調査の方向性
Start with source/api_cc/src/DeepPotPTExpt.cc and source/api_cc/include/graph_assembly.h to trace the ordinary path’s assembleGraph and compactCanonicalGraph work; compare the device-side construction in source/lmp/pair_deepmd_kokkos.cpp. Run the supplied ordinary-versus-Kokkos benchmark and verify correctness, including exclusions and ghost mapping. Done means reducing host assembly and transfer overhead for CUDA canonical artifacts without changing the ordinary LAMMPS API or results.
索引モデルが issue の本文から書いたものです。
説明
Summary
Reduce per-step host graph construction and CPU-to-GPU transfers when ordinary LAMMPS pair_style deepmd evaluates a compressed DPA4C canonical .pt2 model on CUDA.
The gap relative to deepmd/kk grows with atom count even when running strictly serially with 24 physical CPU cores assigned to one GPU. Kokkos is an effective production path; this issue tracks a future optimization of the ordinary LAMMPS path. No correctness failure was observed.
Detailed Description
Both LAMMPS modes used the same compressed DPA4C Air model, executable and DeePMD runtime. Each measurement ran alone on GPU 0 with physical CPU cores 0–23; no concurrent benchmark jobs were running.
- NVIDIA RTX PRO 6000 Blackwell Server Edition.
- Intel Xeon Platinum 8558P; 24 physical cores local to the GPU.
- LAMMPS 4 Jul 2026, Kokkos 5.1.99, PyTorch 2.13.0+cu130.
- One MPI rank; ordinary LAMMPS uses 24 OpenMP threads. Kokkos uses its GPU execution space and one LAMMPS host thread, with the same CPU-core allocation.
- DPA4C Air compressed float32 canonical artifact,
lower_input_kind=dpa4c_canonical. - Periodic diamond carbon, lattice constant 3.567 Å, small Gaussian positional perturbations, initial temperature 300 K.
- NVE, 1 fs timestep, 20 warmup steps followed by 100 measured steps.
- Three independent runs per configuration; the table reports medians.
- Throughput is atoms divided by complete MD seconds per step. Export, compression, loading and warmup are excluded.
| Path | 512 atoms | 3,136 atoms | 9,680 atoms | 49,248 atoms |
|---|---|---|---|---|
| Ordinary LAMMPS, compressed | 310,375 | 794,813 | 927,621 | 753,016 |
| Kokkos LAMMPS, compressed | 585,428 | 2,836,777 | 4,239,738 | 6,439,693 |
All values are in atoms/s.
An additional instrumented run at 49,248 atoms and 24 CPU cores measured the following approximate shares within the DeePMD C++ call:
| Stage | Share |
|---|---|
| CPU graph filtering, filling and source CSR construction | 38% |
| Main graph payload CPU-to-GPU transfers | 45% |
| Exported model execution | 12% |
| Other preparation and output handling | 5% |
The graph contains about 13.49 million skin candidates and 7.78 million active edges. The main edge/index/CSR arrays transferred each step total approximately 275 MiB, calculated from the recorded graph sizes and tensor dtypes. There were no LAMMPS neighbor-list rebuilds during the measured 49,248-atom segment. The instrumented run is separate from the throughput measurements above.
The ordinary path calls assembleGraph on the host every step and then compactCanonicalGraph. Its cached skin topology avoids rebuilding the host neighbor list, but does not eliminate per-step CPU graph assembly or edge-sized transfers. The Kokkos path constructs the compact graph on the device and supplies device pointers to canonical inference.
A possible improvement is to retain suitable cached topology on the device and perform cutoff filtering, geometry updates and compact graph preparation there for CUDA canonical artifacts, while preserving exclusions, ghost mapping and the existing ordinary LAMMPS API.
Further Information, Files, and Links
Build provenance: these measurements use a local development build based on upstream 5b9fe0716442b0346336c0242b16d5c464da8162, with local model/kernel changes. The host graph assembly and LAMMPS pair-style files linked below are unchanged from that upstream revision. Absolute model throughput is therefore a development-build measurement; both compared LAMMPS modes use the identical artifact and runtime.
Relevant upstream code:
- Ordinary graph assembly and canonical dispatch
- Host graph assembly and transfers
- Kokkos compact graph construction and device inference
The relevant runtime controls are:
export CUDA_VISIBLE_DEVICES=0
export OMP_NUM_THREADS=24
export MKL_NUM_THREADS=24
export OPENBLAS_NUM_THREADS=1
export DP_INTRA_OP_PARALLELISM_THREADS=24
export DP_INTER_OP_PARALLELISM_THREADS=1
export DP_TF32_INFER=0
taskset -c 0-23 lmp -in in.lammps
taskset -c 0-23 lmp -k on g 1 -sf kk -pk kokkos neigh full newton off -in in.lammps
Both commands use the same input and compressed model:
units metal
boundary p p p
atom_style atomic
atom_modify map yes sort 0 0.0
read_data diamond.data
pair_style deepmd compressed.pt2
pair_coeff * * C
neighbor 1.0 bin
neigh_modify every 1 delay 0 check yes
fix integrate all nve
timestep 0.001
thermo 100
run 20
run 100
The data file includes the shared initial velocities. Initial energy, force and stress comparisons passed; the maximum initial force difference across the measured paths was about 1.63e-5 eV/Å.
Related: #5595 covers an earlier DPA4 host-marshalling report. This follow-up concerns the current compressed DPA4C canonical path and its assembleGraph / compactCanonicalGraph preparation.
- 主要言語
- Python
- スター
- 2.1k
- フォーク
- 659
- 平均マージ
- 4日 2時間
- マージ済み PR(30日)
- 6
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
deepmodeling/deepmd-kit のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
deepmodeling/deepmd-kit#6038 · コメント 2 件 ·
メンテナーはふだん 3 日以内に返信
-
Docs enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
deepmodeling/deepmd-kit#5766 · コメント 1 件 ·
メンテナーはふだん 3 日以内に返信
-
[Code scan] Symmetrize ASE calculator stress after reshaping virial対応中かも @njzjz が 94 日前に担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
deepmodeling/deepmd-kit#5689 · コメント 2 件 ·
メンテナーはふだん 3 日以内に返信
-
[Code scan] Freeze Paddle DPA3 parameters with stop_gradient対応中かも @njzjz が 94 日前に担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
deepmodeling/deepmd-kit#5686 · コメント 1 件 ·
メンテナーはふだん 3 日以内に返信
-
branch: master lang: py todo comment type: todo
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
deepmodeling/deepmd-kit#5480 ·
メンテナーはふだん 3 日以内に返信
deepmodeling/deepmd-kit の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
cellrishi-code/claude-skills-atlas#165 ·
メンテナーはふだん 1 日以内に返信
-
bug confirmed issue
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
open-webui/open-webui#32635 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Filters: ?field:ne=null matches NULL rows instead of non-NULL ones対応中かも @rshdhere が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
Netflix/metaflow-service#504 ·
-
needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
gke-labs/kube-agents#3394 ·
メンテナーはふだん 1 日以内に返信
-
A2A audit timestamps end in +00:00Z (invalid ISO 8601)対応中かも @O1sumitkumar が今日担当しました。 オープンbug good first issue help wanted python
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信