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

Method GetKernelSymbol

compiler/lib/KernelGen/GeneralIntrinsic/WarpAffine.cpp:33–44  ·  view source on GitHub ↗

kernel gen

Source from the content-addressed store, hash-verified

31}
32//! kernel gen
33std::string WarpAffineKernel::GetKernelSymbol(TContext* ctx) const {
34 std::stringstream ss;
35 auto border_val_str = std::to_string(ctx->getAttrFloat("border_val"));
36 border_val_str[border_val_str.find('.')] = '_';
37 ss << "GI_kernel_warpaffine";
38 ss << "_" << ctx->getAttrStr("format");
39 ss << "_" << ctx->getAttrStr("imode");
40 ss << "_" << ctx->getAttrStr("border_mode");
41 ss << "_" << ctx->getAttrOprand("operand:0").dtype;
42 ss << "_" << border_val_str;
43 return ss.str();
44}
45
46namespace {
47

Callers 1

Calls 3

getAttrStrMethod · 0.80
getAttrOprandMethod · 0.80
to_stringFunction · 0.50

Tested by

no test coverage detected