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

Method read_cache

src/tensorrt/impl/tensorrt_engine_cache.cpp:140–152  ·  view source on GitHub ↗

=================== TensorRTEngineCacheIO ============= */

Source from the content-addressed store, hash-verified

138
139/* =================== TensorRTEngineCacheIO ============= */
140void TensorRTEngineCacheIO::read_cache() {
141 uint32_t nr_engines;
142 read(nr_engines);
143 for (uint32_t i = 0; i < nr_engines; ++i) {
144 uint32_t key_size;
145 read(key_size);
146 std::string key;
147 key.resize(key_size);
148 read(const_cast<char*>(key.data()), key.size());
149 mgb_log_debug("read key: %s", key.c_str());
150 m_cache[std::move(key)].init_from(*this);
151 }
152}
153
154TensorRTEngineCacheIO::TensorRTEngineCacheIO(std::string filename)
155 : m_filename{std::move(filename)} {

Callers

nothing calls this directly

Calls 4

readFunction · 0.85
resizeMethod · 0.80
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected