DirectML

Transform your Windows application with the power of Artificial Intelligence

DirectML, a powerful machine learning API developed by Microsoft, is fast, versatile, and works seamlessly across a wide range of hardware platforms. With support from every DirectX 12-capable GPU and soon across NPUs, developers can use DirectML to deliver AI experiences at scale



DirectML is already pre-installed on a huge range of Windows 10+ devices and is also available as a NuGet package. Explore our Get Started guide and GitHub repo to learn how to use DirectML to integrate machine learning models into your application

Organizations and products leveraging DirectML

Get started with DirectML

DirectML and ONNX Runtime

Pairing DirectML with the ONNX Runtime is often the most straightforward way for many developers to bring hardware-accelerated AI to their users at scale. These three steps are a general guide for using this powerful combo

1. Convert

The ONNX format enables you to leverage ONNX Runtime with DirectML, which provides cross-hardware capabilities.

To convert your model to the ONNX format, you can utilize ONNXMLTools or Olive.

2. Optimize

Once you have an .onnx model, leverage Olive powered by DirectML to optimize your model. You'll see dramatic performance improvements that you can deploy across the Windows hardware ecosystem.

3. Integrate

When your model is ready, it's time to bring hardware-accelerated inferencing to your app with ONNX Runtime and DirectML.

We built some samples to show how you can use DirectML and the ONNX Runtime in Python and C#:

DirectML API

Even though DirectML can be accessed via other frameworks such as the ONNX Runtime, DirectML can also be accessed directly by developers familiar with C++.

It has a familiar (native C++, nano-COM) programming interface and workflow in the style of DirectX 12.

We recommend that developers start by looking at our Introduction to DirectML and our DirectML overview.

Helpful Links

For more documentation, samples and other helpful content see our Links page.

Connect with us:

YouTube logo Github logo