[SPMD] Introduce the cross-iteration graph optimization framework (#94803)
Introduce the cross-iteration graph optimization framework that allow users to write a graph optimization that moves nodes cross iterations.
Differential Revision: [D43247247](https://our.internmc.facebook.com/intern/diff/D43247247/)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/94803
Approved by: https://github.com/anj-s