MCPcopy Create free account
hub / github.com/MegEngine/MegCC / IndexingMultiAxisVec>

Method IndexingMultiAxisVec>

compiler/test/kernel/common/src/cc_fill_attr.cpp:160–170  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

158
159template <>
160KernelGenRet opr_fill_attr<megdnn::IndexingMultiAxisVec>(
161 std::unordered_map<std::string, CCAttr>& attr_map,
162 megdnn::IndexingMultiAxisVec* opr, const TensorNDArray& tensors,
163 KernelGen::Arch arch,
164 const std::unordered_map<std::string, CCAttr>& proxy_attr) {
165 auto axis = proxy_attr.at("axis").AsOperand().shape;
166 for (size_t i = 0; i < axis.size(); ++i) {
167 attr_map["axis:" + std::to_string(i)] = CCAttr((int)axis[i]);
168 }
169 return KernelGen::KernelPack::GetKernel(KernType::IndexingMultiAxisKernel, arch);
170}
171
172template <>
173KernelGenRet opr_fill_attr<megdnn::IndexingOneHot>(

Callers

nothing calls this directly

Calls 3

CCAttrClass · 0.85
AsOperandMethod · 0.80
to_stringFunction · 0.70

Tested by

no test coverage detected