RADV Vulkan Driver Merges Cooperative Matrix Support Using RDNA3 WMMA

Written by Michael Larabel in Radeon on 24 October 2023 at 11:33 AM EDT. Add A Comment
RADEON
As yet another open-source Radeon Linux graphics driver change ahead of the upcoming Mesa 23.3 code branching and feature freeze is Vulkan VK_KHR_cooperative_matrix support with the RADV driver for RDNA3 hardware and newer using the GPU's Wavefront Mixed-precision Multiply Accumulate (WMMA) functionality.

VK_KHR_cooperative_matrix is the Vulkan extension that evolved out of the former NVIDIA-specific cooperative matrix extension (VK_NV_cooperative_matrix). VK_KHR_cooperative_matrix allows for cooperative matrix types within SPIR-V. The Vulkan cooperative matrix types are medium-sized matrices intended for use with compute shaders. With this SPIR-V support it can also be used in conjunction with the OpenGL GLSL_KHR_cooperative_matrix extension for the OpenGL Shading Language.

NVIDIA originally worked on their cooperative matrix extension back in 2019 as part of enabling machine learning acceleration use-cases with the Vulkan API. With NVIDIA's Vulkan cooperative matrix extension they leverage the tensor cores with their modern RTX GPUs to provide much better performance than Vulkan scalar math operations.

With RADV's support for the VK_KHR_cooperative_matrix extension, it is relying on the Wavefront Mixed-precision Multiply Accumulate instructions and AMD cooperative matrix intrinsics found with RDNA3 GPUs and newer. Due to this, the Vulkan cooperative matrix extension is only exposed for RDNA3 (GFX11) and newer graphics processors with Mesa 23.3 RADV.

Vulkan matrix extension


More details on Vulkan cooperative matrix multiply can be found via this Khronos presentation from last year by NVIDIA's Pierre Boudier.

More details for those interested in RADV cooperative matrix support via this merge for Mesa 23.3.
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