Working OpenCL Through Gallium3D Clover With LLVM To SPIR-V Conversion

Karol posted the latest patches this weekend in the feat of running Clover/OpenCL via SPIR-V with the Gallium3D drivers rather than Clover's current design around using Gallium3D's TGSI IR. This OpenCL through SPIR-V support is achieved by relying on the SPIR-V LLVM Translator library to convert LLVM IR to SPIR-V. Besides the patches allowing Clover to consume SPIR-V, there are a few Nouveau bits part of this patch series and ultimately exposing the SPIR-V support for the Nouveau NVC0 driver.
The latest patches for now are on the mailing list while we hope to see this work ideally merged for the current Mesa 19.2 cycle.
It will certainly be interesting to see how this SPIR-V OpenCL support performs on Nouveau NVC0. Our main concern with this Nouveau OpenCL effort has been slow performance particularly for the GeForce GTX 900 series and newer where there is currently no re-clocking support available for these desktop GPUs. The best supported hardware for Nouveau compute would be the vintage GeForce GTX 700 series, but we'll see what our benchmarks show when the time comes and how it competes with NVIDIA's OpenCL proprietary driver.
Besides Nouveau, this Clover OpenCL work may also prove useful to the other SPIR-V-supporting Gallium3D drivers now and moving forward.
3 Comments