|
|
@ -38,8 +38,14 @@ struct TensorArrayBatchCleaner {
|
|
|
|
constexpr auto kTensorId = framework::VarTypeTrait<framework::Tensor>::kId;
|
|
|
|
constexpr auto kTensorId = framework::VarTypeTrait<framework::Tensor>::kId;
|
|
|
|
constexpr auto kLoDTensorId =
|
|
|
|
constexpr auto kLoDTensorId =
|
|
|
|
framework::VarTypeTrait<framework::LoDTensor>::kId;
|
|
|
|
framework::VarTypeTrait<framework::LoDTensor>::kId;
|
|
|
|
|
|
|
|
constexpr auto kSelectedRowsId =
|
|
|
|
|
|
|
|
framework::VarTypeTrait<framework::SelectedRows>::kId;
|
|
|
|
|
|
|
|
constexpr auto kFetchListId =
|
|
|
|
|
|
|
|
framework::VarTypeTrait<framework::FetchList>::kId;
|
|
|
|
valid_types_.insert(kTensorId);
|
|
|
|
valid_types_.insert(kTensorId);
|
|
|
|
valid_types_.insert(kLoDTensorId);
|
|
|
|
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
|
|
|
|
// 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
|
|
|
|
// bool(trick), because some of them are containers, and some operators just
|
|
|
|