deepmd_gnn.deepmd_ops#

Small compatibility hooks for DeePMD custom PyTorch ops.

Functions#

ensure_border_op_placeholder(→ None)

Install a TorchScript-visible placeholder for deepmd::border_op.

Module Contents#

deepmd_gnn.deepmd_ops.ensure_border_op_placeholder() None[source]#

Install a TorchScript-visible placeholder for deepmd::border_op.

DeePMD-kit provides the real op when its PyTorch extension is loaded. During unit tests, documentation builds, or partial imports that extension may not be present yet, but TorchScript still needs an attribute with the expected name so model classes can be scripted.