Mark Zuckerberg has Meta investing heavily in AI.

Bloomberg/Getty Images

As tech giants aggressively build out compute to meet the demands of the AI boom, some face a tricky dilemma: how much should they hoard and how much should they sell?Meta CEO Mark Zuckerberg addressed the issue on the company's Q2 earnings call this week. While Meta doesn't currently have a business selling compute — the data center processing power used to run AI — to customers, Zuckerberg has said it's on the cards.Zuckerberg said that a "significant portion" of its compute will go toward training Meta's AI models, powering agents, and growing its core business. "But we also expect to grow a large business serving large customers as well," he said.Tech giants are racing to build out more compute to power soaring demand for artificial intelligence. Google and Meta both just slightly raised their capex forecast for the year, and Google signaled 2027 will likely be even bigger (in a rare move, Microsoft held the line on its capex projections).All that spending is now showing up in the financials: Google's cash flow went negative in Q2 for the first time in the company's history, and Meta's plunged 91% from the previous year.Selling compute is one way to offset that cash problem, but it also comes with an opportunity cost. The common refrain from execs across the companies is that there simply isn't enough compute to go around. These companies are racing to stay ahead in the AI race, and employees sometimes compete for access to compute.It's a conundrum for Microsoft, too. As Business Insider's Dan DeFrancesco put it earlier this week: "Does it cash in on demand today or focus more on its long-term goals?"