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

Method get_kernel_workspace

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

Source from the content-addressed store, hash-verified

224}
225extern std::unordered_map<std::string, StdKernelWorkspaceCall> g_str_2_kern_workspace;
226StdKernelWorkspaceCall TargetModule::get_kernel_workspace(std::string& sig) const {
227#if !MEGCC_TEST_GEN
228 auto res = g_str_2_kern_workspace.find(sig);
229 if (res == g_str_2_kern_workspace.end()) {
230 return nullptr;
231 } else {
232 return res->second;
233 }
234#else
235 return nullptr;
236#endif
237}
238
239extern std::unordered_map<std::string, size_t> g_str_2_workspace_size;
240size_t TargetModule::get_kernel_workspace_size(std::string& sig) const {

Callers 1

call_kernelFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected