Shares of chipmaker AMD rose gained more than 5 percent Monday, hitting a 12-year high and extending its rally for a third day.

The stock closed at $25.26 after reaching a session high of $27.30. On Friday, shares closed up 7.6 percent after a positive analyst outlook. That followed a 6.7-percent gain Thursday after Rosenblatt Securities raised its price target for AMD shares to a new Street high.

Analysts are generally bullish on the company's cloud computing business and its planned launch of smaller, faster 7 nanometer chips. The company has also avoided some of the bigger security concerns that have fallen on competitors like Intel in recent months.

The stock has gained roughly 30 percent in August and nearly 150 percent in 2018. That blows the market out of the water, with the S&P 500 gaining just about 3 percent this month and 8 percent this year.

—CNBC's Tae Kim contributed to this report.