What happened

Shares of Advanced Micro Devices (AMD 4.94%) surged on Thursday after the chip company reported better-than-expected first-quarter results. Demand for its CPUs and GPUs drove both revenue and earnings higher than analysts were anticipating, and its guidance for the second quarter beat out expectations as well. The stock was up about 12.5% at 12:20 p.m. EDT.

So what

AMD reported first-quarter revenue of $1.65 billion, up 40% year over year and $80 million above the average analyst estimate. Revenue in the computing and graphics segment, which includes PC CPUs and GPUs, nearly doubled to $1.12 billion, driven by strong demand for the company's Ryzen PC CPUs and Radeon GPUs. Enterprise, embedded, and semi-custom revenue sank 12% to $532 million thanks to a decline in semi-custom revenue, and despite rising sales of the company's EPYC server chips.

An AMD Radeon graphics card and Ryzen chip.

Image source: AMD.

Non-GAAP earnings per share came in at $0.11, up from breakeven during the prior-year period and $0.02 better than analysts were expecting. Non-GAAP gross margin was 36%, up from 32% during the first quarter of 2017.

Looking forward, AMD expects to generate $1.725 billion of revenue, plus or minus $50 million, during the second quarter. That represents year-over-year growth of 50%. Analysts were forecasting second-quarter revenue guidance of just $1.58 billion.

Now what

Some of AMD's growth is being driven by GPU demand from cryptocurrency miners. That's revenue that could vanish anytime, and in fact the company expects a sequential decline in graphics sales during the second quarter due to slumping cryptocurrency-related demand. About 10% of total revenue during the first quarter was related to cryptocurrency, a meaningful percentage.

Despite this headwind, AMD expects Ryzen and EPYC to drive total sales higher. The company launched its second-generation Ryzen chips earlier this month, and third-party reviews suggest that AMD has mostly closed the gaming performance gap with Intel chips. The company also expects to achieve a mid-single-digit share of the server chip market by the end of the year.

AMD's results are a vast improvement over its performance in recent years, with new products and a helping hand from cryptocurrency pushing up revenue. The graphics business will suffer as crypto mania recedes, but the CPU business appears to be performing well.