Artificial intelligence (AI) has been the hottest theme on Wall Street this year. The hype around the potential for this growing technology sent investors scrambling to get in on the action. Any stock with any relation to AI got a bump, making AI much like a tide coming in and lifting all the boats in the harbor.

But tides eventually go back out, so it's critical to know which companies will continue to catch the wave of the AI revolution and which ones will be left high and dry once the hype dies down.

If you're looking for AI stocks that have what it takes to motor on for the long term, you're in luck. Here are three with some sustained horsepower.

1. Nvidia

Graphics processing unit (GPU) chipmaker Nvidia (NVDA 6.18%) has arguably been the face of AI's 2023 rally. The stock is up more than 170% since January, trouncing the broader market. Investors are giddy over the company's early AI dominance; its AI chips have an estimated 80% market share. Nvidia's chips specialize in demanding applications requiring lots of computing power. That was applications like gaming and cryptocurrency mining in the past, but Nvidia successfully embraced AI head-on, and now companies can't get enough of Nvidia's chips.

You can see how growth has gone into a higher gear since earlier this year, and analysts believe that momentum will continue due to the long-term opportunities in AI. Researchers believe the global AI market will multiply in size over the coming years, approaching $2 trillion by 2030. Nvidia will undoubtedly face competition as others bring rival products to market, but Nvidia's early start and the growing market should mean plenty of opportunities to continue growing.

NVDA Revenue (Quarterly YoY Growth) Chart

NVDA Revenue (Quarterly YoY Growth) data by YCharts

The market has taken a step back in recent weeks and Nvidia's stock price is down nearly 20% from its high this year. The pullback could be an opportunity to begin sniffing around shares for a long-term holding. The stock's forward P/E ratio is 37, but that's arguably reasonable if the company can grow earnings at the 33% annualized rate analysts expect.

2. Snowflake

Training AI models is an underrated part of developing these new AI technologies you're seeing. It's one thing to program the model, but it must be trained with massive amounts of data that few companies can access outside of perhaps Alphabet, Meta Platforms, and Microsoft. But thanks to data cloud and analytics company Snowflake (SNOW 3.69%), that could soon change. Snowflake is a cloud-based platform that can store, organize, analyze, and exchange data.

Especially exciting is that Snowflake is building a marketplace where companies can readily access more than 2,100 data sets, services, and apps. The company aims to become the go-to resource for companies to find and extract the data they need to improve their businesses -- or potentially train and hone AI models. Admittedly, revenue growth has slowed, which you can see below. However, Snowflake's billing is based on usage, which means it is vulnerable to slowdowns in a more challenging economic environment if customers cut back.

SNOW Revenue (Quarterly YoY Growth) Chart

SNOW Revenue (Quarterly YoY Growth) data by YCharts

Slowing growth doesn't mean ending growth, either. Analysts believe revenue will grow from $2.75 billion this year to over $18 billion over the next decade. Additionally, Snowflake is poised for strong earnings growth as its revenue grows faster than its expenses. The stock trades at a hefty forward P/E of 205, but that could come down quickly if earnings growth averages nearly 60% annually, as analysts predict.

3. Taiwan Semiconductor Manufacturing

A common misconception is that leading semiconductor companies like Nvidia build their chips, but that's untrue. Usually, semiconductor companies design the chips and then outsource production to specialized manufacturers called fabs, like Taiwan Semiconductor Manufacturing (TSM 1.26%). TSMC (as it is often called) is the world's largest chip fab, owning 56% of the global market.

That makes TSMC a true pick-and-shovel investment in AI because there's a likely chance that whatever AI chip becomes popular, TSMC is building it. Being the market leader, TSMC has a reputation for specializing in advanced manufacturing, which cutting-edge AI chips are likely to need.

TSM Revenue (Quarterly YoY Growth) Chart

TSM Revenue (Quarterly YoY Growth) data by YCharts

The business model isn't quite as lucrative for a manufacturer. Revenue has shrunk over the past year, and analysts predict around 7% earnings growth. However, the stock's valuation is more modest at just under 17 times forward earnings. The company's location in Taiwan is also somewhat riskier due to China-Taiwan geopolitical tensions. Assuming political conflicts don't escalate, TSMC is entrenched as a critical long-term player in AI.