Spent today fixing the cowshed. Busy as ever.
For singlefs's differential testing (or rather, value cross-checking), we use WGSL. WGSL is WebGPU's shading language, and on the Rust side we call into it through a library called wgpu. wgpu translates the WGSL and hands it to the GPU driver to run; on Linux we go through Vulkan. Put simply, it carves up the GPU's units so the GPU can crunch enough data in a single batch.
So what are we cross-checking? If a filesystem loses power halfway through a write, it leaves a "crash state" on disk. singlefs has to capture every possible crash point and check, one by one, whether what's on disk is still correct. These states easily run into the hundreds of millions, far more than a CPU can judge, so the whole checker was moved onto the GPU.
The way we use the GPU here is a bit different from gaming or AI: one GPU thread is responsible for judging an entire crash state.β¦