torch_tensorrt.logging ¶
-
class
torch_tensorrt.logging.
Level
( value ) ¶ -
Bases:
enum.Enum
Enum to set the minimum required logging level to print a message to stdout
-
Debug
= <LogLevel.DEBUG: 4> ¶
-
Error
= <LogLevel.ERROR: 1> ¶
-
Graph
= <LogLevel.GRAPH: 5> ¶
-
Info
= <LogLevel.INFO: 3> ¶
-
InternalError
= <LogLevel.INTERNAL_ERROR: 0> ¶
-
Warning
= <LogLevel.WARNING: 2> ¶
-
-
torch_tensorrt.logging.
get_is_colored_output_on
( ) → bool ¶ -
Get if colored output is enabled for logging
- Returns
-
If colored output is one
- Return type
-
bool
-
torch_tensorrt.logging.
get_logging_prefix
( ) → str ¶ -
Get the prefix set for logging messages
- Returns
-
Prefix used for logger
- Return type
-
str
-
torch_tensorrt.logging.
get_reportable_log_level
( ) → torch_tensorrt.logging.Level ¶ -
Get the level required for a message to be printed in the log
- Returns
-
The enum representing the level required to print
- Return type
-
trtorch.logging.Level
-
torch_tensorrt.logging.
log
( level : torch_tensorrt.logging.Level , msg : str ) ¶ -
Add a new message to the log
Adds a new message to the log at a specified level. The message will only get printed out if Level > reportable_log_level
- Parameters
-
-
level ( trtorch.logging.Level ) – Severity of the message
-
msg ( str ) – Actual message text
-
-
torch_tensorrt.logging.
set_is_colored_output_on
( colored_output_on : bool ) ¶ -
Enable or disable color in the log output
- Parameters
-
colored_output_on ( bool ) – If colored output should be enabled or not
-
torch_tensorrt.logging.
set_logging_prefix
( prefix : str ) ¶ -
Set the prefix used when logging messages
- Parameters
-
prefix ( str ) – Prefix to use for logging messages
-
torch_tensorrt.logging.
set_reportable_log_level
( level : torch_tensorrt.logging.Level ) ¶ -
Set the level required for a message to be printed to the log
- Parameters
-
level ( trtorch.logging.Level ) – The enum representing the level required to print