20 releases (7 breaking)
Uses new Rust 2024
| 0.10.0 | May 7, 2026 |
|---|---|
| 0.10.0-pre.2 | Mar 2, 2026 |
| 0.9.0-pre.6 | Dec 18, 2025 |
| 0.9.0-pre.3 | Nov 24, 2025 |
| 0.3.0 | Oct 28, 2024 |
#2976 in Algorithms
8,851 downloads per month
Used in 3 crates
(via cubecl-wgpu)
2MB
50K
SLoC
SPIR-V Compiler
This crate is a compiler for cubecl_ir that passes through cubecl_opt to generate directly SPIR-V. It is then run with the cubecl-wgpu runtime.
How to debug SPIR-V errors
- Ensure that VK_LAYER_KHRONOS_validation is installed, it is not enabled by default on most linux distro.
For ubuntu, install it with
sudo apt install vulkan-validationlayers
- Add a logger for WGPU like env_logger in the environment that you needs crash information.
If the shader generated by cubecl-spirv contains undetected error it will send at the Error level the crash instead of just segfaulting.
Part 2
You can activate the feature spirv-dump and set the environment variable CUBECL_DEBUG_SPIRV={directory} to have all shaders saved in that directory.
Dependencies
~13–18MB
~333K SLoC