Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Auto-select the optimal NeighborGraph builder (nv/vesin/dense) by device and availability

オープン
#5,902 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 4 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
55/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
静か
技術スタック
python, pytorch

調査の方向性

deepmd/pt_expt/model/make_model.py から始め、そこにある _resolve_graph_method のポリシーを、DeepEval に既存の可用性プロービング自動モードと比較します。dense、vesin、nv の builder エントリーポイントを追跡し、既存のデバイス依存テストの規約を特定します。完了条件は、1つの共有ポリシーが両方のパスに適用され、利用可能な builder が一致するエネルギーと力を生成し、コンパイル/エクスポート時の動作がテストノートでカバーされ、大規模システムの変更前後のベンチマークでクロスオーバーを文書化することです。

索引モデルが issue の本文から書いたものです。

説明

enhancement

The pt_expt NeighborGraph route has four builders — dense (carry-all O(N²) all-pairs, always available, backend-agnostic), ase, vesin (O(N) cell list, torch bindings, works on CPU and CUDA, requires the vesin-torch package), and nv (nvalchemiops, CUDA-only, batches natively over frames) — but the model-level default (_resolve_graph_method, deepmd/pt_expt/model/make_model.py) hard-resolves None -> "dense" for training/eager, so the O(N) builders are opt-in only. DeepEval already has an availability-probing "auto" mode for inference; the same policy should drive the model-level default.

Proposed resolution ladder for None/"auto":

  • CUDA device: nv if importable, else vesin if importable, else dense.
  • CPU device: vesin if importable, else dense.

Implementation sketch:

  • One shared resolve_auto_graph_builder(device) -> str helper used by BOTH the model-level default-flip and DeepEval's auto mode (single owner of the policy).
  • Builder choice must be value-transparent: add a parity test building the same system through every available builder and asserting identical energies/forces (the builders differ only in edge enumeration order; the segment reductions are order-independent up to fp addition order — pick the tolerance per the established device-conditional convention).
  • The builder runs EAGERLY outside traced/compiled regions (export uses synthetic graph inputs; the training compile traces the lower, not the builder), so the flip does not affect .pt2 artifacts — assert that in the test notes.
  • Perf note: the graph-attention benchmark memo found the dense builder was not the bottleneck at benchmark sizes; the win is for large systems, so benchmark before/after on a large system to document the crossover.
主要言語
Python
スター
2.1k
フォーク
654
平均マージ
3日 10時間
マージ済み PR(30日)
13

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

deepmodeling/deepmd-kit のほかの issue

deepmodeling/deepmd-kit の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。