Advanced Micro Devices (AMD  ) shares were initially higher following the company's better-than-expected Q2 results despite coming in light on guidance. However, shares gave up gains due to a string of poor reports or warnings from industry stalwarts like Nvidia (NVDA  ) and Micron (MU  ) which indicate sharply slowing demand for chips.

It's also a big change from last quarter which showed a major slowing on the consumer tech side but continued strength on the enterprise side. Overall, AMD shares are down 34% YTD and off by 42% from all-time highs in December of last year. Due to the pullback in shares, while earnings have continued to explode higher, valuations have markedly improved with a forward P/E of 19 which is only slightly above the market average despite much faster earning and revenue growth in addition to higher margins.

Inside the Numbers

In Q2, AMD reported $1.05 in earnings per share which was above expectations of $1.03 per share. Revenue came in at $6.55 billion which also topped expectations of $6.53 billion in revenue.

AMD's share price gave up gains as it forecast $6.7 billion in revenue for the current quarter, while analysts were looking for $6.8 billion. Despite a sharp slowdown in semiconductor demand, the company continues to gain market share from Intel (INTC  ) which has been plagued by execution issues, especially for PCs and servers. Already, it's exceeded Intel in terms of performance and is also winning market share among corporate buyers who tend to lean more conservative.

Thus, it's not surprising to see that data center sales were up 83% to reach $1.5 billion. This includes chips for cloud computing, servers, and enterprise customers. Unlike other parts of the business, it doesn't expect to see a slowdown in demand for this particular area.

Client segment revenue, which encompasses PC and laptop chip sales, rose by 25% and reached $2.2 billion. It's sharply slowed but remains positive which is relatively impressive given that many consumer tech companies are experiencing a contraction in sales and earnings. The company also lowered its outlook for the segment to grow in the high single digits from its earlier projection of mid-teens growth.

Gaming sales increased by 32%, reaching $1.7 billion as AMD chips are used in the Playstation 5 (SONY  ) and new Xbox (MSFT  ). Growth was due to console sales, while graphics chips for PCs saw a decline.