Nouveau Continues Making Progress On Compute Support, SPIR-V

Written by Michael Larabel in Nouveau on 30 January 2016 at 06:16 PM EST. 3 Comments
NOUVEAU
Hans de Goede of Red Hat and Pierre Moreau, an independent Nouveau contributor, are speaking at FOSDEM's graphics development room tomorrow about compute support for Nouveau.

Hans is now working on improving Nouveau, the open-source NVIDIA driver, as part of his work at Red Hat. Most recently he's been focusing on Nouveau compute support.

The two parts being tackled by Hans and others has been working on going from LLVM IR to TGSI, the intermediate representation shared by all Gallium3D drivers. The LLVM IR to TGSI is important for Nouveau's OpenCL approach and can be adapted for other use-cases given that LLVM IR is utilized by many open-source projects. Since it's TGSI, other drivers like RadeonSI could utilize it too, but AMD already has their AMDGPU back-end in LLVM for going directly from LLVM IR to AMD's GPU code. The other part of the equation is on going from SPIR-V, the intermediate representation that's the basis of Vulkan and OpenCL 2.1+, to NV50 intermediate representation that can be consumed by older NVIDIA GPUs.

The PDF slides for this FOSDEM talk contains the details for those not in Brussels this weekend. In regards to going from SPIR-V to NV50 IR, there is working support for arithmetic and comparison operations, branching without phi nodes, support for some built-ins, array/pointer indexing, vector support, and casts. Still to be done is phi nodes, images, atomics, loops, swizzles, function calling, and other built-ins and operations.

With the LLVM to TGSI pass, Clang can compile a very basic kernel into TGSI. This back-end currently supports doubles, vectors, control flow, function calling, support for multi-dimensional input/output data, Clang/LLVM TGSI support is present in the Clover OpenCL state tracker, etc.

For furthering the Nouveau OpenCL support, atomics and image extensions are currently being worked on by other Nouveau developers.
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