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

Download history 1636/week @ 2026-02-08 1784/week @ 2026-02-15 1992/week @ 2026-02-22 1439/week @ 2026-03-01 1413/week @ 2026-03-08 2060/week @ 2026-03-15 1989/week @ 2026-03-22 1596/week @ 2026-03-29 2313/week @ 2026-04-05 2271/week @ 2026-04-12 1846/week @ 2026-04-19 2340/week @ 2026-04-26 2827/week @ 2026-05-03 1960/week @ 2026-05-10 2084/week @ 2026-05-17 1717/week @ 2026-05-24

8,851 downloads per month
Used in 3 crates (via cubecl-wgpu)

MIT/Apache

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

  1. 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
  1. 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