For now, tvm uses the dmlc log in dmlc-core
by default, which lacks good log level management. Below is some underperformance in tvm.
-
LOG(INFO)
shares the same severity withLOG(WARNING)
andLOG(ERROR)
, -
LOG(DEBUG)
does not exist. Instead, tvm contains a macroTVM_LOG_DEBUG
and an environmentDMLC_LOG_DEBUG
as a log trigger to print the debugging messages, which is quite confusing for users, - Tvm is supposed to have an env
TVM_BACKTRACE
as discussed in https://github.com/apache/tvm/issues/9567, but this environment is not working and can not be found anywhere in C++ code.
Although tvm allows users to define or pass custom loggers to manage logs on the C++ side, the default dmlc logger is still the most commonly used logger. Thus, it is necessary to imporve the current tvm logger.
In this RFC, I suggest to do the following:
- add different log severity in
dmlc-core
repo, - provide
TVM_LOG_LEVEL
as an environment variable to unify these env variables or macros, like,DMLC_LOG_DEBUG
,TVM_BACKTRACE
andTVM_LOG_STACK_TRACE
.
cc @junrushao