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

Method GetKernelSymbol

compiler/lib/KernelGen/BareMetal/Reduce.cpp:82–90  ·  view source on GitHub ↗

kernel gen

Source from the content-addressed store, hash-verified

80
81//! kernel gen
82std::string ReduceKernel::GetKernelSymbol(TContext* context) const {
83 std::stringstream ss;
84 ss << "kernel_reduce";
85 ss << "_" << context->getAttrStr("mode");
86 ss << "_" << context->getAttrStr("data_type");
87 ss << "_a" << context->getAttrInt("axis");
88 ss << "_" << SymbolHelper::gen_io_str(context);
89 return ss.str();
90}
91
92std::string ReduceKernel::GetKernelBody(TContext* context) const {
93 auto mode = context->getAttrStr("mode");

Callers

nothing calls this directly

Calls 1

getAttrStrMethod · 0.80

Tested by

no test coverage detected