I’m using CUBLAS DGEMM and have noticed that if I have values of M,N = 1, K = 0 I get a
CUBLAS_STATUS_INVALID_VALUE error when I make the DGEMM call. (Leaving aside the performance
issues) the docs say this error occurs when M,N,K < 0 ? But they clearly are not.
The behavior of cublasDgemm() is designed to match the behavior of DGEMM in the reference BLAS implementation. Best I can tell, this is the case. As eelsen points out, k=0 results in the scaling of matrix C by beta. Like the reference implementation, cublasDgemm() also checks the arguments (including the transpose modes) for validity, and it returns CUBLAS_STATUS_INVALID_VALUE when an invalid argument is detected.
Other than the documentation not enumerating all possible reasons for the error code CUBLAS_STATUS_INVALID_VALUE to be returned, I do not see any issue at the moment.