Mesa 20.0's LLVMpipe Now Supports Running OpenCL On The CPU

Written by Michael Larabel in Mesa on 27 December 2019 at 07:35 AM EST. 10 Comments
MESA
Mesa's LLVMpipe Gallium3D driver has long been about running OpenGL on GPUs as a software fallback / debug path but as of this morning in Mesa 20.0-devel there is now the experimental ability of having OpenCL support making use of OpenCL "Clover" with NIR for CPU-based execution.

LLVMpipe recently introduced the ability to use the NIR intermediate representation over TGSI. Following that NIR transition, it ended up being quite easy to get OpenCL support going making use of the "Clover" Gallium3D state tracker for OpenCL. Clover recently picked up NIR support thanks to the work by Red Hat on the Nouveau side and their open-source NVIDIA compute efforts.

Red Hat's David Airlie who does much of the LLVMpipe work noted that this OpenCL support is passing many of the Piglit regression tests around SPIR-V/NIR/OpenCL.

For now the LP_DEBUG=cl environment variable is needed for having this OpenCL LLVMpipe support which ultimately will execute on the CPU via LLVM. I'll be firing it up for testing shortly and will be interesting to see how it works compared to the likes of POCL for OpenCL on the CPUs.

Exciting times in Mesa land as we roll into 2020 with Mesa 20.0 having a lot of interesting features and the overall open-source OpenGL/Vulkan ecosystem continuing to flourish.
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