cubecl-spirv 0.8.1

SPIR-V compiler for CubeCL
Documentation

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.