MCPcopy Create free account
hub / github.com/AnswerDotAI/gpu.cpp / createMatmul1

Function createMatmul1

examples/matmul/run.cpp:68–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66)";
67
68inline 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
82static const char *kShaderMatmul2 = R"(

Callers 1

selectMatmulFunction · 0.85

Calls 2

replaceAllFunction · 0.85
toStringFunction · 0.50

Tested by

no test coverage detected