The trade war between the U.S. and China recently took an unexpected turn, and the biggest beneficiaries look to be Nvidia (NVDA -3.14%) and Advanced Micro Devices (AMD -3.57%). Both stocks popped after news broke that the U.S. is set to ease chip export restrictions, potentially allowing the companies to resume selling their artificial intelligence (AI) chips to China.

China is a huge market that had recently been closed off to the two companies.

Nvidia will now be allowed to sell its H20 graphics processing units (GPUs), which were designed specifically to comply with prior export rules, to China. Sales were halted in April after new rules required the company to apply for a license, putting billions of dollars in revenue at risk.

Chinese flag illustration

Images source: Getty Images.

But Nvidia said that the U.S. government has assured it that licenses will be granted, and shipments could resume shortly. This marks a major policy reversal and signals that the Trump administration is softening its stance.

It's no coincidence that this follows Nvidia CEO Jensen Huang's recent meeting with President Donald Trump.

Nvidia has made it clear that it supports American job creation and wants to keep AI innovation centered in the U.S., but it was afraid that cutting off China completely would threaten the company's global leadership. It was also set to take a $5.5 billion revenue hit tied to its H20 chips.

AMD was also swept up in the news, saying that it expects to restart shipments of its MI308 AI chips once the Commerce Department resumes license reviews. AMD had warned of up to $800 million in lost revenue from the restriction.

The shift comes just weeks after Washington and Beijing agreed to ease rare-earth export restrictions and work toward a broader tech trade framework.

Nvidia is still the leader of AI infrastructure

Bringing the H20 back into China should add billions in incremental sales, but Nvidia wasn't sitting still. It had already been developing a new, fully compliant GPU -- the RTX PRO --aimed at industrial automation and smart factories. This could open up another growth vertical for the company.

While the China news is a near-term catalyst, the Nvidia story remains about much more than China. Nvidia is the dominant player in the GPU market, capturing a whopping 92% share in Q1. While the company has arguably the most powerful chips on the market, its real moat is its CUDA software platform.

Nvidia created the platform as a way to expand the use of GPUs beyond gaming, and as other markets took time to develop, the company pushed the platform into academic institutions and research labs, which is where early AI efforts were taking place. This led to CUDA becoming the software platform on which developers learned to program GPUs, and led to libraries, frameworks, and tools being built on top of it designed specifically to enhance the performance of its chips for use in AI.

Nvidia remains the leader of AI, and with China reopening, the stock got even more attractive. As such, I don't think it's too late to buy Nvidia stock, even after its recent run-up.

AMD has a huge inference opportunity

AMD isn't Nvidia, and it will likely never overtake its GPU rival. Its AI-related revenue is just a fraction of Nvidia's, but the stock could have far more upside if it can make just modest share gains.

The good news is that AMD has carved out a meaningful niche in AI inference, which is eventually expected to become the much larger market compared to AI model training. The company recently said that one of the world's largest AI model developers is using its GPUs to run a big chunk of its daily inference.

Importantly, AMD is part of a consortium that is working on the open UALink standard to challenge Nvidia's proprietary NVLink. If successful, it would allow customers to mix and match AI chips, which could open the door for more of AMD's chips being used.

The China news helps AMD, as well. The company said it expects to resume shipments of its MI308 chips once it gets license approval. Those chips were designed specifically for the Chinese market in response to prior export restrictions. Reopening China won't make or break the company, but it does provide incremental growth.

Overall, AMD is well-positioned as the market moves toward inference. It doesn't need to take a huge portion of this market -- just a slice would be enough to spur meaningful growth. Now, with China back in play, its total addressable market just got bigger. That makes the stock a solid buy, even after its recent run-up.