Warn on TPUs when the custom optimizer and model device are not the same (#18668)
Warn on TPUs when the custom optimizer and model device are not the same (#18668)

* Check optimizer for device on TPU

* Typo
huggingface/transformers,huggingface/transformers,huggingface/transformers,huggingface/transformers