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

Method GetCVKernelSubSymbol

compiler/lib/KernelGen/GeneralIntrinsic/CvtColor.cpp:457–464  ·  view source on GitHub ↗

kernel gen

Source from the content-addressed store, hash-verified

455
456//! kernel gen
457std::string CvtColorKernel::GetCVKernelSubSymbol(TContext* context) const {
458 std::stringstream ss;
459 auto src_dtype = context->getAttrOprand("operand:0").dtype;
460 auto mode = context->getAttrStr("mode");
461 auto mode_str = g_cvt_reg.get_mode_sym(mode);
462 ss << "tinycv_cvt_" << mode_str << "_" << src_dtype;
463 return ss.str();
464}
465
466std::string CvtColorKernel::GetCVKernelSignature(TContext* context) const {
467 return GetCVKernelSymbol(context) + "(const TinyMat* src, const TinyMat* dst)";

Callers

nothing calls this directly

Calls 3

getAttrOprandMethod · 0.80
getAttrStrMethod · 0.80
get_mode_symMethod · 0.45

Tested by

no test coverage detected