Compiler error that I cannot figure out. My function call seems to match the argument list.
nvcc -o main main.cu
error: no instance of function template "gemm_template_batched_nn_kernel" matches the argument list argument types are (int, int, int, double **, int, double **, int, double **, int, double, double)
gemm.h
template <typename T, const int DIM_X, const int DIM_Y,
const int BLK_M, const int BLK_N, const int BLK_K,
const int DIM_XA, const int DIM_YA, const int DIM_XB, const int DIM_YB,
const int CONJA, const int CONJB>
static __global__
void gemm_template_batched_nn_kernel(
int M, int N, int K,
T const * const * Aarray, int LDA,
T const * const * Barray, int LDB,
T** Carray, int LDC,
T alpha, T beta)
{
const int batchid = blockIdx.z;
gemm_template_device_nn
<T, DIM_X, DIM_Y, BLK_M, BLK_N, BLK_K, DIM_XA, DIM_YA, DIM_XB, DIM_YB, (BLK_M/DIM_X), (BLK_N/DIM_Y), CONJA, CONJB>
( M, N, K,
Aarray[batchid], LDA,
Barray[batchid], LDB,
Carray[batchid], LDC,
alpha, beta );
}
main.cu
#include "gemm.h"
#define N 256
#define BLK_M 16
#define DIM_X 16
#define DIM_Y 16
int main() {
double *Ad, *Bd, *Cd;
dim3 dimGrid(N/BLK_M, N/BLK_M);
dim3 dimBlock(DIM_X, DIM_Y);
...
gemm_template_batched_nn_kernel<double><<<dimGrid,dimBlock>>>(N,N,N,&Ad,N,&Bd,N,&Cd,N,1.0,1.0);
...
}