Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/relax/transform/fuse_ops.cc
Original file line number Diff line number Diff line change
Expand Up @@ -427,9 +427,7 @@ class FunctionCreator : public ExprMutator {
}

for (const Expr& arg : call->args) {
if (GetStructInfoAs<TupleStructInfoNode>(arg) != nullptr) {
// The argument is fully referenced. Thus we remove it from the mapping.
partially_used_tuple_params_.erase(arg.get());
if (arg.as<TupleNode>()) {
const Tuple& tup_args = Downcast<Tuple>(arg);
for (const Expr& tup_arg : tup_args->fields) {
CheckDefAndUpdateParam(tup_arg);
Expand All @@ -438,6 +436,10 @@ class FunctionCreator : public ExprMutator {
} else {
CheckDefAndUpdateParam(arg);
}
if (GetStructInfoAs<TupleStructInfoNode>(arg) != nullptr) {
// The argument is fully referenced. Thus we remove it from the mapping.
partially_used_tuple_params_.erase(arg.get());
}
}
}
} else if (var_binding->value.as<TupleGetItemNode>()) {
Expand Down