PyTorch Version Compatibility¶
This page documents known issues with specific PyTorch versions when using NequIP framework models.
Warning
We recommend testing your workflow with your target PyTorch version before deploying to production, especially when using compilation features.
Known Issues by PyTorch Version¶
PyTorch 2.10.0¶
Issue 1: CPU + AOTInductor compilation failure¶
Affected Feature: nequip-compile --mode aotinductor --device cpu
Status: Known bug, may be fixed in future versions
Workaround: Use PyTorch 2.9.1, or use --mode torchscript, or compile for CUDA
Issue 2: AOTInductor runtime load failure in Python scripts¶
Affected Feature: Running AOTInductor-compiled models from Python, including ASE and torch-sim integrations
Error:
AttributeError: module 'torch._inductor' has no attribute 'codecache'
Status: Fixed in NequIP >=0.17.0
Workaround: Upgrade to NequIP >=0.17.0. If this error appears in your Python script, initialize NequIP global state near the top of the script:
from nequip.utils.global_state import set_global_state
set_global_state()
PyTorch 2.9.1¶
Issue: AOTInductor compilation accuracy failure on A100 GPUs
Affected Feature: nequip-compile --mode aotinductor --device cuda (with OpenEquivariance)
Reproducer: (#574)
nequip-compile \
nequip.net:mir-group/NequIP-OAM-L:0.1 \
mir-group__NequIP-OAM-L__0.1.nequip.pt2 \
--mode aotinductor \
--device cuda \
--target ase \
--modifiers enable_OpenEquivariance
Status: Known bug in PyTorch 2.9.1, compilation check fails with MaxAbsError exceeding tolerance
Workaround: Use PyTorch 2.9.0
PyTorch 2.6.0+¶
Issue: CPU train-time compilation issues
Affected Feature: compile_mode: compile on CPU
Status: Known limitation
Workaround: Avoid CPU train-time compilation; use GPU or eager mode
General CPU Compilation Advisory¶
Warning
CPU + Compilation has known problems across multiple PyTorch versions.
Be aware that there are known issues when using PyTorch compilation features on CPU devices:
nequip-compilewith--mode aotinductorTrain-time compilation with
compile_mode: compile
If you plan to use compilation on CPU, carefully test your specific workflow and PyTorch version before deployment.
Reporting Issues¶
If you encounter PyTorch version-specific issues not listed here, please open a GitHub issue with your PyTorch version, workflow details, and error messages.