| 29 | )"; |
| 30 | |
| 31 | inline KernelCode createTranspose1(const char *shaderTemplate, |
| 32 | const size_t M, const size_t N, |
| 33 | const Shape &workgroupSize = {256, 1, 1}, |
| 34 | NumType precision = kf32) { |
| 35 | std::string codeString(shaderTemplate); |
| 36 | replaceAll(codeString, {{"{{workgroupSize}}", toString(workgroupSize)}, |
| 37 | {"{{precision}}", toString(precision)}, |
| 38 | {"{{M}}", toString(M)}, |
| 39 | {"{{N}}", toString(N)}}); |
| 40 | return {codeString, workgroupSize}; |
| 41 | } |
| 42 | |
| 43 | // Shared memory cache-blocking |
| 44 | static const char *kShaderTranspose2 = R"( |
no test coverage detected