DirectML is a platform API for machine learning on Windows, providing a universal abstraction layer for hardware vendors to expose their machine learning accelerators. It can be used with any DirectX 12-compatible device, including GPUs and NPUs. By reducing the cost of writing machine learning code, DirectML makes the integration of AI features easier.