Artificial intelligence (AI) investing has been a key market theme over the past two and a half years, and it's slated to remain a significant part of investing for the next few years as well. The reality is that massive AI infrastructure is still needed, and the build-out isn't slated to slow anytime soon.

Even though many stocks have already risen significantly, it doesn't mean their upside is capped at today's levels. I wouldn't be surprised to see these four continue to generate substantial returns for investors, potentially enough to be considered a small fortune.

Two engineers stand in front of a data center.

Image source: Getty Images.

1. Nvidia

Nvidia (NVDA -0.12%) has been a top AI stock pick for a long time for good reason: Its graphics processing units (GPUs) are powering the AI revolution. They are phenomenal at processing arduous workloads, making them ideal for training and running AI models.

While Nvidia has grown significantly over the past few years, it recently received another catalyst: likely being allowed to export GPUs to China. If Nvidia had been allowed to export its H20 chips to China in Q2, its revenue growth rate could have hit 77% instead of the current 50% forecast, so this recent shift could provide a huge boost for the AI giant.

Nvidia's growth is far from over, and even though its stock has been on a tear in recent months, it still has a bright long-term outlook.

2. Taiwan Semiconductor

Taiwan Semiconductor (TSM 1.60%) is another stock with an incredibly bright future. It's the world's leading chip foundry, which means it manufactures chips for companies like Nvidia that lack internal capabilities to produce their own -- a capability nearly every tech company lacks.

This position also provides management with unparalleled insight into the future, as many companies place chip orders years in advance. Starting in 2025, management expects AI-related revenue to grow at a 45% compounded annual growth rate (CAGR) for the next five years, with its overall CAGR nearing 20%.

TSM Operating Revenue (Quarterly YoY Growth) Chart

TSM Operating Revenue (Quarterly YoY Growth) data by YCharts

That's monster growth for any company, and is a primary reason to buy TSMC's stock today.

3. Digital Realty

There's more than one way to make a fortune in the stock market. Digital Realty (DLR -1.18%) is a real estate investment trust (REIT), which comes with special requirements, namely that it must pay out 90% of its taxable income in the form of dividends.

Digital Realty specializes in the data center space, and its real estate operations focus on building these facilities worldwide to support the growing demand for AI. This provides both a growth catalyst and a nice 2.7% dividend yield, giving AI investors some balance in their portfolio.

4. Amazon

Amazon (AMZN -0.33%) may not be the first company you think of when you hear AI, but you probably should. Its cloud computing platform, Amazon Web Services (AWS), is the market share leader in its space. It provides companies with the tools to deploy and build generative AI-powered applications, and is experiencing rapid growth, with revenue increasing 17% in its most recent quarter.

However, what's even more significant is that AWS accounted for 63% of Amazon's total Q1 profits, indicating that Amazon is more of a cloud computing company than an e-commerce one. With massive tailwinds in the cloud computing space due to increasing AI workloads, this stock is primed to continue rising on the back of cloud computing.