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

Method CachedProfiler

src/gopt/impl/global_layout_transform/profiler_impl.cpp:612–618  ·  view source on GitHub ↗

================== CachedProfiler =================*/

Source from the content-addressed store, hash-verified

610
611/* ================== CachedProfiler =================*/
612CachedProfiler::CachedProfiler(
613 const char* path, int runs, float opr_threshold, float var_node_threshold)
614 : ProfilerImpl(runs, opr_threshold, var_node_threshold), m_path{path} {
615 if (m_path != nullptr) { // file cache
616 ProfilerCache::inst().set_impl(std::make_unique<InFilePersistentCache>(m_path));
617 }
618}
619
620CachedProfiler::ProfilingResult CachedProfiler::profile(const Problem& problem) const {
621 auto ret = ProfilerImpl::profile(problem);

Callers

nothing calls this directly

Calls 2

instFunction · 0.85
set_implMethod · 0.45

Tested by

no test coverage detected