zackcquic commented on a change in pull request #7952:
URL: https://github.com/apache/tvm/pull/7952#discussion_r639027984
##########
File path: tests/python/relay/test_pass_instrument.py
##########
@@ -205,6 +205,18 @@ def enter_pass_ctx(self):
assert cur_pass_ctx.instruments == None
+def test_enter_pass_ctx_exception_global(capsys):
+ @pass_instrument
+ class PIBroken:
+ def enter_pass_ctx(self):
+ raise RuntimeError("Just a dummy error")
+
+ cur_pass_ctx = tvm.transform.PassContext.current()
+ with pytest.raises(tvm.error.TVMError):
Review comment:
Done
--
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]