Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
yf711 committed Jul 30, 2024
1 parent 0f6efdc commit cfd44a7
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3756,6 +3756,11 @@ Status TensorrtExecutionProvider::CreateNodeComputeInfoFromGraph(const GraphView
trt_context = trt_state->context->get();
}

// Check before using trt_engine
if (trt_engine == nullptr) {
return ORT_MAKE_STATUS(ONNXRUNTIME, EP_FAIL, "Invalid TensorRT engine, please rebuild.");
}

Check warning on line 3763 in onnxruntime/core/providers/tensorrt/tensorrt_execution_provider.cc

View workflow job for this annotation

GitHub Actions / Optional Lint C++

[cpplint] reported by reviewdog 🐶 Line ends in whitespace. Consider deleting these extra spaces. [whitespace/end_of_line] [4] Raw Output: onnxruntime/core/providers/tensorrt/tensorrt_execution_provider.cc:3763: Line ends in whitespace. Consider deleting these extra spaces. [whitespace/end_of_line] [4]
// Get input and output binding names
int total_bindings = trt_engine->getNbIOTensors();
std::vector<char const*> input_binding_names, output_binding_names;
Expand Down

0 comments on commit cfd44a7

Please sign in to comment.