1. A computer-executable method for performing a general matrix-vector multiplication (GEMV) operation, comprising: generating a set of kernels that includes at least one of a variable-N GEMV kernel and a constant-N GEMV kernel; receiving data representing at least a matrix and a vector; determining a set of dimensional parameters associated with the matrix and the vector, wherein the set of dimensional parameters indicate a number of rows of the matrix and a number of rows of the vector; selecting a kernel from the set of kernels for performing the GEMV operation, which involves accessing a set of rules, wherein a rule of the set of rules maps a respective set of dimensional parameters to a respective kernel from the set of kernels, and wherein the selected kernel performs the GEMV operation faster than any other kernel in the set of kernels for the respective set of dimensional parameters; and performing the GEMV operation on the matrix and the vector using the selected kernel.