| 66 | )"; |
| 67 | |
| 68 | inline KernelCode createMatmul1(const char *shaderTemplate, const size_t M, |
| 69 | const size_t K, const size_t N, |
| 70 | const Shape &workgroupSize = {256, 1, 1}, |
| 71 | NumType precision = kf32) { |
| 72 | std::string codeString(shaderTemplate); |
| 73 | replaceAll(codeString, {{"{{workgroupSize}}", toString(workgroupSize)}, |
| 74 | {"{{precision}}", toString(precision)}, |
| 75 | {"{{M}}", toString(M)}, |
| 76 | {"{{K}}", toString(K)}, |
| 77 | {"{{N}}", toString(N)}}); |
| 78 | return {codeString, workgroupSize, precision}; |
| 79 | } |
| 80 | |
| 81 | // Shared memory cache-blocking |
| 82 | static const char *kShaderMatmul2 = R"( |
no test coverage detected