| 7 | #define DIMS 2000 |
| 8 | #define BLOCK_SIZE 32 |
| 9 | __global__ void MatMulKernel(float *A, float *B, float *C, int m1, int n1, int n2) |
| 10 | { |
| 11 | int y = hipBlockIdx_y * hipBlockDim_y + hipThreadIdx_y; |
| 12 | int x = hipBlockIdx_x * hipBlockDim_x + hipThreadIdx_x; |
| 13 | if(x < n2 && y < m1){ |
| 14 | int tmp = 0; |
| 15 | for(int n = 0; n < n1; n++){ |
| 16 | tmp += A[y * n1 + n] * B[n * n2 + x]; |
| 17 | } |
| 18 | C[y * n2 + x] += tmp; |
| 19 | } |
| 20 | } |
| 21 | void Mul_Matrixdcu(float *A, float *B, float *C, int m1, int n1, int n2) |
| 22 | { |
| 23 | float *d_A, *d_B, *d_C; |
nothing calls this directly
no outgoing calls
no test coverage detected