Patches Posted For Preparing New Linux "Accel" Subsystem - Builds Off DRM Code

Written by Michael Larabel in Linux Kernel on 23 October 2022 at 05:43 AM EDT. Add A Comment
LINUX KERNEL --
There has long been a debate over an "accelerator" subsystem for the Linux kernel given the increasing number of AI/accelerator devices coming to market. Currently there are accelerator drivers living within the catch-all "char/misc" area of the kernel while some driver efforts have been focused on Direct Rendering Manager (DRM) subsystem integration given the commonality with GPUs and some of the core infrastructure and APIs being relevant for both GPUs and these dedicated accelerator ASICs. There finally seems to be some agreement over the future of the accelerator subsystem and some initial patches were mailed out this weekend.

The ongoing debate has been whether accelerator drivers should get their own subsystem or be part of the GPU/DRM subsystem. At least there is agreement that the status quo with the "char/misc" area isn't ideal. At the Linux Plumbers Conference in September, there was finally some agreement reached between key upstream developers over what should be done with these drivers. The belief is to create a new subsystem but leveraging the DRM subsystem's code and functionality. In other words, the accelerator "accel" subsystem would effectively be part of the Direct Rendering Manager subsystem.

Oded Gabbay of Intel-owned Habana Labs sent out an initial request for comments patch series that establishes the accel subsystem based on the recent LPC 2022 discussions.


As part of these patches and what was discussed at LPC, the new drivers would live under drivers/accel/ within the Linux kernel source tree. The new drivers would expose their character device files under /dev/accel/accel*, the sysfs interface for these drivers would live within /sys/class/accel/accel*/, and similarly the DebugFS interfaces would be under /sys/kernel/debug/accel/accel*.

The three patches consisting of a few hundred lines of code establishes the new subsystem and initial DRM subsystem integration. Once that is all squared away, the plan is to initially convert the Habana Labs accelerator driver already within char/misc over to using the new "accel" subsystem as the initial driver. There are also a number of other accelerator drivers that have been floating around recently including the Qualcomm QAIC, Meteor Lake's Versatile Processing Unit, Toshiba DNN Visconti, NVIDIA NVDLA, Samsung Trinity NPU, and the Intel GNA. Given the increasing adoption around AI / deep learning, more accelerator hardware and drivers will likely be coming to the Linux kernel over the years ahead.
Related News
About The Author
Author picture

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