MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / execute

Method execute

src/jit/impl/nvrtc/compiler_cuda.cpp:175–192  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

173 : m_source{std::move(source)}, m_name{std::move(name)} {}
174
175void CudaExecutable::execute(JITExecutor* fusion_opr) {
176 FuncCache* func;
177 auto cn = fusion_opr->comp_node();
178 auto&& prop = CompNodeEnv::from_comp_node(cn).cuda_env().device_prop;
179 {
180 MGB_LOCK_GUARD(m_mtx);
181 func = &m_func_cache[{prop.major, prop.minor}];
182 }
183 {
184 MGB_LOCK_GUARD(func->mtx);
185 if (func->ptx.empty()) {
186 func->compile(
187 "jit:nvrtc:" + PersistentCache::make_category_from_comp_node(cn),
188 prop.major, prop.minor, this);
189 }
190 }
191 func->exec(fusion_opr, this);
192}
193
194void CudaExecutable::FuncCache::compile(
195 const std::string& cache_category, int major, int minor,

Callers

nothing calls this directly

Calls 4

comp_nodeMethod · 0.45
emptyMethod · 0.45
compileMethod · 0.45
execMethod · 0.45

Tested by

no test coverage detected