// super super slow sgemm kernel by heehoon #define TS 32 #define WPT 8 #define RTS (TS/WPT) __kernel void sgemm(__global float *A, __global float *B, __global float *C, int M, int N, int K) { const int row = get_local_id(0); // row index of C const int col = get_local_id(1); // column index of C const int global_row = TS*get_group_id(0)+row; const int global_col = TS*get_group_id(1)+col; __local float Asub[TS][TS]; __local float Bsub[TS][TS]; float sum[WPT]; for(int w=0; w