tqchen commented on a change in pull request #5675:
URL: https://github.com/apache/incubator-tvm/pull/5675#discussion_r430655132



##########
File path: python/tvm/__init__.py
##########
@@ -63,9 +63,11 @@
 # Contrib initializers
 from .contrib import rocm as _rocm, nvcc as _nvcc, sdaccel as _sdaccel
 
+PREV_EXCEPTHOOK = sys.excepthook
+
 # Clean subprocesses when TVM is interrupted
 def tvm_excepthook(exctype, value, trbk):
-    print('\n'.join(traceback.format_exception(exctype, value, trbk)))

Review comment:
       Let us modify the function as `tvm_wrap_excepthook(exception_hook)` that 
returns a new wrapped hook, and then do
   
   sys.excepthook = tvm_wrap_exceptionhook(sys.except_hook)
   




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