Spirv tagged news

SPIR-V on ROCm: A Portable IR for AMD GPUs

ROCm has compiled GPU code ahead of time (AOT), once per target architecture, since its first release. CPU software shifted to runtime just-in-time (JIT) compilation in the 1990s — Java HotSpot, V8, LuaJIT, .NET RyuJIT, PyPy — once the matrix of target × workload × deployment became too large to enumerate at build time. With its adoption of SPIR-V, ROCm now brings the compile-once, specialize-on-device model to AMD GPUs. 

This post covers what SPIR-V is, why AMD adopted it, the compilation model and its trade-offs, and a reproducible single-kernel HIP example with measurements on MI350X (CDNA4), spot-checked on RX 9070 XT (RDNA4). A FAQ and status section at the end cover common questions and what is shipping, in flight, and not yet solved.

OpenCL Cooperative Matrix Extensions Are Here

The OpenCL Working Group has published a draft extension (cl_khr_cooperative_matrix) that brings cooperative matrix operations — a key technology for accelerating ML inference — to OpenCL, developed in collaboration with Arm, Intel, and Qualcomm. A companion extension to expose these capabilities directly in the OpenCL C language is also in progress, and the community is invited to review both drafts and provide feedback before they are finalized.

Khronos Group Releases SPIR-V 1.6.5

Today, the Khronos SPIR Working Group released the SPIR-V specification revision 1.6.5. This is a regular maintenance release with valuable clarifications and updates to the standard, including new extension enumerants and improved terminology for instructions that operate on groups of invocations. Details on SPIR-V including links to the specification, change logs, and resources can be found on the Khronos SPIR-V landing page.

LLVM 20 Promotes SPIR-V to Official Backend

LLVM developers have agreed to raise the SPIR-V back-end from experimental to official target within the LLVM 20 compiler codebase.

Compiler Explorer Tool (Godbolt) Now Supports SPIR-V

The popular Compiler Explorer (a.k.a. Godbolt) tool now supports SPIR-V as an input. For those who work with SPIR-V disassembly you can now use this tool to quickly play with, validate, and share examples with others. Check out the SPIR-V Optimizer & SPIR-V Validator examples online. More tools such as SPIRV-Cross and SPIRV-Reflect are also in the works .

DirectX Adopting SPIR-V as the Interchange Format of the Future

Microsoft's Direct3D and HLSL teams shared some insight into the next big step for GPU programmability. Once Shader Model 7 is released, DirectX 12 will accept shaders compiled to SPIR-V. Their HLSL team is committed to open development processes and are collaborating with The Khronos Group and LLVM Project. They’re sharing this information at the beginning of their multi-year development process for transparency about this transition from the start. Microsoft is working with the Khronos SPIR and Vulkan Working Groups to ensure that this transition benefits the whole development ecosystem.

Vulkan SC 1.0.15 Released: SPIR-V Validation and New NVIDIA Drivers for Desktop Systems Available

On June 21, 2024 the Vulkan SC working group at the Khronos Group released the Vulkan SC 1.0.15 specification, the latest maintenance update to the “Vulkan Safety Critical” open standard API, which enables GPU-accelerated graphics and computation to be deployed in systems that are certified to meet industry functional safety standards.

This blog post is on the latest Vulkan SC developments, including significant new functionality in the Vulkan SC validation layers and broadened availability of NVIDIA Vulkan SC drivers.

White Paper: Cross-Stage Shader Optimization

Greg Fischer, Senior Engineer at LunarG, released a new white paper describing functionality in spriv-tools and glslang which allows the user to do dead code elimination in SPIR-V shaders across stages. This functionality also can be used to trim trailing dead components from aggregate input and output variables in the shaders. Many drivers do these cross-stage optimizations automatically under the covers, but some drivers may not. These optimizations can have a significant impact on a shader’s performance and size.

PoCL 3.1 Released with Improved SPIR-V

PoCL 3.1 provides compatibility with the LLVM/Clang 15.0 release, switches to using lowercase device names for the platform setup via the “POCL_DEVICES” environment variable, there has been a major rework to the custom device driver, much improved SPIR-V support, continued work towards implementing a Vulkan driver, and a basic OpenCL cl_khr_command_buffer implementation.

Updates from OpenCL Tooling Task Sub Group: Recently Upstreamed SPIR-V Backend Ready for Discussion at 2022 LLVM Developers’ Meeting

OpenCL Tooling Task Sub Group (TSG) is actively contributing to the LLVM compiler infrastructure project and is determined to bring first-class support for OpenCL and SPIR-V to LLVM. While the latest release of Clang brought the long-awaited support for the OpenCL 3.0 standard, C++ for OpenCL 2021 kernel language, and the SPIR-V generation interface utilizing an external tool llvm-spirv from the SPIRV-LLVM-Translator repository, the work on the native GlobalISel-based SPIR-V backend continues at full speed. SPIR-V updates and many other exciting changes in the SPIR-V and OpenCL world will be discussed in depth at the upcoming 2022 LLVM Developers’ Meeting.

Significant New OpenCL Open Source Tools and Resources to be Discussed at Annual LLVM Developers Meeting

Khronos has made substantial investments in strengthening the SPIR-V backend for LLVM and the OpenCL Working Group is pleased to release early results from testing that provide insights into compilation coverage using the OpenCL conformance test suite and LLVM’s tests. Work in the past months has been dedicated to the overall design of LLVM’s new backend and its integration with the Clang frontend, with particular focus on parsing OpenCL kernel language sources. Khronos will soon finalize this design and commence integration into the upstream LLVM repository. To speed progress, a special panel is going to take place at the LLVM Developers Meeting to discuss the overall design and formulate a concrete list of actions.

Microsoft’s CLOn12 Mesa Code Adds SPIR/SPIR-V Support

Microsoft’s merge request to Mesa has been submitted bringing SPIR and SPIR-V support to the CLOn12 effort to allow OpenCL over DirectX 12 through Mesa.

OpenCL Rolls Out Maintenance Release and C++ for OpenCL Documentation

Today Khronos released v3.0.6 of the OpenCL Specifications. This is a regular maintenance release with bug fixes and clarifications, an updated address spaces section, new extensions for additional subgroup functions, and an extension for enhanced platform and device version queries. Also, documentation for the C++ for OpenCL V1.0 kernel language is now downloadable from an OpenCL-Docs GitHub repository tag, describing how the language combines C++17 functionality with familiar OpenCL kernel language paradigms. An extension for online compilation of C++ for OpenCL kernels was published earlier this year and offline compilation of C++ for OpenCL kernels has been supported by clang release 9.0 onwards.

Khronos Group announces the SPIR-V Guide - a one stop shop for getting started with SPIR-V

The SPIR-V Guide is designed to help developers get up and going in the world of SPIR-V. This guide is targeted at developers needing to use SPIR-V-based compilers in their tool chains and for developers wishing to develop custom tooling or compilers that output SPIR-V. Head on over to GitHub and starting learning about SPIR-V today.

Godot Engine - Vulkan Progress Report #7

​Godot Engine has started up their Vulkan Progress Reports after 3 month hiatus. GamingOnLinux touts Godot Engine as making more impressive progress towards Vulkan API support. Godot 4.0 will see many improvements including: using a special screen-space filter to correctly simulate roughness; GLSL shaders (not Godot shaders, real GLSL 4.50+Vulkan extensions) can now be imported and will be automatically imported and converted to SPIR-V when found; allowing you to have low level access to the rendering APIs. Check out the report to learn more.