Crypto mining has been a portion but in no way “most of” the reason NVDA and AMD have risen. Machine learning, AI, and self driving are completely reliant on the products provided by the aforementioned.
There are coins that can't be mined on ASICs and they're only profitable to be mined on GPUs - Ethereum and zCash are 2 examples, but there are many more.