LLVM Adds A SPIR-V CPU Runner For Handling GPU Kernels On The CPU

Written by Michael Larabel in LLVM on 26 October 2020 at 02:17 PM EDT. 3 Comments
LLVM
LLVM has merged an experimental MLIR-based SPIR-V CPU runner that the developers are working towards being able to handle CPU-based execution of GPU kernels.

This new SPIR-V runner is built around the MLIR intermediate representation (Multi-Level Intermediate Representation) with a focus of going from GPU-focused code translated through SPIR-V and to LLVM and then executed on the CPU. The runner focus is similar to that of the MLIR-based runners for NVIDIA CUDA, AMD ROCm, and Vulkan, but just executing on the CPU itself. It was earlier this year LLVM added the MLIR-Vulkan-Runner for handling MLIR on Vulkan hardware.

More details on this new CPU runner for SPIR-V via this commit that landed in LLVM 12 mainline.

It will be interesting to watch this runner mature and hopefully allowing for easier and robust SPIR-V kernel fallbacks to CPU-based execution when needed or for verification purposes outside of the GPU.
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