Skip to content

Commit 6bbc3f1

Browse files
committed
Enable LogLevel.GRAPH in Python API
1 parent eb39f9c commit 6bbc3f1

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

py/trtorch/csrc/trtorch_py.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,7 @@ PYBIND11_MODULE(_C, m) {
309309
.value("WARNING", core::util::logging::LogLevel::kWARNING)
310310
.value("INFO", core::util::logging::LogLevel::kINFO)
311311
.value("DEBUG", core::util::logging::LogLevel::kDEBUG)
312+
.value("GRAPH", core::util::logging::LogLevel::kGRAPH)
312313
.export_values();
313314
}
314315

py/trtorch/logging.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ class Level(Enum):
1313
Warning = LogLevel.WARNING
1414
Info = LogLevel.INFO
1515
Debug = LogLevel.DEBUG
16+
Graph = LogLevel.GRAPH
1617

1718
@staticmethod
1819
def _to_internal_level(external) -> LogLevel:
@@ -26,6 +27,8 @@ def _to_internal_level(external) -> LogLevel:
2627
return LogLevel.INFO
2728
if external == Level.Debug:
2829
return LogLevel.DEBUG
30+
if external == Level.Graph:
31+
return LogLevel.GRAPH
2932

3033

3134
def get_logging_prefix() -> str:

0 commit comments

Comments
 (0)