Skip to content

Commit

Permalink
adjustment for upcoming trt 10
Browse files Browse the repository at this point in the history
  • Loading branch information
yf711 committed Dec 15, 2023
1 parent 6b55002 commit 7c42222
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2728,7 +2728,7 @@ common::Status TensorrtExecutionProvider::Compile(const std::vector<FusedNodeAnd
trt_config->setFlag(nvinfer1::BuilderFlag::kENABLE_TACTIC_HEURISTIC);
LOGS_DEFAULT(WARNING) << "[TensorRT EP] Builder heuristics are enabled. For TRT > 8.5, trt_build_heuristics_enable is deprecated, please set builder optimization level as 2 to enable builder heuristics.";

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

View workflow job for this annotation

GitHub Actions / cpplint

[cpplint] onnxruntime/core/providers/tensorrt/tensorrt_execution_provider.cc#L2729

Lines should be <= 120 characters long [whitespace/line_length] [2]
Raw output
onnxruntime/core/providers/tensorrt/tensorrt_execution_provider.cc:2729:  Lines should be <= 120 characters long  [whitespace/line_length] [2]
}
#elif NV_TENSORRT_MAJOR == 8 && NV_TENSORRT_MINOR == 6 || NV_TENSORRT_MAJOR > 8
#elif NV_TENSORRT_MAJOR == 8 && NV_TENSORRT_MINOR > 5 || NV_TENSORRT_MAJOR > 8
// for TRT 8.6 onwards, heuristic-based tactic option is automatically enabled by setting builder optimization level 2

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

View workflow job for this annotation

GitHub Actions / cpplint

[cpplint] onnxruntime/core/providers/tensorrt/tensorrt_execution_provider.cc#L2732

Line ends in whitespace. Consider deleting these extra spaces. [whitespace/end_of_line] [4]
Raw output
onnxruntime/core/providers/tensorrt/tensorrt_execution_provider.cc:2732:  Line ends in whitespace.  Consider deleting these extra spaces.  [whitespace/end_of_line] [4]

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

View workflow job for this annotation

GitHub Actions / cpplint

[cpplint] onnxruntime/core/providers/tensorrt/tensorrt_execution_provider.cc#L2732

Lines should be <= 120 characters long [whitespace/line_length] [2]
Raw output
onnxruntime/core/providers/tensorrt/tensorrt_execution_provider.cc:2732:  Lines should be <= 120 characters long  [whitespace/line_length] [2]
if (build_heuristics_enable_) {
if (builder_optimization_level_ == 2) {
Expand All @@ -2739,7 +2739,8 @@ common::Status TensorrtExecutionProvider::Compile(const std::vector<FusedNodeAnd
}
}
#endif
#if NV_TENSORRT_MINOR > 5 && NV_TENSORRT_MAJOR >= 8

#if NV_TENSORRT_MAJOR == 8 && NV_TENSORRT_MINOR > 5 || NV_TENSORRT_MAJOR > 8
// switch optimizaion level
if (builder_optimization_level_ != 3) {
trt_config->setBuilderOptimizationLevel(builder_optimization_level_);
Expand Down Expand Up @@ -3176,7 +3177,7 @@ common::Status TensorrtExecutionProvider::Compile(const std::vector<FusedNodeAnd
trt_config->setFlag(nvinfer1::BuilderFlag::kENABLE_TACTIC_HEURISTIC);
LOGS_DEFAULT(VERBOSE) << "[TensorRT EP] Builder heuristics are enabled";
}
#if NV_TENSORRT_MINOR > 5 && NV_TENSORRT_MAJOR >= 8
#if NV_TENSORRT_MAJOR == 8 && NV_TENSORRT_MINOR > 5 || NV_TENSORRT_MAJOR > 8
// switch optimizaion level
if (trt_state->builder_optimization_level != 3) {
trt_config->setBuilderOptimizationLevel(trt_state->builder_optimization_level);
Expand Down

0 comments on commit 7c42222

Please sign in to comment.