From 30bafff8ad1ae00eb783837e43b4a90438f1867b Mon Sep 17 00:00:00 2001 From: CtfGo Date: Thu, 4 Nov 2021 15:09:33 +0800 Subject: [PATCH] fix temporary variable allocate (#36969) --- paddle/fluid/operators/cinn_launch_op.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paddle/fluid/operators/cinn_launch_op.h b/paddle/fluid/operators/cinn_launch_op.h index 858baffcac3..e1b24293f84 100644 --- a/paddle/fluid/operators/cinn_launch_op.h +++ b/paddle/fluid/operators/cinn_launch_op.h @@ -197,7 +197,7 @@ class CinnLaunchOpKernel : public framework::OpKernel { if (!temp_variable_names.empty()) { auto temp_cinn_tensors = details::GetCinnTensorsFromCompiledScope( temp_variable_names, cinn_scope); - for (auto i = 0; i < output_variable_names.size(); ++i) { + for (auto i = 0; i < temp_variable_names.size(); ++i) { const auto& var_name = temp_variable_names.at(i); auto* tensor = temp_scope->Var(var_name)->GetMutable(); details::TensorMutableDataWithCinnInfo(place, temp_cinn_tensors.at(i), -- GitLab