diff --git a/cinn/optim/fold_cinn_call_arguments.cc b/cinn/optim/fold_cinn_call_arguments.cc index d34af0a1ee..e09e7ede20 100644 --- a/cinn/optim/fold_cinn_call_arguments.cc +++ b/cinn/optim/fold_cinn_call_arguments.cc @@ -41,7 +41,7 @@ struct FoldCINNCallArgumentsMutator : public ir::IRMutator<> { if (call && call->is_cinn_call()) { // remove the duplicate calls. std::string key = utils::GetStreamCnt(Expr(call)); - if (visited_call_.count(utils::GetStreamCnt(Expr(call)))) { + if (visited_call_.count(key)) { it = node->stmts.erase(it); continue; }