NVIDIA 396.18 Linux Benchmarks, Testing Their New Vulkan SPIR-V Compiler
Written by Michael Larabel in Display Drivers on 11 April 2018. Page 1 of 6. 6 Comments

Yesterday NVIDIA released their first 396 Linux driver beta in the form of the 396.18 release and its biggest addition is a new Vulkan SPIR-V compiler to replace the compiler that's been hobbled together since the Vulkan 1.0 debut. Here are some fresh NVIDIA Vulkan Linux benchmarks and more on this new SPIR-V compiler.

SPIR-V, for those living under a rock and not reading enough Phoronix, is the new intermediate representation that is common to Vulkan and modern OpenCL and can also be used with OpenGL 4.6 through new ingestion extensions for better interoperability with Vulkan. This high-level intermediate language is critical to Vulkan drivers and completely redesigned compared to the original SPIR that was based upon LLVM IR.

NVIDIA's SPIR-V compiler up until now would take this IR/IL and turn it into a "GLSL-style IR" (the OpenGL Shading Language representation) and then ultimately rely upon NVIDIA's existing OpenGL shader compiler that has been refined over the years. With SPIR-V being a different beast from GLSL, this code path hasn't been ideal and reportedly slowed down shader compilation times and yielded higher memory use.

This new Vulkan shader compiler takes SPIR-V and immediately translates it to NVVM, NVIDIA's LLVM-based IR that can then be consumed by their driver. The NVVM compiler stack is already used by their Windows drivers for Direct3D handling. By having this common NVVM IR now used by both Vulkan and D3D12, this should lead to better performance and improvements over time.

For using the NVVM-based Vulkan compiler stack, NVIDIA found the shader compilation process to be about three times faster and with a 50% reduction in memory use. With this new shader compiler, they are also relaxing the exposed limits for the maximum number of supported descriptors and other hardware capabilities. Previously they went with exposing the GPU's actual hardware limits, but now they will support transparently spilling when necessary.

I ran some Vulkan Linux gaming benchmarks since yesterday's NVIDIA 396.18 driver release with/without the new Vulkan SPIR-V compiler (for now it can be toggled using the __GL_NextGenCompiler environment variable) as well as testing the current stable driver release, NVIDIA 390.48.

For this initial testing of the new NVIDIA Vulkan SPIR-V compiler I was using a GeForce GTX 1080 on a Core i7 8700K system. Dota 2, Mad Max, Dawn of War III, F1 2017, Serious Sam 3 BFE, and Talos Principle were used for testing. In addition to looking for any in-game frame-rate changes, the Phoronix Test Suite was also monitoring the time needed for the automated testing (for seeing if any changes as a result of faster SPIR-V compilation) as well as the CPU/GPU usage and RAM/vRAM memory consumption.

Related Articles
Trending Linux News