You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(pt_expt): implement .pte inference pipeline with dynamic shapes
Implement the full pt_expt inference pipeline: serialize models to .pte
files via torch.export, and load them for inference via DeepPot/DeepEval.
Key changes:
- Add DeepEval backend for .pte files (deepmd/pt_expt/infer/deep_eval.py)
- Add serialize/deserialize hooks (deepmd/pt_expt/utils/serialization.py)
- Wire up backend hooks in deepmd/backend/pt_expt.py
- Add forward_common_lower_exportable using make_fx + torch.export
- Support dynamic nframes, nloc, and nall dimensions
- Fix atomic_virial_corr to use explicit loop instead of vmap
Add xp_take_first_n helper to avoid torch.export contiguity guards on
[:, :nloc] slices. When torch.export traces tensor[:, :nloc] on a
tensor of size nall, it records a Ne(nall, nloc) guard from the view's
contiguity check, which fails when nall == nloc (no PBC). Using
torch.index_select instead creates a new tensor, avoiding the guard.
0 commit comments