pub fn gemv_f32(
m: usize,
n: usize,
a: &[f32],
x: &[f32],
) -> Result<Vec<f32>, ForgeError>Expand description
Best-path single-precision dense GEMV: row-major y[M] = A[M×N] · x[N].
Path selection (mirrors gemm_f32):
- WGSL GPU — when
caps().wgpuis set and the problem is at leastGEMM_GPU_THRESHOLDMACs (m * n), run the certified GEMV via the sharedForgeRuntime. A runtime build/dispatch failure is not propagated — the call falls through to the CPU floor so it is never broken. - CPU floor — otherwise compute on the CPU via
gemv_cpu.
a must have m * n elements (row-major) and x must have n. Returns m
row elements. Dimension/length mismatches are the only hard errors.