This talk will look at the work recently done to enable compute support on GPUs supported by Nouveau. The focus of the talk will be on generating a representation of the OpenCL code that can be consumed by Nouveau, which is the biggest missing piece to get OpenCL running on Nouveau.
GPGPU support is something which is becoming more and more important nowadays. This means that besides trying to catch-up with the latest OpenGL revisions, opensource gpu drivers also need to add support for Compute programs through OpenCL and/or CUDA.
This talk will look at the various bits and pieces involved in adding Compute support to Nouveau. The main focus of the talk will be the translation from OpenCL to Nouveau GPU machine-code. This translation typically includes multiple passes translating from one intermediate representation (IR) to another. Which new passes can we introduce to get Compute support? What are the advantages / disadvantages of chosing a specific translation / compile pass to get Compute support?
After this global overview this talk will look in detail on two different approaches that implement different backends. The first work reuses the fact that Nouveau can consume TGSI, by implementing a LLVM IR to TGSI pass, meaning that it is driver independent. On the other hand, the second work teaches Nouveau how to consume SPIR-V, which is the intermediate representation being used by Vulkan for all shaders and compute programs. This makes it possible for Nouveau to consume directly a SPIR-V binary (if the shader / compute program has been pre-compiled), rather than going back to LLVM IR before being converted to TGSI and fed into Nouveau.
Speakers: Hans de Goede Pierre Moreau