There Is Another Debate Over An AI Accelerator Subsystem For Linux

Written by Michael Larabel in Hardware on 4 August 2022 at 06:55 AM EDT. 11 Comments
HARDWARE
With there recently being a number of new driver proposals for various AI-focused accelerators for the Linux kernel, currently they either go into "char/misc" as the random catch-all area of the kernel or within the Direct Rendering Manager (DRM) subsystem traditionally used for GPU drivers. There's been yet another discussion happening this week over introducing a formal "accelerator" subsystem in the kernel for the growing number of AI devices that may be seeking to provide open-source drivers.

Among the recent drivers motivating this latest accelerator subsystem discussion is the Intel Versatile Processing Unit (VPU) with Meteor Lake, Samsung's Trinity NPU accelerator driver, a NVIDIA NVDLA DRM driver, and Toshiba DNN Visconti image processing accelerator. Right now these drivers tend to either target the char/misc route like the Habana Labs AI driver and roll their own driver or try to integrate with the Direct Rendering Manager infrastructure and go that route. But some drivers/vendors have tended to prefer the char/misc route due to looser standards especially as it concerns open-source user-space requirements -- DRM drivers mandate that all kernel drivers are exercised by open-source user-space clients while in char/misc it's less enforced and not as clear-cut.

Going on for years there has been discussions about a possible hardware accelerator subsystem to avoid growing char/misc even more. Meanwhile the upstream DRM driver developers would prefer seeing the AI drivers go into DRM rather than a new subsystem, given the similarities to GPUs and that many of the core DRM interfaces and device-specific memory are also relevant to the growing spectrum of accelerators.


Intel's Habana Labs AI driver is currently the most prominent specialized (non-GPU) accelerator in the mainline Linux kernel, complete with an open-source user-space. But more AI/accelerator drivers are expected to be open-source and mainlined moving forward.


Oded Gabbay of Habana Labs who has led their work on their upstream, open-source AI driver in char/misc recently restarted the discussions and possible plans around an accelerator subsystem. Greg Kroah-Hartman as Linux's second-in-command and maintainer of char/misc had initially okay'ed the plans to create a new subsystem that would provide a common device to be used by accelerators and some other basic shared infrastructure among accelerator/compute devices.

There's been some developer interest in that proposed new subsystem. The Habana Labs driver could also be adapted as an example for leading the work on that new accelerator/compute subsystem. But as with past discussions over such a subsystem, the upstream DRM developers see these drivers better fitting within the DRM subsystem. Other accelerator-minded developers have said though that the DRM rules regarding user-space are too strict or that the GPU-focused DRM interfaces don't fit fully for NPUs / VPUs / other hardware.

Lead DRM maintainer David Airlie has raised the possibility of starting an "accelerator staging area" within the DRM subsystem and to land the few drivers currently being worked on into that area to work towards commonality.

Long story short, this latest See kernel mailing list thread is still active with developers trying to come to a consensus about how AI/accelerator/compute device drivers should be handled in the Linux kernel. We'll see if the discussion fizzles out like it has in recent years or if some sort of agreement can be reached this time in the "accelerator vs. DRM" debate.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week