You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2021/11/23 19:50:08 UTC

[GitHub] [tvm] junrushao1994 opened a new issue #9567: [Bug] Set `TVM_BACKTRACE=0` doesn't suppress C++ stacktrace

junrushao1994 opened a new issue #9567:
URL: https://github.com/apache/tvm/issues/9567


   ### Expected behavior
   
   The snippet below should suppress C++ stacktraces, but actually it doesn't. I digged into the codebase but found nowhere the environment variable is used in C++...
   
   ```python
   TVM_BACKTRACE=0 python main.py
   # main.py is any code that triggers TVMError
   ```
   
   ### Actual behavior
   
   The environment variable isn't in effect
   
   ### Environment
   
   OS version is not relevant. TVM version is the current HEAD (328d7c7c09763b8532a6a7359a5dc6d5ee6c8a98)
   
   ### Steps to reproduce
   
   Provided in the previous section.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] ZQPei commented on issue #9567: [Bug] Set `TVM_BACKTRACE=0` doesn't suppress C++ stacktrace

Posted by GitBox <gi...@apache.org>.
ZQPei commented on issue #9567:
URL: https://github.com/apache/tvm/issues/9567#issuecomment-981081530


   In my opinion, supporting C++ backtrace suppression by environment might slowdown tvm runtime a little bit. Is it necessary? Or we can just delete the TVM_BACKTRACE in python?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] junrushao1994 commented on issue #9567: [Bug] Set `TVM_BACKTRACE=0` doesn't suppress C++ stacktrace

Posted by GitBox <gi...@apache.org>.
junrushao1994 commented on issue #9567:
URL: https://github.com/apache/tvm/issues/9567#issuecomment-982222805


   @ZQPei We have an assumption that if an error is raised, it’s probably the slow path where we Dian waste reasonable amount of time. If plowing this assumption, the necessary time to read an environment variable is probably acceptable:-)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] ZQPei edited a comment on issue #9567: [Bug] Set `TVM_BACKTRACE=0` doesn't suppress C++ stacktrace

Posted by GitBox <gi...@apache.org>.
ZQPei edited a comment on issue #9567:
URL: https://github.com/apache/tvm/issues/9567#issuecomment-981068199


   Seems like for now tvm doesn't support suppressing c++ backtrace with system environment. It can only be suppressed by `set(USE_LIBBACKTRACE OFF)` in config.cmake and `#define TVM_LOG_STACK_TRACE 0` in `include/tvm/runtime/logging.h`.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] ZQPei edited a comment on issue #9567: [Bug] Set `TVM_BACKTRACE=0` doesn't suppress C++ stacktrace

Posted by GitBox <gi...@apache.org>.
ZQPei edited a comment on issue #9567:
URL: https://github.com/apache/tvm/issues/9567#issuecomment-996403708


   @junrushao1994 Thank you! I will try to submit an RFC as soon as possible.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] ZQPei commented on issue #9567: [Bug] Set `TVM_BACKTRACE=0` doesn't suppress C++ stacktrace

Posted by GitBox <gi...@apache.org>.
ZQPei commented on issue #9567:
URL: https://github.com/apache/tvm/issues/9567#issuecomment-996403708


   @yongsun Thank you! I will try to submit an RFC as soon as possible.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] ZQPei commented on issue #9567: [Bug] Set `TVM_BACKTRACE=0` doesn't suppress C++ stacktrace

Posted by GitBox <gi...@apache.org>.
ZQPei commented on issue #9567:
URL: https://github.com/apache/tvm/issues/9567#issuecomment-982230866


   I agree. To step further, it would be better to have a `TVM_LOG_LEVEL` environment to control the output of the log level in C++ side. What do you think?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] junrushao1994 commented on issue #9567: [Bug] Set `TVM_BACKTRACE=0` doesn't suppress C++ stacktrace

Posted by GitBox <gi...@apache.org>.
junrushao1994 commented on issue #9567:
URL: https://github.com/apache/tvm/issues/9567#issuecomment-982654842


   @ZQPei I think we already have `TVM_LOG_DEBUG`, but not sure how to use it properly


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] ZQPei commented on issue #9567: [Bug] Set `TVM_BACKTRACE=0` doesn't suppress C++ stacktrace

Posted by GitBox <gi...@apache.org>.
ZQPei commented on issue #9567:
URL: https://github.com/apache/tvm/issues/9567#issuecomment-983235748


   > I think we already have `TVM_LOG_DEBUG`, but not sure how to use it properly
   
   `TVM_LOG_DEBUG` is a macro trigger that will send more debugging info if we set it to 1. Seems like it has nothing to do with the tvm logger level.
   
   BTW, is it necessary to create a RFC of adding a `TVM_LOG_LEVEL` environment in the TVM discuss?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] ZQPei commented on issue #9567: [Bug] Set `TVM_BACKTRACE=0` doesn't suppress C++ stacktrace

Posted by GitBox <gi...@apache.org>.
ZQPei commented on issue #9567:
URL: https://github.com/apache/tvm/issues/9567#issuecomment-981068199


   Seems like for now tvm doesn't support suppressing c++ backtrace with system environment. It can only be suppressed by set(USE_LIBBACKTRACE OFF). 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] junrushao1994 commented on issue #9567: [Bug] Set `TVM_BACKTRACE=0` doesn't suppress C++ stacktrace

Posted by GitBox <gi...@apache.org>.
junrushao1994 commented on issue #9567:
URL: https://github.com/apache/tvm/issues/9567#issuecomment-994107868


   @ZQPei Sorry for the late reply! That will be very helpful if we could potentially unify these environment variables. Please send an RFC and I'm more than happy to help!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] ZQPei edited a comment on issue #9567: [Bug] Set `TVM_BACKTRACE=0` doesn't suppress C++ stacktrace

Posted by GitBox <gi...@apache.org>.
ZQPei edited a comment on issue #9567:
URL: https://github.com/apache/tvm/issues/9567#issuecomment-996403708


   Thank you! I will try to submit an RFC as soon as possible.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org