Chip designer Nvidia surpassed Apple’s market capitalization Wednesday for the first time ever, becoming the 2nd most valuable company in the world after a year of white-hot stock gains charged by an artificial intelligence craze.