By Kimberley Kao

Gauges of factory activity in Asia largely rose to close out the first half of the year, driven by a global surge in artificial-intelligence hardware demand. However, mounting cost pressures and disparities in the AI boom cloud the outlook.

S&P Global purchasing managers indexes released Wednesday showed that manufacturing output sped up in major export hubs last month, including Taiwan, Japan and Vietnam.

"Manufacturing across much of Asia continues to expand at a brisk pace," said Frederic Neumann, HSBC's chief Asia economist.

Undeterred by energy price spikes in recent months and commodity supply disruptions, manufacturers are "riding the wave" of booming AI hardware demand and record trade levels, he said.

Japan's manufacturing PMI logged its best quarterly performance since the first quarter of 2014, climbing to 54.8 in June from 54.5 in May as new order growth hit a new high since January 2022.

Yet, underlying risks remain. Growth is still partly driven by defensive stockpiling due to the Middle East war, and inflationary pressures remain intense, said Annabel Fiddes, economics associate director at S&P Global Market Intelligence.

Taiwan firms reported the sharpest production increase in nearly five years. However, stocks of finished goods expanded at its second-quickest pace in over 15 years as cost pressures and supplier delays remain substantial.

"Firms plan to protect themselves against any further price hikes and shortages, particularly with demand for AI and semiconductors surging globally," said Fiddes.

In contrast, South Korea manufacturers saw the softest rise in new orders so far this year, with material shortages and higher costs limiting production growth, dragging its PMI down to 52.1 in June from 54.8 in May.

While benefiting exporters and select manufacturers, the boom in AI hardware demand has also led to an uneven expansion, with consumer spending often more sluggish due to the rising cost of living, HSBC's Neumann said.

"Economies like Indonesia that are far less exposed to the AI hardware sector have seen growth slow," he said. The country's PMI reading fell into contractionary territory at 46.9 in June from 50.0 in May.

Southeast Asia firms had a more cautious 12-month outlook for output as confidence slipped to a three-month low, said Maryam Baluch, economist at S&P Global Market Intelligence. Headline PMI for the region fell to an 11-month low in June.

Still, the aggressive data-center buildout in the U.S. and elsewhere is benefiting economies such as Japan, Malaysia, Singapore, Vietnam and mainland China, which supply key equipment like cooling systems, cabling and power, Neumann said.

"A key question for Asia is how long the AI hardware boom might endure, with recent financial market volatility raising concerns that funding for expansion might become more limited," Neumann said.

Write to Kimberley Kao at kimberley.kao@wsj.com