No doubt the last few months have been painful for tech stocks. But with many investors selling everything related to high-growth technology, now may be a good time to take a longer-term view. That means focusing on stocks that have been recently discounted, yet still have a great competitive position amid the next big wave of technology.

Based on recent comments from Nvidia (NVDA 9.32%) CEO Jensen Huang, artificial intelligence (AI) is still in its "early innings," and is set to "be one of the largest industries of software that we have ever known."

It's no surprise that Nvidia is one of two high-octane tech companies poised to benefit from the growth of AI this decade and beyond.

1. Nvidia

Nvidia looks like a solid long-term AI pick. Though its relatively high valuation could make it volatile in the near term, Nvidia trades at a high multiple for a pretty good reason: It's the first mover and undisputed leader in graphics processing units (GPUs), which are crucial chips for the parallel processing necessary for artificial intelligence. Nvidia's AI-centric data center segment is now taking off in earnest, with data center revenue up 71.5% last quarter, even in a supply-constrained environment.

Not only that, but Nvidia has developed a robust ecosystem around its chip platform that importantly now includes software subscriptions. Huang stated on the recent conference call that Nvidia, "is a software-driven business."

That might seem counterintuitive given that it makes virtually all its money by selling chips. However, Nvidia developed the robust CUDA software platform, which is the application programming interface (API) that enables basic computing functions to be done on graphics chips for developers building AI applications on Nvidia GPUs. So today's AI developers have been trained on Nvidia's system, establishing it as a standard any young developer needs to learn. That widens Nvidia's moat against new challengers in the GPU space.  

The company is now extending its software chops into licensable applications that should generate high-margin recurring revenue. It's releasing three different software applications: Nvidia AI for enterprises; Nvidia Omniverse for graphic designers, gaming engineers, and other digital creators, and Nvidia Drive for autonomous vehicle applications.

And it's now developing central processing units (CPUs) based on ARM architecture. So rather than just being a graphics chipmaker, Nvidia is becoming a full-stack ecosystem currently leading the AI revolution.

As a high-multiple stock trading at 61 times earnings, Nvidia is getting hit pretty hard with the rest of tech. But looking out over the next 10 years, the industry leader in AI seems like an awfully promising bet.

A hand holds a shape looks like a brain filled with electronic transistors.

Image source: Getty Images.

2. Micron

Speaking of Nvidia, Huang also mentioned on the recent conference call that the most crucial limiting factor in artificial intelligence today is memory speed. So aside from GPUs and CPUs, memory is also incredibly important to the development of AI, especially dynamic random access memory (DRAM), which is the fast memory that feeds into processors.

There are only three major producers of DRAM memory today, with the only U.S. company being Micron Technology (MU -0.01%). Memory chips act somewhat like commodities, whose prices can swing with supply and demand. But an oligopoly has allowed the three major players to control supply, enabling profitability for all three even through the last down cycle.

Micron also achieved some company-specific milestones in the past year. It was the first memory company to introduce one-alpha DRAM, the most advanced node, and was the first to produce 176-layer NAND flash. Micron had typically trailed its competitors in technology transitions up until recently; clearly, it has been executing at a high level under current CEO Sanjay Mehrotra, who came on board in 2017.

Micron also began paying a dividend last year. While only a small yield, at 0.2%, it's a meaningful starting point, considering the company historically hasn't paid a dividend. More important, it shows management thinks the violent boom-and-bust cycles of the past will moderate enough to generate consistent profits in good markets and bad.

Despite the importance of memory in AI, Micron trades at a very low earnings multiple due to its historical cyclicality, especially compared with the rest of the tech industry. So a steadier business, a low valuation, and a strong position in a growing industry make Micron an attractive stock for the next decade.