masahi commented on code in PR #12991:
URL: https://github.com/apache/tvm/pull/12991#discussion_r990602716
##########
python/tvm/meta_schedule/relay_integration.py:
##########
@@ -93,8 +93,15 @@ def _normalize_params(
if isinstance(param, np.ndarray):
param = nd.array(param)
relay_params[name] = param
- if executor is not None:
+
+ if executor is None:
+ executor = relay.backend.Executor("graph")
+
+ if mod.get_attr("executor") is None:
mod = mod.with_attr("executor", executor)
+ else:
+ executor = mod.get_attr("executor")
Review Comment:
When None `executor` is passed to `relay.build(..., executor=executor)`, we
get segfault. This is certainly due to some sloppy coding somewhere, but I
haven't looked into it.
Perhaps the default value of `executor` should be `Executor("graph")` rather
than None, as in `relay.build`
https://github.com/apache/tvm/blob/main/python/tvm/relay/build_module.py#L281
--
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]