is_torch_bf16_gpu_available does not check for AMD GPUs
### System Info

transformer 4.30.2
python 3.9.13.1
torch 2.0.1
rocm 5.4.2
AMD mi250x

### Who can help?

_No response_

### Information

- [ ] The official example scripts
- [ ] My own modified scripts

### Tasks

- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [X] My own task or dataset (give details below)

### Reproduction

AMD GPUs like the mi250 and mi250x support bf16. See https://www.amd.com/en/products/server-accelerators/instinct-mi250x 

`transformers.utils.import_utils.is_torch_bf16_gpu_available` returns `False` with mi250x. Additional inspection shows that the function does not check AMD gpus at all. The problem occurs because `torch.version.cuda=None` when using hip.

Steps to reproduce:
1. have AMD GPU that supports bf16
2. The problem arises when calling `transformers.TrainingArguments` and using something like `--bf16 True`.  You'll see something like this...
```python
File lib/python3.9/site-packages/transformers/training_args.py:1297, in TrainingArguments.__post_init__(self)
   1294             raise ValueError("Your setup doesn't support bf16/(cpu, tpu, neuroncore). You need torch>=1.10")
   1295         elif not self.no_cuda and torch.cuda.is_available() and not is_torch_bf16_gpu_available():
   1296             # gpu
-> 1297             raise ValueError(
   1298                 "Your setup doesn't support bf16/gpu. You need torch>=1.10, using Ampere GPU with cuda>=11.0"
   1299             )
   1301 if self.fp16 and self.bf16:
   1302     raise ValueError("At most one of fp16 and bf16 can be True, but not both")

ValueError: Your setup doesn't support bf16/gpu. You need torch>=1.10, using Ampere GPU with cuda>=11.0
```
3. It's a bit easier to call the function directly.
```python
import transformers
transformers.utils.import_utils.is_torch_bf16_gpu_available()
```
which returns `False` instead of `True`.

### Expected behavior

`transformers.utils.import_utils.is_torch_bf16_gpu_available()` should check more than just Cuda to check if bf16 is available.  

A quick work around is to add
```python
    if torch.version.hip is not None:
        return True
```
to src/transformers/utils/import_utils.py. However, I don't know which AMD GPUs actually support bf16. It looks like mi200 does as well.
We don't officially support AMD GPUs yet. This is coming soon as we get AMD GPUs to run our CI and check everything runs smoothly, so stay tuned!<|||||>This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the [contributing guidelines](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md) are likely to be ignored.