Investors are mesmerized with AMD's impressive second quarter as cryptocurrency mining demand drove the company's financial results above Wall Street's expectations.



The chipmaker reported better-than-expected second-quarter earnings and guidance Tuesday. Its shares surged more than 10 percent in after-hours trading following the report and were up more than 9 percent in early regular trading Wednesday.



"AMD turned in a solid beat to our and consensus estimates as the company's new Ryzen desktop CPU ramped into production and GPU demand outstripped supply," Stifel analyst Kevin Cassidy wrote in a note to clients Wednesday. "While management wasn't specific on how much, the GPU revenue upside was driven by cryptocurrency applications."



AMD shares have rallied 102 percent through Tuesday in the previous 12 months compared with the S&P 500's 14 percent return. That performance ranks No. 4 in the entire , according to FactSet.



Cryptocurrency miners use graphics cards from AMD and Nvidia to "mine" new coins, which can then be sold or held for future appreciation. AMD traditionally has a better reputation for mining cryptocurrencies.

The ethereum cryptocurrency is up more than 2,400 percent year to date through Wednesday, while is up about 160 percent this year, according to data from industry website CoinDesk.



In June, AMD shares jumped after the company told CNBC that the dramatic rise in digital currency prices has driven demand for its graphics cards. At the time, major computer hardware retailers had sold out of AMD's recently launched RX 570 and RX 580 models.



Digital currency mining was the key topic during AMD's earnings conference call with Wall Street on Tuesday evening. Analysts asked company management three times for clarification on the magnitude and sustainability of cryptocurrency mining demand.



One analyst noted the company is working to mitigate future downside risk and is not incorporating continued digital currency mining outperformance in its guidance.



"Crypto mining helped stimulate demand for AMD GPUs in Q2, which we think could translate to a risk should cryptocurrency values decline, AMD is working to manage the crypto risk by targeting supply to the core GPU gaming market, and working with some of its AIB [add in board] partners to offer specific feature sets to segment the market between gaming & mining," Jefferies analyst Mark Lipacis wrote Wednesday. "AMD is not including upside from mining in its outlook."



Lipacis reiterated his buy rating on the company and raised his price target to $19 from $16, representing 35 percent upside from Tuesday's close.



To be sure, some analysts are still skeptical about AMD after its big run.



"We were surprised at the aftermarket reaction for the stock," Morgan Stanley analyst Joseph Moore wrote Wednesday. "We continue to be somewhat cynical on the long-term intrinsic value of the stock, despite being excited about Zen and maintaining numbers that are above the Street. As street numbers start to catch up, absolute valuation levels are going to matter more."



Moore reiterated his equal weight rating and $11 price target for AMD shares.

— CNBC's Michael Bloom contributed to this story.