未验证 提交 acb5e863 编写于 作者: 石晓伟 提交者: GitHub

fix a bug in reset_tensor_array, test=develop (#29620)

* fix a bug in reset_tensor_array, test=develop

* ci coverage, test=develop
上级 3d1741b7
...@@ -38,8 +38,14 @@ struct TensorArrayBatchCleaner { ...@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册