Nvidia will have a first-mover advantage, but AMD will be strongly motivated to win those customers, and they should be able to, eventually.
Anyway, that's my gut instinct based on how these things tend to play out. Now let's hear from e.g. actual experts in the field? :)
The better CUDA is, the more things get built on top of it.
The more things get built on top of CUDA, the better the CUDA ecosystem of tooling, frameworks, etc. gets.
The better the CUDA ecosystem is, the better CUDA is. GOTO 1.
But you're right -- lots and lots of folks will be motivated to compete.
Is that also like OpenCL vs CUDA in reverse?
Nvidia is a lonely proprietary ship in a hostile sea of open source packages. It might take 20 years if Intel and AMD fail to do anything useful, but sooner or later they'll either open source CUDA defensively or get ground down by an open library. There are a finite list of features to implement before "Runs on Nvidia" vs "Runs on any graphics card" becomes the only important box left on the bureaucrat's checklist.
The math here is literally 1st & 2nd year university subjects. That is a good short term moat, but not a defensible one long term.
AMD has been trying to catch up in the machine learning space for many years now, and it hasn't happened. For things to finally improve, I guess something needs to change internally at AMD. Even Apple Silicon, in the short time it has existed, has gained better support for ML (e.g. compare running PyTorch on Apple Silicon vs running PyTorch on AMD).
At the same time, it doesn't seem like a great moat - I think AMD should be to able compete pretty well soon.