US President Donald Trump allowed Nvidia to sell products to China, leading to a temporary boost in its stock price.