Chipmaking giant Nvidia is in talks with Elon Musk about investing in his fast-growing artificial intelligence startup xAI, a source close to the situation said.