The gemv operator computes the matrix-vector product of a matrix and a vector.
Given an input matrix A and input vectors x and y, along with scalars α and β, the kernel evaluates
The matrix-vector product is computed by multiplying the matrix A with the vector x, scaling the result by α, scaling the vector y by β, and then adding the two scaled results together to produce the updated vector y.
All backends share the interface:
def gemv(A: torch.Tensor, x: torch.Tensor, y: torch.Tensor, alpha: float, beta: float) -> torch.Tensor:
...See the test suite for the validation harness that exercises every backend.
pytest tests/test_gemv.py -s