gpuMatMul (Function)
Signature: gpuMatMul(left: GpuBuffer<float>, right: GpuBuffer<float>, rows: int, inner: int, cols: int) -> Result<GpuBuffer<float>, Error>
Description: The dense row-major product of a rows x inner float buffer and an inner x cols one, as a rows x cols buffer. Every element accumulates in k order from 0.0 in double; a length that disagrees with the stated shape is an Error naming the operand.
Parameters
- left (GpuBuffer
): The rows x inner buffer - right (GpuBuffer
): The inner x cols buffer - rows (int): The left operand's row count
- inner (int): The shared dimension
- cols (int): The right operand's column count
Returns: Result<GpuBuffer
Example
gpuMatMul(x, w, tokens, 768, 2304) ?: empty
gpuMatMul (x, w, tokens, 768, 2304) ?: empty