Skip to content

Commit d27365d

Browse files
committed
avoid double free error for newer TensorRT >= 8.2.0.6
1 parent e024a86 commit d27365d

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

engine/src/nn/tensorrtapi.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,12 +252,10 @@ ICudaEngine* TensorrtAPI::get_cuda_engine() {
252252
info_string("serialize engine:", trtFilePath);
253253
// serialized engines are not portable across platforms or TensorRT versions
254254
// engines are specific to the exact GPU model they were built on
255-
IHostMemory *serializedModel = engine->serialize();
256255
unique_ptr<IHostMemory, samplesCommon::InferDeleter> enginePlan{engine->serialize()};
257256
// export engine for future uses
258257
// write engine to file
259258
write_buffer(enginePlan->data(), enginePlan->size(), trtFilePath);
260-
serializedModel->destroy();
261259
}
262260
}
263261
return engine;

0 commit comments

Comments
 (0)