Nations and companies around the world are weighing up AI's costs and benefits.