Customers purchase goods at a supermarket on December 9, 2016 in Hangzhou, China.

China's factory price inflation cooled in July but not as much as expected, amid a wider slowdown in economic growth as Beijing remains locked in a heated trade dispute with Washington.

However, consumer inflation picked up from the previous month, largely due to a rise in non-food prices, official data showed on Thursday.

The July inflation data is the first official reading on the impact on prices from China's retaliatory tariffs on $34 billion of U.S. goods that went into effect on July 6 and apply to a range of products from soybeans, to mixed nuts and whiskey.

While policymakers are watching price pressures, the central bank is likely to give priortity to policies that help shore up the slowing economy.

The producer price index (PPI) — a gauge of factory gate inflation — rose 4.6 percent in July from a year earlier, compared with an acceleration to 4.7 percent in June, according to the National Bureau of Statistics.

On a month-on-month basis, the PPI rose 0.1 percent in July, compared with a 0.3 percent growth in June.

Analysts polled by Reuters had expected July producer inflation would edge down to 4.4 percent.

Raw material prices jumped 9.0 percent in July from a year earlier, compared with an 8.8 percent increase in June.

Official data on Wednesday showed China's July import growth accelerated to its fastest since January, although the outlook for inbound shipments is clouded by the yuan's sharp drop in recent months.

While the tit-for-tat tariffs between China and the U.S. have fuelled worries about the inflation outlook, many analysts believe the impact on consumer prices will be limited.

The Trump administration tightened pressure for trade concessions from Beijing last week by proposing a higher 25 percent tariff on $200 billion worth of Chinese imports. China in turn retaliated by proposing tariffs on $60 billion worth of U.S. goods, ranging from liquefied natural gas (LNG), iron ore and steel to aircraft.

Economists expect the proposed tariffs by China and the yuan's recent decline could push up import prices, which could in turn drive producer price inflation.

"Inflation is unlikely to become much of concern for policymakers," Capital Economics wrote in a note this week.

The consumer price index (CPI) rose 2.1 percent from a year earlier, beating expectations of 1.9 percent which was unchanged from June's growth, but still within the government's comfort zone of 3 percent.

On a month-on-month basis, the CPI rose 0.3 percent.

The core consumer price index, which strips out volatile food and energy prices, rose 1.9 percent in July, unchanged from June's pace.

The food price index rose 0.5 percent from a year earlier, after ticking up 0.3 percent in June. Non-food prices rose 2.4 percent, compared with 2.2 percent growth a month ago.

The IMF said China's headline inflation is expected to rise gradually to around 2.5 percent, while producer price inflation would moderate.