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

Method getCandidates

compiler/lib/Dialect/Kernel/Transforms/KernelTemplate.cpp:45–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43}
44
45std::vector<RawCodeKernelTemplate*> KernelTemplateRegistry::getCandidates(
46 Operation* op) {
47 std::vector<RawCodeKernelTemplate*> candidates;
48 for (auto&& i : kernelTemplates) {
49 if (i->match(op)) {
50 candidates.push_back(i.get());
51 }
52 }
53 return candidates;
54}
55
56Operation* RawCodeKernelTemplate::instantiate(
57 OpBuilder& builder, TContext* context, bool is_internal_func) {

Callers 1

matchAndRewriteMethod · 0.80

Calls 2

matchMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected