diff --git a/paddle/fluid/inference/api/details/reset_tensor_array.h b/paddle/fluid/inference/api/details/reset_tensor_array.h index be5fe1d64f9e7fbba207878c9ca6740109a41b7c..d740d9ee9523cf6c7e7ad1c341c3a8f32e8a42ad 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