We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9ed18a7 commit b8c3abeCopy full SHA for b8c3abe
py/torch_tensorrt/dynamo/utils.py
@@ -204,6 +204,7 @@ def set_log_level(parent_logger: Any, level: Any) -> None:
204
Sets the log level to the user provided level.
205
This is used to set debug logging at a global level
206
at entry points of tracing, dynamo and torch_compile compilation.
207
+ It also set log level for c++ torch trt logger
208
"""
209
if parent_logger:
210
parent_logger.setLevel(level)
@@ -218,6 +219,8 @@ def set_log_level(parent_logger: Any, level: Any) -> None:
218
219
log_level = trt.ILogger.Severity.ERROR
220
elif level == logging.CRITICAL:
221
log_level = trt.ILogger.Severity.INTERNAL_ERROR
222
+ else:
223
+ raise AssertionError(f"{level} is valid log level")
224
225
torch.ops.tensorrt.set_logging_level(int(log_level))
226
0 commit comments