Adjust cpp torch trt logging level with compiler option by keehyuna · Pull Request #3181 · pytorch/TensorRT (original) (raw)

Description

Log level of python and native TRT logger is set differently. Same level from compiler option should be helpful to work with development version of torch-TRT module.

TorchTRTLogger.cpp
#ifndef NDEBUG
static TorchTRTLogger global_logger("[Torch-TensorRT - Debug Build] - ", LogLevel::kDEBUG, true);
#else
static TorchTRTLogger global_logger("[Torch-TensorRT] - ", LogLevel::kWARNING, false);
#endif

And profile option for c++ trt runtime module is enabled by debug level logging. This is helpful to measure/evaluate
performance with development version of torch-TRT module

Fixes # (issue)

Type of change

Please delete options that are not relevant and/or add your own.

Checklist: