Skip to content

Commit

Permalink
small refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
chilo-ms committed Apr 23, 2021
1 parent 2e8955b commit cd8d640
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1326,7 +1326,8 @@ common::Status TensorrtExecutionProvider::Compile(const std::vector<Node*>& fuse
// Deserialize engine
trt_state->context->reset();
trt_state->engine->reset();
*(trt_state->engine) = tensorrt_ptr::unique_pointer<nvinfer1::ICudaEngine>(trt_state->runtime->get()->deserializeCudaEngine(engine_buf.get(), engine_size, nullptr));
auto runtime = trt_state->runtime->get();
*(trt_state->engine) = tensorrt_ptr::unique_pointer<nvinfer1::ICudaEngine>(runtime->deserializeCudaEngine(engine_buf.get(), engine_size, nullptr));
LOGS_DEFAULT(VERBOSE) << "[TensorRT EP] DeSerialized " + engine_cache_path;
if (trt_state->engine == nullptr) {
return ORT_MAKE_STATUS(ONNXRUNTIME, EP_FAIL,
Expand Down

0 comments on commit cd8d640

Please sign in to comment.