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

Method serialize_engine_to_cache

src/tensorrt/impl/tensorrt_opr.cpp:691–697  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

689}
690
691void TensorRTOpr::serialize_engine_to_cache() const {
692 TensorRTUniquePtr<nvinfer1::IHostMemory> buf{trt_cuda_engine()->serialize(), {}};
693 mgb_assert(buf, "failed to serialize ICudaEngine");
694 TensorRTEngineCache::inst().put(
695 TensorRTEngineCache::make_key_from_trt_opr(this),
696 {buf->data(), buf->size()});
697}
698
699MGB_VERSION_SYMBOL3(TENSORRT, NV_TENSORRT_MAJOR, NV_TENSORRT_MINOR, NV_TENSORRT_PATCH);
700

Callers

nothing calls this directly

Calls 5

instFunction · 0.85
serializeMethod · 0.45
putMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected