Skip to main content

Module substrate_gemm

Module substrate_gemm 

Expand description

The portable wgpu f32 GEMM — the execute half of the bridge. Until now compute_bridge only probed and planned; this actually runs a kernel on the GPU and reads the result back, reusing the exact wgpu idioms the capability benchmark (crate::numerical::substrate_gemm) already uses on this hardware.

It is f32 by design: portable GPUs (and WGSL) are f32, and this is the precision the throughput-bound consumers (KGE scoring, dense swarm jobs, and later the GGUF inference path) actually want. The f64 scientific kernels stay on the CPU reference — the bridge never silently downcasts them.

Correctness is gated against the CPU reference before this path may be a default (§13); see the test and [super::execute].

Structs§

WgpuGemm
A ready-to-dispatch GEMM context: one device/queue/pipeline, built once.

Functions§

shared
Borrow the shared GPU GEMM context, if a GPU is present.