Move PartitionSpec layering to the optimizer to allow more users of DistributedShampoo.
Move PartitionSpec layering to the optimizer to allow more users of DistributedShampoo.

PiperOrigin-RevId: 422277561

google-research/google-research,google-research/google-research,google-research/google-research,google-research/google-research,google-research/google-research,google-research/google-research,google-research/google-research,google-research/google-research,google-research/google-research,google-research/google-research,google-research/google-research