SAN FRANCISCO — Advanced Micro Devices has hired JPMorgan Chase to explore options, which could include a potential sale, as the chipmaker struggles to find a role in an industry increasingly focused on mobile and away from traditional PCs, according to three sources familiar with the situation.

The company’s stock surged 18 percent on the news before ending up 5 percent at $2.09 on the New York Stock Exchange.

Sources told Reuters on Tuesday that an outright sale of the company is not a priority, and other options for AMD could include a sale of its portfolio of patents.

AMD said in an email to Reuters it is not actively pursuing a sale of the company or any significant assets.

“AMD’s board and management believe that the strategy the company is currently pursuing to drive long-term growth by leveraging AMD’s highly-differentiated technology assets is the right approach to enhance shareholder value,” spokesman Drew Prairie said.

One of Silicon Valley’s oldest chipmakers, AMD is laying off engineers and some analysts are concerned it may not find new markets for its chips in time to reverse a declining cash reserve.

AMD’s shares have fallen more than 60 percent this year, giving it a market value of about $1.4 billion. It also has long-term debt and capital lease obligations of about $2 billion.

AMD was not immediately available for comment, while a JPMorgan spokeswoman declined to comment.

Some investors believe part or all of AMD could be bought by a technology company that might want to emulate Apple’s (AAPL) tight control of software and components, a strategy credited in part for the success of the iPad and iPhone.

One source described AMD as a “legacy company” and said it might prove difficult to sell because of its dependence on the PC industry and lack of strong mobile offerings.

Another source mentioned AMD’s game console chip business and growing focus on embedded chips as the company’s silver linings.

Microsoft, Google (GOOG), Samsung, Intel (INTC) and even Facebook have been suggested by Wall Street analysts as potential suitors that could benefit from some of AMD’s chip business, including its graphics division, PC processors and server chips.

Others say AMD’s most valuable asset may be its deep bench of engineers or its patents.

Like Intel, AMD was caught flat-footed in recent years with the emergence and fast growth of mobile devices.

AMD said last month it would slash 15 percent of its workforce, while devoting more resources to areas outside of its traditional PC business, including communications, industrial and gaming applications.