Repository navigation
nvidia_configs: add nequip and allegro envs hosting the nequip.net foundation models - #232
Open
OwenPriceSkelly wants to merge 4 commits into
Open
OwenPriceSkelly wants to merge 4 commits into
OwenPriceSkelly wants to merge 4 commits into
Conversation
…undation models
nequip.py serves NequIP-OAM-{S,M,L,XL} and NequIP-MP-L; allegro.py serves
Allegro-OAM-L and Allegro-MP-L; both declare a <family>:custom entry with a
setup_from_path hook (.nequip.zip, .ckpt, or a ready .nequip.pt2).
Package files are pinned Zenodo artifacts, md5-checked and fetched directly
into the shared cache: nequip's own nequip.net loader queries the nequip.net
API even on a cache hit, which fails on offline workers.
On GPU, setup() AOTInductor-compiles each model once per (model, sm arch,
torch, nequip) into {cache}/nequip/compiled, or a per-user dir under
TORCHINDUCTOR_CACHE_DIR when the shared cache is read-only. The compile runs
in a child process that moves its own output into place, so a worker killed
by a startup timeout still leaves a usable cache entry. When no CUDA toolkit
is loaded, CUDA headers come from the env's cuda-toolkit[cccl,nvcc] wheels
and -lcuda resolves through a temporary symlink to the loaded driver. CPU
(including rootstock add's download step) runs eager.
modal_app.py gains probe_nequip/probe_allegro plus extra_index_url, cpu and
timeout options on probe_image, so the probes build against the configs'
cu128 torch. Validated on Modal (A10G, 8 CPU): fresh compiles of
Allegro-OAM-L ~2 min, NequIP-OAM-L ~4.6 min, NequIP-OAM-XL ~6.4 min.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
torch.utils.cpp_extension imports setuptools at module level and uv venvs do not seed it, so the first GPU compile on the ALCF install died with ModuleNotFoundError before compiling anything. Modal's base image had it preinstalled, which is why the probes passed. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
AOTInductor builds its C++ wrapper with $CXX (default g++) using gcc-style flags. Polaris's default PrgEnv exports CXX=nvc++ and CC=nvc, so every compile on the ALCF install died with "nvc++-Error-Unknown switch". The compile child now keeps the caller's CXX only if it is gcc >= 9 or clang, otherwise takes the first qualifying g++-14..g++-9, g++ or clang++ on PATH, and sets CC to the matching C compiler for Triton's helper build. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With CUDA_HOME unset, torch derives it from nvcc on PATH. On Polaris that nvcc is the NVIDIA HPC SDK wrapper, so the AOTInductor build got -I .../hpc_sdk/.../compilers/include: the SDK's own immintrin.h (which g++ rejects) and no cuda.h. The compile child now uses CUDA_HOME, CUDA_PATH or nvcc's toolkit only when it has include/cuda.h, and otherwise sets CUDA_HOME to the CUDA wheel headers explicitly so torch does not fall back to nvcc. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Re-adds
nequipandallegroto the NVIDIA catalog (both were pruned on 2026-07-30 because they had no checkpoints to ship). They now host the pretrained foundation models published on nequip.net:nequipnequip-oam-s,nequip-oam-m,nequip-oam-l,nequip-oam-xl,nequip-mp-l,nequip:customallegroallegro-oam-l,allegro-mp-l,allegro:custommir-group/<model>:0.1to), md5-checked and downloaded into the shared cache atrootstock addtime. They're fetched directly because nequip's ownnequip.net:loader queries the nequip.net API even when the file is already cached, which fails on offline workers.setup()compiles each model once with nequip's AOTInductor path (--target ase) for each combination of model, GPU architecture (sm), torch version and nequip version. The result is cached in{cache}/nequip/compiled/, or in a per-user dir underTORCHINDUCTOR_CACHE_DIRwhen the shared cache is read-only. The compile runs in a child process that moves its own output into place, so a worker killed by the startup timeout still leaves a usable cache entry.setup_kwargs={"compile": False}runs eager instead.cuda-toolkit[cccl,nvcc]wheels, and-lcudaresolves through a temporary symlink to the driver library the process has loaded.rootstock add'sdevice="cpu"download step. This uses nequip's privateNequIPCalculator._from_saved_model, which is whynequipis pinned to<0.20.setup_from_pathaccepts.nequip.zip,.ckpt, or an already-compiled.nequip.pt2.modal_app.py: addsprobe_nequip/probe_allegro, plusextra_index_url,cpuandtimeoutoptions onprobe_image, so the probes build against the configs' cu128 torch.Testing
setup_from_pathon the cached package matchedsetup(). The AOTInductor CPU compile also matched eager to within 2e-5 eV.probe_nequippasses fornequip-oam-s,-land-xl, andprobe_allegropasses forallegro-oam-l, including fresh compiles. Compile times: Allegro-OAM-L about 2 min, NequIP-OAM-L about 4.6 min, NequIP-OAM-XL about 6.4 min.pytest tests/sample_configspasses, including thesetup_from_pathsignature contract.ruff checkandruff format --checkare clean on the touched files.Notes for review
timeout=/--verify-timeout.CXX.🤖 Generated with Claude Code