CUDA is at the API level (ish, I know). There's plenty of room for new silicon that can expose different APIs.
Compare to switching from x86 to ARM.
Compare to switching from x86 to ARM.
Currently they seem to have a particular focus on AI frameworks and tools like PyTorch/Tensorflow/ONNX. They have sponsored and helped with a lot of PyTorch development for example, so PyTorch support for AMD is much better than it was this time last year².