TensorRT Python API ProfilingVerbosity DETAILED level generate the same information as LAYER_NAMES_ONLY level generate

Description

On the same onnx model I can successfully generate the detailed json information only with the TRT C++ APIs.

The LAYER_NAMES_ONLY profiling verbosity level are activated correctly by both interfaces (Python & C++).

Shall I configure the Python builder config profiling verbosity member differently for the DETAILED as I am successfully doing it for the LAYER_NAMES_ONLY ?

Environment

TensorRT Version: 8.2.2.1
GPU Type: Quadro RTX 3000
Nvidia Driver Version: 471.11
CUDA Version: 11.2
CUDNN Version: 8.1.1
Operating System + Version: Windows 10
Python Version (if applicable): 3.6.8
TensorFlow Version (if applicable): NA
PyTorch Version (if applicable): NA
Baremetal or Container (if container which image + tag): Baremetal

Relevant Files

NA

Steps To Reproduce

  • Take onnx_resnet50.py sample from TensorRT SDK python samples.

  • In function build_engine_onnx, before the line return builder.build_engine(network, config)
    Add the following command:

config.profiling_verbosity = trt.ProfilingVerbosity.DETAILED
  • Change the logger report level to:
TRT_LOGGER = trt.Logger(trt.Logger.VERBOSE)
  • Run the sample and stop after calling to:
engine = build_engine_onnx(onnx_model_file)
  • Analyze the generated report and find that line:
    [TRT] [V] Engine Layer Information:
    Which provide information of all layers in engine but no json engine structure is provided
    despite the fact that the profiling_verbosity was set to DETAILED level

Thanks,