masahi commented on a change in pull request #5623:
URL: https://github.com/apache/incubator-tvm/pull/5623#discussion_r427270784
##########
File path: src/relay/transforms/merge_composite.cc
##########
@@ -122,8 +122,10 @@ class MergeCompositeWrapper : public ExprMutator {
for (const auto& arg : pattern->args) {
Expr new_arg;
if (arg->IsInstance<CallNode>()) {
- new_arg =
- ExtractPattern(Downcast<Call>(arg), Downcast<Call>(root->args[i]),
var_map, call_map);
+ if (root->args[i]->IsInstance<CallNode>()) {
Review comment:
if `root->args[i]->IsInstance<CallNode>()` is false, `new_arg` will be a
null pointer. There is no point in caching null pointer.
----------------------------------------------------------------
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]