The deal could result in Meta owning as much as 10% of AMD’s stock as the chipmaker seeks to challenge Nvidia.