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

Method add

compiler/test/kernel/common/src/target_module.cpp:45–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43}
44
45void TargetModule::add(
46 const std::string& sig, const std::string& body, const std::string& init_sig,
47 const std::string& init_body, const std::string& workspace_sig,
48 const std::string& workspace_body, const std::string& deduce_sig,
49 const std::string& deduce_body) {
50 if (m_kern_map.count(sig) == 0) {
51 m_kern_map[sig] = body;
52 }
53 if (m_kern_init_map.count(init_sig) == 0) {
54 m_kern_init_map[init_sig] = init_body;
55 }
56 if (m_kern_workspace_map.count(workspace_sig) == 0) {
57 m_kern_workspace_map[workspace_sig] = workspace_body;
58 }
59 if (m_kern_deduce_layout_map.count(deduce_sig) == 0 && deduce_sig.size() > 0) {
60 m_kern_deduce_layout_map[deduce_sig] = deduce_body;
61 }
62}
63
64void TargetModule::add_workspace_size(
65 const std::string& workspace_size_symbol, size_t workspace_size) {

Callers 5

append_nhwc2nchw_to_h2dFunction · 0.45
TESTFunction · 0.45
gen_kernelFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected