Advanced Micro Devices (AMD) has signed a multi-year deal to supply artificial intelligence (AI) chips to OpenAI.