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
refactor(dense): apply model-level pair_exclude at nlist BUILD, completing A4
Decision #18/A4 (user, 2026-07-04): exclusion is applied ONCE when the neighbor
list is built, not re-masked per forward — SAME design as the graph route. The
A4 execution had wired pair_excl into the builders but left the atomic-model
seam as an 'idempotent backstop' and never connected the callers, so in-tree
dense ran on the backstop alone. This completes the port and removes the
backstop:
- base_atomic_model.forward_common_atomic: DROP the internal
apply_pair_exclusion_nlist; the dense lower now consumes a pre-excluded
nlist (contract documented; negative-contract test added)
- dpmodel model_call_from_call_lower: pass pair_excl to builder.build (was
never passed); extend_input_and_build_neighbor_list gains pair_excl
- out-stat model_forward helper: build with pair_excl
- SpinModel.process_spin_input_lower: the virtual-atom nlist extension IS the
build site of the spin-extended nlist — fold the backbone's pair_excl in
there (universal spin forward==forward_lower holds, 527 tests)
- pt_expt: DeepEval dense builders (native strategy + inline + ASE) and the
compiled-training dense branch build with pair_excl;
_graph_pair_excl renamed _model_pair_excl (serves both routes)
- jax: jax2tf TF wrapper gains a TF twin of the erasure (flat keep-table
gather); jax2tf serialization + HLO wrapper (pair_excl rebuilt from
model_def_script) + trainer prepare_input pass pair_excl at build
- C++: applyPairExclusionNlist RESTORED as the single application site on the
C++ dense route (its earlier removal was misaligned with A4); all
'idempotent backstop' comments rewritten as build-time ownership statements
- tests: dense negative-contract test (lower must NOT re-apply); consistency
TestEnerLower harness pre-excludes at build (legacy pt/pd re-apply
internally = idempotent no-op, so cross-backend equality holds);
test_dp_atomic_model excl-consistency feeds md0 a pre-excluded nlist;
pt_expt graph-vs-dense lower parity pre-excludes the dense side
0 commit comments