def test_backward_compatibility_rng_states_dict():
    """Test that an older rng_states_dict without the "torch.cuda" key does not crash."""
    states = _collect_rng_states()
    assert "torch.cuda" in states
    states.pop("torch.cuda")
    _set_rng_states(states)
Test that an older rng_states_dict without the "torch.cuda" key does not crash.
tests/tests_fabric/utilities/test_seed.py