未验证 提交 ad0b01ff 编写于 作者: W Wilber 提交者: GitHub

lod operator should not be reused in memory_optimize pass. (#29828)

上级 9370aa6f
......@@ -96,6 +96,7 @@ void MemoryOptimizePass::CollectVarMemorySize(
const int fake_batch_size = 1;
auto valid_var = [&](framework::ir::Node* node) -> bool {
// lod operator reuse may cause unknown errors.
std::set<std::string> invalid_op = {"while",
"conditional_block",
"tensorrt_engine",
......@@ -103,6 +104,7 @@ void MemoryOptimizePass::CollectVarMemorySize(
"merge_lod_tensor_infer",
"merge_lod_tensor",
"equal",
"sequence_pool",
"lod_reset"};
for (auto* tmp : node->inputs) {
CHECK(tmp->IsOp());
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册