Skip to content

Commit 5385950

Browse files
author
Han Wang
committed
test(spin): the native-spin graph .pt2 must carry the with-comm artifact
test_native_spin_graph_freeze asserted has_comm_artifact is True and, six lines later, that forward_lower_with_comm.pt2 is ABSENT. Those contradict each other. The metadata assertion was updated when native spin gained multi-rank support on the graph lower (804cc57); the file assertion is a leftover from the single-rank contract that preceded it. Caught only on GPU: the CPU freeze fails earlier on this workstation's inductor AVX2 codegen bug, so the stale assertion was never reached locally, and Test CUDA runs only on the merge queue. Invert it -- the nested artifact must be present -- so the two checks agree and a regression that silently stopped embedding it would fail here.
1 parent b4afa3c commit 5385950

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

source/tests/pt_expt/model/test_dpa4_export.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,13 @@ def test_native_spin_graph_freeze(tmp_path) -> None:
466466
assert "force_mag" in md["output_keys"]
467467
for key in ("atom_energy", "energy", "force", "virial"):
468468
assert key in md["output_keys"]
469-
assert not any(n.endswith("forward_lower_with_comm.pt2") for n in names)
469+
# ... and the nested artifact must actually BE there. This assertion was
470+
# inverted while native spin was single-rank; leaving it that way made the
471+
# test contradict its own has_comm_artifact check above, and it survived
472+
# only because the CPU freeze fails earlier on an unrelated inductor bug.
473+
assert any(n.endswith("forward_lower_with_comm.pt2") for n in names), (
474+
"has_comm_artifact is True but the nested with-comm .pt2 is missing"
475+
)
470476

471477

472478
def test_native_spin_nlist_deserialize_rejected(tmp_path) -> None:

0 commit comments

Comments
 (0)