Unless you develop in CUDA, you can easily train code (e.g. PyTorch) written for training on Nvidia hardware on AMD hardware. You can even keep the .cuda() calls.
In theory. But if you actually work with that in practice, you're already going to have a bad experience installing the drivers. And it's all downhill from there.