The demand for artificial intelligence (AI) is growing rapidly, and that's not surprising as this technology is expected to contribute significantly to the global economy in the long run. According to PwC, AI could contribute a whopping $15.7 trillion to the world economy by 2030, driven by an increase in labor productivity as well as a jump in the usage of this technology by consumers.

Not surprisingly, AI spending is expected to jump from an estimated $135 billion last year to a whopping $827 billion in 2030. As a result, now would be a good time to invest in top companies that could capitalize on the growing adoption of this market and are likely to deliver solid returns to investors in the long run.

Advanced Micro Devices (AMD) and Palantir Technologies (PLTR 1.66%) are two companies that can help investors benefit from two fast-growing niches of the AI market. Let's look at the reasons why these two companies could turn out to be top AI picks in the long run.

1. Advanced Micro Devices

AMD may have fallen behind Nvidia in the race to develop AI chips, but it wouldn't be a good idea to discount its prospects in this lucrative market. After all, the AI chip market is currently in its early phases of growth and generated an estimated $52 billion in revenue last year. However, by 2032, AI chip revenue is expected to shoot up to a stunning $1.11 trillion.

AMD needs to corner just a small portion of this massive market to supercharge its long-term growth. Nvidia reportedly controlled 94% of the market for AI server chips last year. The company's data-center revenue stood at a whopping $47.5 billion in fiscal 2024 (which coincided with the majority of calendar 2023). AMD's data-center revenue, on the other hand, came in at $6.5 billion in 2023.

However, in the first quarter of 2024, AMD's data-center revenue shot up an impressive 80% year over year to $2.3 billion as the demand for its AI graphics cards accelerated. The company is expecting to sell AI chips worth at least $4 billion in 2024, and it is worth noting that AMD has been consistently increasing its forecast for AI chip sales in recent quarters.

AMD's 2024 revenue is expected to land at $25.5 billion, an increase of 13% from last year. The company's current estimate for AI chip revenue for this year suggests that this technology could contribute just over 15% to its top line in 2024. However, analysts are forecasting stronger revenue growth from AMD going forward.

AMD Revenue Estimates for Current Fiscal Year Chart

AMD Revenue Estimates for Current Fiscal Year data by YCharts.

AI is likely to play a key role in this acceleration. That's because AMD is looking to make a dent in Nvidia's dominant position in AI chips. AMD recently unveiled its new AI chip, known as the MI325X. The chipmaker claims that this chip is 30% faster than Nvidia's H200 processor, which is the successor to the company's popular H100 chip.

AMD says that this new chip will be available to customers in the fourth quarter of 2024. More importantly, the company is doubling down on the pace of AI chip development and intends to launch a new AI chip every year.

Such moves could help AMD make inroads into the AI chip market and improve its market share. Vijay Rakesh of Mizuho Securities believes that Nvidia's market share in AI chips could slip to 75% in 2025 and 2026. With AMD pushing the envelope on the product-development front and Nvidia finding it difficult to manufacture enough chips to satisfy demand from its customers, there is a good chance that AMD could play a significant role in the AI chip market in the long run even if it plays second fiddle to Nvidia.

As such, AMD could become a top AI semiconductor player in the long run, which is why investors would do well to buy its shares before it steps on the gas following muted gains of just 13% in 2024 so far.

2. Palantir Technologies

AMD can help investors capitalize on the growing need for AI hardware. Palantir Technologies, on the other hand, is turning out to be a solid play on the growing need for AI software. S&P Global Market Intelligence estimates that the market for generative AI software could be worth a whopping $52 billion in 2028, posting an annual growth rate of 58% through the end of the forecast period.

Palantir has started capitalizing on this terrific growth opportunity. In the first quarter of 2024, Palantir reported that its remaining performance obligations (RPO) increased to $1.3 billion, a significant jump of 38% from the year-ago quarter. The RPO of a company refers to the total value of future contracts that it has to fulfill.

So, the fact that this metric increased at a faster pace than Palantir's revenue growth of 21% during the quarter means that the company is setting itself up for robust long-term growth by building a healthy revenue pipeline. The fast-growing adoption of Palantir's AI software platform, especially by commercial customers, is a key reason why the company is witnessing impressive growth in its RPO.

Palantir made its name as a software-platform provider to federal agencies in the U.S., but the ompany is now targeting business customers as well to make the most of the AI software opportunity. This strategy is bearing fruit as Palantir's commercial-customer count shot up an impressive 53% year over year in Q1 2024. Commercial revenue increased 27% year over year, exceeding the increase in Palantir's overall top line.

Meanwhile, the company is landing AI-related government contracts as well, including one from the Pentagon recently. All this indicates that Palantir is pulling the right strings to capitalize on the lucrative AI software opportunity.

What's more, Palantir's earnings are expected to increase at an annual rate of 85% for the next five years. The stock market could reward this impressive growth with more upside in the long run, making Palantir a top AI stock to buy as it could add to the healthy 35% gains that it has already logged in 2024.