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/05/01 18:44:58 UTC

[GitHub] [tvm] tqchen commented on pull request #7919: [RUNTIME] Improve signal handling in python env.

tqchen commented on pull request #7919:
URL: https://github.com/apache/tvm/pull/7919#issuecomment-830676898


   @areusch I pushed an alternative implementation that can preserve the python exception types.  I started  with this one but then decided to go with the approach because most exceptions are indeed KeyboardInterrupt. After the discussion I agree it can be more important to preserve the exception type.
   
   This implementation does that. The approach is similar to pybind's approach of handling the exception. When error happens a special exception is thrown, and the error is not cleared but propagated into the FFI layer through a specific return code.
   
   The only drawback here is that the stacktrace will only start from the FFI(the C++ traces are not tracked), but it is fine as the signal handling itself is also already async.
   
   


-- 
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.

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