torchani.compile#
Ahead-of-time compilation of models into AOTInductor packages
Warning
This module is experimental. Its API and behavior may change without warning.
The compiled package computes energies and forces from an external neighborlist, and
can be loaded without Python, from C++, using
torch::inductor::AOTIModelPackageLoader, or from Python, using
torch._inductor.aoti_load_package. Its signature is:
(species, coords, neighbor_idxs, shifts) -> (energies, forces)
with shapes (1, A), (1, A, 3), (2, P) and (P, 3). The number of atoms
A and of pairs P are dynamic. All inputs must be contiguous, and coords
must be mapped to the central cell. If the model uses cuAEV, the cuAEV extension must
be loaded by the process before running the package.
Functions
Compile a model's energies and forces into an AOTInductor package |