For now, tvm uses the dmlc log in `dmlc-core` by default, which lacks good log 
level management. Below is some underperformance in tvm.

1. `LOG(INFO)` shares the same severity with `LOG(WARNING)` and `LOG(ERROR)`,
2. `LOG(DEBUG)` does not exist. Instead, tvm contains a macro `TVM_LOG_DEBUG` 
and an environment `DMLC_LOG_DEBUG` as a log trigger to print the debugging 
messages, which is quite confusing for users,
3. 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:
1. add different log severity in `dmlc-core` repo,
2. provide `TVM_LOG_LEVEL` as an environment variable to unify these env 
variables or macros, like, `DMLC_LOG_DEBUG`, `TVM_BACKTRACE` and 
`TVM_LOG_STACK_TRACE`.

cc @junrushao1994





---
[Visit 
Topic](https://discuss.tvm.apache.org/t/rfc-better-tvm-logger-in-c-side/11734/1)
 to respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, [click 
here](https://discuss.tvm.apache.org/email/unsubscribe/484fe33ed0f87d5a614b632f425d63fcca7aaa4aadf739d069d03e63f85241fd).

Reply via email to