The modern GPU is more than a graphics device. Technologies such as the open-standard OpenCL and Nvidia’s CUDA turn the many small processors in a GPU into a parallel computing fabric, allowing desktop PCs to complete tasks that used to be the sole purview of supercomputers. Those same GPUs are also capable of supporting many modern machine learning tasks, using GPU compute to build neural networks and to support model-building, data-parallel analytical and processing tasks.

Microsoft has been investing in simplifying GPU programming for a long time now, starting with its DirectX GPU tools, initially via the Direct3D graphics tools, and extending it to GPU compute with DirectCompute. Recent developments have included tools to map OpenGL calls to Direct3D, related to work building a graphical layer onto the WSL 2 Linux virtual machine system bundled with Windows 10. Although they make it easier to work with hardware, these remain low-level programming tools, using C++ to access hardware features.

Introducing DirectML

They’ve recently been joined by a new member of the DirectX family of GPU APIs: DirectML. This underpins much of the work done by the higher-level WinML, providing high-performance machine learning primitives that can be used in your custom code or through Microsoft’s own libraries. Working with DirectML used to require Direct3D metacommands to access device-specific machine learning features, accessing them through shader operators. The result is a set of standard abstractions that let the same code run on GPUs from different vendors.

#c #directml

Use DirectML to add machine learning to C code
1.45 GEEK