cubecl-spirv 0.9.0-pre.6

SPIR-V compiler for CubeCL
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# 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
```bash
sudo apt install vulkan-validationlayers
```
2. Add a logger for WGPU like [env_logger]https://docs.rs/env_logger/latest/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.