From 62ae5f6232add26ebcbaf78813188cb678bf46e9 Mon Sep 17 00:00:00 2001 From: TeFeng Chen Date: Tue, 22 Feb 2022 13:06:47 +0800 Subject: [PATCH] build_cinn_pass: fix bug because of output control var (#39782) --- paddle/fluid/framework/paddle2cinn/build_cinn_pass.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paddle/fluid/framework/paddle2cinn/build_cinn_pass.cc b/paddle/fluid/framework/paddle2cinn/build_cinn_pass.cc index 3516e71b837..d55950064a4 100644 --- a/paddle/fluid/framework/paddle2cinn/build_cinn_pass.cc +++ b/paddle/fluid/framework/paddle2cinn/build_cinn_pass.cc @@ -375,7 +375,7 @@ std::unique_ptr CreateNewSubGraph(const GraphNodeSet& cluster, const std::unordered_set& ignore_names) { auto result = std::make_unique>(); for (auto* node : nodes) { - if (ignore_names.count(node->Name())) { + if (!node->Var() || ignore_names.count(node->Name())) { continue; } result->emplace_back(node->Name()); -- GitLab