From acb5e86363fdb71f20709f91be5b7b66c2f7e144 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=9F=B3=E6=99=93=E4=BC=9F?= <39303645+Shixiaowei02@users.noreply.github.com> Date: Mon, 28 Dec 2020 13:51:21 +0800 Subject: [PATCH] fix a bug in reset_tensor_array, test=develop (#29620) * fix a bug in reset_tensor_array, test=develop * ci coverage, test=develop --- paddle/fluid/inference/api/details/reset_tensor_array.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/paddle/fluid/inference/api/details/reset_tensor_array.h b/paddle/fluid/inference/api/details/reset_tensor_array.h index be5fe1d64f9..d740d9ee952 100644 --- a/paddle/fluid/inference/api/details/reset_tensor_array.h +++ b/paddle/fluid/inference/api/details/reset_tensor_array.h @@ -38,8 +38,14 @@ struct TensorArrayBatchCleaner { constexpr auto kTensorId = framework::VarTypeTrait::kId; constexpr auto kLoDTensorId = framework::VarTypeTrait::kId; + constexpr auto kSelectedRowsId = + framework::VarTypeTrait::kId; + constexpr auto kFetchListId = + framework::VarTypeTrait::kId; valid_types_.insert(kTensorId); valid_types_.insert(kLoDTensorId); + valid_types_.insert(kSelectedRowsId); + valid_types_.insert(kFetchListId); } // Collect the variables that are not Tensor or LoDTensor, and reset them to a // bool(trick), because some of them are containers, and some operators just -- GitLab