MCPcopy Create free account
hub / github.com/MegEngine/MegCC / GetKernelSymbol

Method GetKernelSymbol

compiler/lib/KernelGen/BareMetal/BatchedMatmul.cpp:27–42  ·  view source on GitHub ↗

kernel gen

Source from the content-addressed store, hash-verified

25
26//! kernel gen
27std::string BatchedMatrixMulKernel::GetKernelSymbol(TContext* context) const {
28 std::stringstream ss;
29 ss << "kernel_batched_matmul_";
30 if (context->getAttrBool("transposeA")) {
31 ss << "t";
32 } else {
33 ss << "n";
34 }
35 if (context->getAttrBool("transposeB")) {
36 ss << "t";
37 } else {
38 ss << "n";
39 }
40 ss << "_" << context->getAttrOprand("operand:0").dtype;
41 return ss.str();
42}
43
44namespace {
45std::string emit_k(bool trans_a) {

Callers

nothing calls this directly

Calls 2

getAttrBoolMethod · 0.80
getAttrOprandMethod · 0.80

Tested by

no test coverage detected