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:
[email protected]


Reply via email to