AMD shares rose as much as 7 percent Tuesday after the company revealed the dramatic jump in digital currency prices is driving demand for its graphics cards. The stock was the top performer in the S&P 500 on the day.

"The gaming market remains our priority. We are seeing solid demand for our Polaris-based offerings in the gaming and newly resurgent cryptocurrency mining markets based on the strong performance we are delivering," an AMD spokesperson wrote in an email to CNBC late Monday.

Ethereum cryptocurrency is up over 2,900 percent year to date through Tuesday morning, while bitcoin is up nearly 200 percent this year, according to data from industry website CoinDesk.

AMD is one of the market's best performing stocks in the past year with its shares up nearly 170 percent in the past 12 months through Tuesday morning compared with the S&P 500's 15 percent return.AMD one-year chart

Source: 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.

Computer hardware retailers are sold out of most AMD RX 570 and RX 580 graphics card models, according to NowInStock. AMD launched the RX 500 series of graphics cards on April 18.

The strong demand is spreading to older graphics cards as well. Used AMD RX 470 graphics cards are selling for well over $100 list price on eBay.