Documentation inconsistency: setOptimizationLevel vs setBuilderOptimizationLevel API

Documentation Inconsistency: Builder Optimization Level API in TensorRT 10.12.0

Category: TensorRT Documentation Issue

Hi NVIDIA TensorRT Team,

I’ve discovered multiple documentation inconsistencies in TensorRT 10.12.0 regarding the builder optimization level API.

The Issues

1. C++ API Documentation Inconsistency

There’s a discrepancy between different parts of the TensorRT 10.12.0 C++ documentation:

Best Practices Guide Shows (INCORRECT):

config->setOptimizationLevel(0); 

Source: https://docs.nvidia.com/deeplearning/tensorrt/10.12.0/performance/best-practices.html#builder-optimization-level

C++ API Documentation Shows (CORRECT):

config->setBuilderOptimizationLevel(0); 

Source: https://docs.nvidia.com/deeplearning/tensorrt/10.12.0/_static/c-api/classnvinfer1_1_1_i_builder_config.html#ac9821504ae7a11769e48b0e62761837e

2. Python API Documentation Missing

The Python API documentation for IBuilderConfig does not list any optimization level property at all:

  • No optimization_level property documented
  • No builder_optimization_level property documented

However, the correct Python usage is:

config.builder_optimization_level = 0 

Correct Usage

C++:

config->setBuilderOptimizationLevel(0); 

Python:

config.builder_optimization_level = 0 

Could the documentation team please clarify and fix these inconsistencies?

Environment

  • TensorRT Version: 10.12.0
  • Platform: Linux/Windows
  • Language: C++/Python

thank you for highlighting this,

I have reported this to the Engineering team and we will take appropriate action on the same.

Thanks