Skip to content
Home » AMD Open Sources Drivers for XDNA-Based NPUs

AMD Open Sources Drivers for XDNA-Based NPUs

AMD Open Sources Drivers for XDNA-Based NPUs, Boosting ML and Signal Processing Performance

AMD has just made a significant move in high-performance computing by open-sourcing the drivers for its XDNA architecture-based Neural Processing Units (NPUs). This means developers now have unprecedented access to the inner workings of these powerful accelerators, paving the way for faster machine learning (ML) and signal processing applications.

NPUs are specialized processors designed to handle the computationally intensive workloads associated with ML and signal processing tasks. Unlike traditional CPUs, which are adept at handling diverse tasks, NPUs excel at specific operations like matrix multiplication and convolution, essential for tasks like image and speech recognition, natural language processing, and scientific computing.

Now, here’s where AMD’s XDNA architecture comes in. It’s the underlying technology powering NPUs found in their 7040 and 8040 series Ryzen processors, Alveo V70 accelerators, and Versal SoCs. By open-sourcing the drivers for these NPUs, AMD is essentially giving power to the developers for their computing needs, including Linux.

AMD Ryzen Pro (image credit: AMD)
AMD Ryzen Pro (image credit: AMD)

A few benefits of being open-source.

  • Developers can now examine the driver code, understand how the NPUs operate, and even make modifications to suit their specific needs.
  • Open-sourcing the drivers removes potential barriers to entry for developers who were previously hesitant due to limited access or proprietary constraints. This broader accessibility can fuel wider adoption of AMD’s NPUs across various industries and applications.
  • With direct access to the driver code, developers can potentially fine-tune the NPUs for specific workloads, squeezing out every ounce of performance and tailoring them to their unique requirements.

The open-sourced code includes two key components:

  • A Linux kernel driver (amdxdna.ko): This low-level driver interacts directly with the XDNA hardware, enabling communication and control between the operating system and the NPU.
  • An XRT runtime library (plugin “xrt_plugin-amdxdna”):* This library provides an interface for applications to interact with the NPUs using the Xilinx Runtime Library (XRT). XRT offers various abstraction levels, from low-level C/C++ APIs to high-level bindings for Python and integrations with popular ML frameworks like TensorFlow, PyTorch, and Caffe. This flexibility caters to developers with diverse programming backgrounds and skill sets.

It’s important to note that the open-source drivers require a Linux 6.7 kernel with IOMMU SVA (Shared Virtual Addressing) support. This ensures efficient memory management and resource sharing between the CPU and the NPU.

There is a detailed guide on properly compiling the Linux 6.7 mainline Kernel to use this driver in Ubuntu 22.04. You can refer to the build and usage instructions in the GitHub repo.

Via GitHub

Recent articles from

Notify of

Inline Feedbacks
View all comments