comaniac commented on a change in pull request #9901:
URL: https://github.com/apache/tvm/pull/9901#discussion_r783385794
##########
File path: python/tvm/autotvm/measure/measure_methods.py
##########
@@ -150,33 +151,51 @@ def build(self, measure_inputs):
)
else:
- if "InstantiationError" in str(res.error):
- msg = str(res.error)
+ tb, exception = res.error
Review comment:
Better to have an assertion to make sure it is a tuple-2. Combining
another comment I have, maybe it's easier to just let `res.error` be `tb + "\n"
+ str(ex)`.
##########
File path: python/tvm/autotvm/measure/measure_methods.py
##########
@@ -150,33 +151,51 @@ def build(self, measure_inputs):
)
else:
- if "InstantiationError" in str(res.error):
- msg = str(res.error)
+ tb, exception = res.error
+ if "InstantiationError" in str(exception):
+ msg = str(exception)
try:
msg = msg.split("\n")[-2].split(": ")[1]
except Exception: # pylint:
disable=broad-except
pass
res = MeasureResult(
- (InstantiationError(msg),),
+ (
+ tb,
+ InstantiationError(msg),
+ ),
Review comment:
IIUC, from this structure and
https://github.com/apache/tvm/blob/main/python/tvm/autotvm/tuner/tuner.py#L144,
`InstantiationError(msg)` is now only in the tuning log instead of logging out
(in the debug mode). Is this intentional? Or maybe we just concat tb and
exception to have something like `InstantiationError(tb + "\n" + exception)`?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]