Shares of Advanced Micro Devices Inc. (AMD) - Get Report were surging 7.1% to $15.13 in after-hours trading on Tuesday after the chipmaker posted stronger-than-expected fiscal second-quarter results and gave a bright forecast for the third quarter.

AMD reported adjusted earnings of two cents per share, while Wall Street had expected earnings to be flat. Revenue jumped 19% year-over-year to $1.22 billion, higher than the $1.16 billion projected by analysts.

The company said in a statement that the sales increase was driven primarily by higher revenue in its computing and graphics segment. The chip giant released new Ryzen PRO desktop processors and Radeon graphics cards during the quarter. 

AMD also provided upbeat guidance for the third quarter, saying that it expects to generate revenue between $1.46 billion and $1.54 billion, topping analysts' projections of $1.39 billion. Wall Street was already expecting AMD to guide for a strong third quarter, as the company is likely to benefit from a slate of new products, including its Ryzen desktop chips, Naples server chips and Vega GPUs. 

  • Advanced Micro Devices Could Explode Another 17% Within Hours: Chart

AMD added that it expects annual revenue to rise by the mid- to high-teens percentage, which is higher than its prior guidance for low double-digit percentage revenue growth. 

Shares of AMD have surged 24.5% so far this year, helped in part by it the cryptocurrency mining wave that has led to a surge in demand for its GPUs. AMD and its rival Nvidia Corp. (NVDA) - Get Report supply the chips used to mine Ethereum, an alternative cryptocurrency, but Wall Street has questioned the sustainability of the cryptocurrency mining boom.

Watch: Nvidia Offers an Ecosystem and Should Be Bought on Dips, Jim Cramer Explains

Analysts will likely ask AMD management to give some color on the impact of crytocurrency during its second-quarter earnings call later this evening. 

Updated from 4:22 p.m. with additional information.

Don't miss these top stories on TheStreet: