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

Method put

src/core/impl/utils/persistent_cache.cpp:141–152  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

139}
140
141void InMemoryPersistentCache::put(
142 const std::string& category, const Blob& key, const Blob& value) {
143 BlobStorage key_storage;
144 key_storage.init_data_ref(key).init_hash();
145
146 MGB_LOCK_GUARD(m_mtx);
147 auto size0 = m_cache.size();
148 m_cache[category][std::move(key_storage)].init_data_ref(value);
149 if (m_cache.size() > size0) {
150 mgb_log_debug("new cache category: %s", category.c_str());
151 }
152}
153
154// ================= AlgoChooserProfileCache ==================
155AlgoChooserProfileCache::AlgoChooserProfileCache(CompNode cn, const char* opr_type) {

Callers 3

compileMethod · 0.45
TESTFunction · 0.45
setup_algoMethod · 0.45

Calls 12

small_sortFunction · 0.85
instFunction · 0.85
resizeMethod · 0.80
build_blobMethod · 0.80
sizeMethod · 0.45
emptyMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
eraseMethod · 0.45
reserveMethod · 0.45
appendMethod · 0.45
dataMethod · 0.45

Tested by 1

TESTFunction · 0.36