| 689 | } |
| 690 | |
| 691 | void 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 | |
| 699 | MGB_VERSION_SYMBOL3(TENSORRT, NV_TENSORRT_MAJOR, NV_TENSORRT_MINOR, NV_TENSORRT_PATCH); |
| 700 |