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
Interleave optimizer variable creation to restore backward-compatibility. (#21247)
Added optimizer variables were orginally interleaved during `build` prior to #21232,
e.g. `{momentum0, velocity0, momentum1, velocity1, ...}`. In #21232, the order
was changed to non-interleaved for some optimizers, e.g.
`{momentum0, momentum1, ..., velocity0, velocity1, ...}`. This broke some
custom checkpoint serialization compatibility that relied on the order of
variables remaining consistent.
Here we modify the base function `add_optimizer_variables(...)` to support
creating multiple optimizer variables per training variable, and interleaves
creation to restore backward compatibility.
0 commit comments